mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-05 20:58:28 +02:00
3.0.1 init commit
- Removed Go HTTP client UA - Added optional bypass of websocket origin check #107 - Added basic forward proxy for debug - Fixed UI error in network utils tab
This commit is contained in:
14
src/start.go
14
src/start.go
@@ -12,6 +12,7 @@ import (
|
||||
"imuslab.com/zoraxy/mod/auth"
|
||||
"imuslab.com/zoraxy/mod/database"
|
||||
"imuslab.com/zoraxy/mod/dynamicproxy/redirection"
|
||||
"imuslab.com/zoraxy/mod/forwardproxy"
|
||||
"imuslab.com/zoraxy/mod/ganserv"
|
||||
"imuslab.com/zoraxy/mod/geodb"
|
||||
"imuslab.com/zoraxy/mod/info/logger"
|
||||
@@ -219,6 +220,18 @@ func startupSequence() {
|
||||
//Create an analytic loader
|
||||
AnalyticLoader = analytic.NewDataLoader(sysdb, statisticCollector)
|
||||
|
||||
//Create basic forward proxy
|
||||
sysdb.NewTable("fwdproxy")
|
||||
fwdProxyEnabled := false
|
||||
fwdProxyPort := 5587
|
||||
sysdb.Read("fwdproxy", "port", &fwdProxyPort)
|
||||
sysdb.Read("fwdproxy", "enabled", &fwdProxyEnabled)
|
||||
forwardProxy = forwardproxy.NewForwardProxy(sysdb, fwdProxyPort, SystemWideLogger)
|
||||
if fwdProxyEnabled {
|
||||
SystemWideLogger.PrintAndLog("Forward Proxy", "HTTP Forward Proxy Listening on :"+strconv.Itoa(forwardProxy.Port), nil)
|
||||
forwardProxy.Start()
|
||||
}
|
||||
|
||||
/*
|
||||
ACME API
|
||||
|
||||
@@ -241,4 +254,5 @@ func finalSequence() {
|
||||
|
||||
//Inject routing rules
|
||||
registerBuildInRoutingRules()
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user