[bugfix] Fix compile errors

- Fix compile errors not found by prechecks
This commit is contained in:
Tyler
2024-01-25 21:33:37 -05:00
parent 259978fff2
commit 5cfbfa6081
2 changed files with 5 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package redirector
import (
"crypto/tls"
"crypto/x509"
"github.com/armbian/redirector/db"
lru "github.com/hashicorp/golang-lru"
"github.com/oschwald/maxminddb-golang"
"github.com/pkg/errors"
@@ -168,7 +169,7 @@ func (r *Redirector) ReloadConfig() error {
}
// Force check
go r.servers.Check(r.checks)
go r.servers.Check(r, r.checks)
return nil
}
@@ -305,7 +306,7 @@ func (r *Redirector) addServer(server ServerConfig, u *url.URL) (*Server, error)
return nil, err
}
var city City
var city db.City
err = r.db.Lookup(ips[0], &city)
if err != nil {

View File

@@ -3,6 +3,7 @@ package redirector
import (
"encoding/json"
"fmt"
"github.com/armbian/redirector/db"
"github.com/jmcvetta/randutil"
log "github.com/sirupsen/logrus"
"net"
@@ -190,7 +191,7 @@ func (r *Redirector) geoIPHandler(w http.ResponseWriter, req *http.Request) {
ip := net.ParseIP(ipStr)
var city City
var city db.City
err = r.db.Lookup(ip, &city)
if err != nil {