Skip to content

Commit

Permalink
fix rules are not applied
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Feb 19, 2025
1 parent 7af1480 commit ca60df5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down Expand Up @@ -215,7 +217,7 @@ func (r *Redirector) reloadServers() error {

go func(i int, server ServerConfig, u *url.URL) {
defer wg.Done()

fmt.Println(server)
s, err := r.addServer(server, u)

if err != nil {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ca60df5

Please sign in to comment.