fix rules are not applied

This commit is contained in:
Muhammed Efe Cetin
2025-02-19 18:01:29 +03:00
committed by M. Efe Çetin
parent 7af1480bd6
commit fa16f67363

View File

@@ -3,6 +3,14 @@ package redirector
import (
"crypto/tls"
"crypto/x509"
"fmt"
"net"
"net/http"
"net/url"
"strings"
"sync"
"time"
"github.com/armbian/redirector/db"
lru "github.com/hashicorp/golang-lru"
"github.com/oschwald/maxminddb-golang"
@@ -11,12 +19,6 @@ import (
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/samber/lo"
log "github.com/sirupsen/logrus"
"net"
"net/http"
"net/url"
"strings"
"sync"
"time"
)
// Config represents our application's configuration.
@@ -281,6 +283,7 @@ func (r *Redirector) addServer(server ServerConfig, u *url.URL) (*Server, error)
Continent: server.Continent,
Weight: server.Weight,
Protocols: []string{"http", "https"},
Rules: server.Rules,
}
if len(server.Protocols) > 0 {