You've already forked armbian-router
mirror of
https://github.com/armbian/armbian-router.git
synced 2026-01-06 10:37:03 -08:00
[bugfix] Fix compile errors
- Fix compile errors not found by prechecks
This commit is contained in:
@@ -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 {
|
||||
|
||||
3
http.go
3
http.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user