|
|
@ -1,8 +1,8 @@ |
|
|
|
package main |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
log "github.com/sirupsen/logrus" |
|
|
|
"os" |
|
|
|
) |
|
|
|
|
|
|
|
var logLevel = "warning" |
|
|
@ -12,27 +12,23 @@ var v6TProxyPort = 7289 |
|
|
|
var enableSniff = false |
|
|
|
var enableRedirect = true |
|
|
|
|
|
|
|
var httpInbounds = make(map[string]int) |
|
|
|
var socksInbounds = make(map[string]int) |
|
|
|
var httpInbounds map[string]int |
|
|
|
var socksInbounds map[string]int |
|
|
|
var addOnInbounds []interface{} |
|
|
|
|
|
|
|
func main() { |
|
|
|
log.SetLevel(log.DebugLevel) |
|
|
|
log.Warning("XProxy start") |
|
|
|
|
|
|
|
httpInbounds["ipv4"] = 1084 |
|
|
|
httpInbounds["ipv6"] = 1086 |
|
|
|
fmt.Println(httpInbounds) |
|
|
|
|
|
|
|
socksInbounds["nodeA"] = 1681 |
|
|
|
socksInbounds["nodeB"] = 1682 |
|
|
|
socksInbounds["nodeC"] = 1683 |
|
|
|
fmt.Println(socksInbounds) |
|
|
|
content, err := os.ReadFile("test.yml") |
|
|
|
if err != nil { |
|
|
|
panic(err) |
|
|
|
} |
|
|
|
loadConfig(content) |
|
|
|
|
|
|
|
//fmt.Println(httpInbounds)
|
|
|
|
//fmt.Println(socksInbounds)
|
|
|
|
//fmt.Println(addOnInbounds)
|
|
|
|
loadProxy("/etc/xproxy/config", "/xproxy") |
|
|
|
|
|
|
|
//content, err := os.ReadFile("test.yml")
|
|
|
|
//if err != nil {
|
|
|
|
// panic(err)
|
|
|
|
//}
|
|
|
|
//loadConfig(content)
|
|
|
|
} |
|
|
|