mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-12-24 13:27:56 +08:00
修订代码,文档,示例
This commit is contained in:
@@ -105,6 +105,28 @@ func printSupportedProtocols() {
|
||||
advLayer.PrintAllProtocolNames()
|
||||
}
|
||||
|
||||
func printAllState(w io.Writer, withoutTProxy bool) {
|
||||
fmt.Fprintln(w, "activeConnectionCount", vs.ActiveConnectionCount)
|
||||
fmt.Fprintln(w, "allDownloadBytesSinceStart", vs.AllDownloadBytesSinceStart)
|
||||
fmt.Fprintln(w, "allUploadBytesSinceStart", vs.AllUploadBytesSinceStart)
|
||||
|
||||
for i, s := range allServers {
|
||||
fmt.Fprintln(w, "inServer", i, proxy.GetFullName(s), s.AddrStr())
|
||||
|
||||
}
|
||||
|
||||
if !withoutTProxy && len(tproxyList) > 0 {
|
||||
for i, tc := range tproxyList {
|
||||
fmt.Fprintln(w, "inServer", i+len(allServers), "tproxy", tc.String())
|
||||
}
|
||||
}
|
||||
|
||||
for i, c := range allClients {
|
||||
fmt.Fprintln(w, "outClient", i, proxy.GetFullName(c), c.AddrStr())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//see https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en
|
||||
func tryDownloadMMDB() {
|
||||
fp := utils.GetFilePath(netLayer.GeoipFileName)
|
||||
@@ -171,28 +193,6 @@ func tryDownloadMMDB() {
|
||||
|
||||
}
|
||||
|
||||
func printAllState(w io.Writer, withoutTProxy bool) {
|
||||
fmt.Fprintln(w, "activeConnectionCount", vs.ActiveConnectionCount)
|
||||
fmt.Fprintln(w, "allDownloadBytesSinceStart", vs.AllDownloadBytesSinceStart)
|
||||
fmt.Fprintln(w, "allUploadBytesSinceStart", vs.AllUploadBytesSinceStart)
|
||||
|
||||
for i, s := range allServers {
|
||||
fmt.Fprintln(w, "inServer", i, proxy.GetFullName(s), s.AddrStr())
|
||||
|
||||
}
|
||||
|
||||
if !withoutTProxy && len(tproxyList) > 0 {
|
||||
for i, tc := range tproxyList {
|
||||
fmt.Fprintln(w, "inServer", i+len(allServers), "tproxy", tc.String())
|
||||
}
|
||||
}
|
||||
|
||||
for i, c := range allClients {
|
||||
fmt.Fprintln(w, "outClient", i, proxy.GetFullName(c), c.AddrStr())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//试图从自己已经配置好的节点去下载geosite源码文件, 如果没有节点则直连下载。
|
||||
// 我们只需要一个dial配置即可. listen我们不使用配置文件的配置,而是自行监听一个随机端口用于http代理
|
||||
func tryDownloadGeositeSource() {
|
||||
|
||||
Reference in New Issue
Block a user