feat: support tcp concurrent, Separate dialing and dns resolver ipv6

tcp-concurrent:true
This commit is contained in:
Skyxim
2022-04-23 00:27:22 +08:00
parent 2e1d9a4f2e
commit 81b5543b0d
6 changed files with 211 additions and 19 deletions

View File

@ -49,6 +49,7 @@ type General struct {
RoutingMark int `json:"-"`
GeodataMode bool `json:"geodata-mode"`
GeodataLoader string `json:"geodata-loader"`
TCPConcurrent bool `json:"tcp-concurrent"`
}
// Inbound config
@ -206,6 +207,7 @@ type RawConfig struct {
RoutingMark int `yaml:"routing-mark"`
GeodataMode bool `yaml:"geodata-mode"`
GeodataLoader string `yaml:"geodata-loader"`
TCPConcurrent bool `yaml:"tc-pconcurrent" json:"tc-pconcurrent"`
Sniffer SnifferRaw `yaml:"sniffer"`
ProxyProvider map[string]map[string]any `yaml:"proxy-providers"`
@ -256,6 +258,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
Rule: []string{},
Proxy: []map[string]any{},
ProxyGroup: []map[string]any{},
TCPConcurrent: false,
Tun: RawTun{
Enable: false,
Device: "",
@ -412,6 +415,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
RoutingMark: cfg.RoutingMark,
GeodataMode: cfg.GeodataMode,
GeodataLoader: cfg.GeodataLoader,
TCPConcurrent: cfg.TCPConcurrent,
}, nil
}