mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-07 05:38:30 +02:00
Added external geoip db option
- Added support for loading geoip db from external file - Added -update_geoip flag for automatically update the geoip
This commit is contained in:
@@ -42,6 +42,7 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/gorilla/csrf"
|
||||
"imuslab.com/zoraxy/mod/geodb"
|
||||
"imuslab.com/zoraxy/mod/update"
|
||||
"imuslab.com/zoraxy/mod/utils"
|
||||
)
|
||||
@@ -60,11 +61,18 @@ func SetupCloseHandler() {
|
||||
func main() {
|
||||
//Parse startup flags
|
||||
flag.Parse()
|
||||
|
||||
/* Maintaince Function Modes */
|
||||
if *showver {
|
||||
fmt.Println(SYSTEM_NAME + " - Version " + SYSTEM_VERSION)
|
||||
os.Exit(0)
|
||||
}
|
||||
if *geoDbUpdate {
|
||||
geodb.DownloadGeoDBUpdate("./conf/geodb")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
/* Main Zoraxy Routines */
|
||||
if !utils.ValidateListeningAddress(*webUIPort) {
|
||||
fmt.Println("Malformed -port (listening address) paramter. Do you mean -port=:" + *webUIPort + "?")
|
||||
os.Exit(0)
|
||||
|
Reference in New Issue
Block a user