mirror of
				https://github.com/e1732a364fed/v2ray_simple.git
				synced 2025-10-31 12:06:21 +08:00 
			
		
		
		
	修订代码, 默认loglevel 改为 Log_info.
对一般用户而言,还是需要使用Info等级 来了解一下 一般的 日志情况,等到使用熟练之后,且确认运行没有错误后, 可以自行调为 warning 来提升性能 发现 bubble包 还自己引入了 命令行参数,这十分不可取,所以我们还是直接使用其代码。 将其它包中 的 命令行参数 统一 移动 到 cmd/verysimple 中;tls lazy 特性因为还在 调试阶段,所以 命令行参数 仍然放到 v2ray_simple 包中。
This commit is contained in:
		| @@ -2,7 +2,6 @@ package netLayer | ||||
|  | ||||
| import ( | ||||
| 	_ "embed" | ||||
| 	"flag" | ||||
| 	"log" | ||||
| 	"net" | ||||
| 	"os" | ||||
| @@ -16,14 +15,9 @@ var ( | ||||
| 	the_geoipdb *maxminddb.Reader | ||||
| 	embedGeoip  bool | ||||
|  | ||||
| 	GeoipFileName string //若运行程序指定了 geoip 参数,则该值为给定值;否则默认会被init为 GeoLite2-Country.mmdb | ||||
| 	GeoipFileName string | ||||
| ) | ||||
|  | ||||
| func init() { | ||||
| 	flag.StringVar(&GeoipFileName, "geoip", "GeoLite2-Country.mmdb", "geoip maxmind file name") | ||||
|  | ||||
| } | ||||
|  | ||||
| func HasEmbedGeoip() bool { | ||||
| 	return embedGeoip | ||||
| } | ||||
| @@ -42,7 +36,7 @@ func LoadMaxmindGeoipFile(fn string) { | ||||
| 	if fn == "" { | ||||
| 		fn = GeoipFileName | ||||
| 	} | ||||
| 	if fn == "" { //因为 GeoipFileName 是共有变量,所以可能会被设成"", 不排除脑残 | ||||
| 	if fn == "" { //因为 GeoipFileName 是公有变量,所以可能会被设成"" | ||||
| 		return | ||||
| 	} | ||||
| 	bs, e := os.ReadFile(fn) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 e1732a364fed
					e1732a364fed