Skip to content

Commit

Permalink
remove unused inboundsSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
xxf098 committed Jan 19, 2020
1 parent bad6b2c commit 204b438
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions tun2socks.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ func loadVmessConfig(profile *Vmess) (*conf.Config, error) {
},
// &conf.NameServerConfig{Address: &conf.Address{vnet.IPAddress([]byte{8, 8, 8, 8})}, Port: 53},
// &conf.NameServerConfig{Address: &conf.Address{vnet.IPAddress([]byte{1, 1, 1, 1})}, Port: 53},
// &conf.NameServerConfig{Address: &conf.Address{vnet.IPAddress([]byte{9, 9, 9, 9})}, Port: 53},
&conf.NameServerConfig{Address: &conf.Address{vnet.IPAddress([]byte{127, 0, 0, 1})}, Port: 53},
// &conf.NameServerConfig{Address: &conf.Address{vnet.DomainAddress("localhost")}, Port: 53},
},
Expand All @@ -218,27 +217,27 @@ func loadVmessConfig(profile *Vmess) (*conf.Config, error) {
DomainStrategy: &domainStrategy,
RuleList: []json.RawMessage{json.RawMessage(rule1), json.RawMessage(rule2), json.RawMessage(rule3)},
}
inboundsSettings, _ := json.Marshal(v2ray.InboundsSettings{
Auth: "noauth",
IP: "127.0.0.1",
UDP: true,
})
inboundsSettingsMsg := json.RawMessage(inboundsSettings)
jsonConfig.InboundConfigs = []conf.InboundDetourConfig{
conf.InboundDetourConfig{
Tag: "socks-in",
Protocol: "socks",
PortRange: &conf.PortRange{From: 8088, To: 8088},
ListenOn: &conf.Address{vnet.IPAddress([]byte{127, 0, 0, 1})},
Settings: &inboundsSettingsMsg,
},
// conf.InboundDetourConfig{
// Tag: "http-in",
// Protocol: "http",
// PortRange: &conf.PortRange{From: 8090, To: 8090},
// ListenOn: &conf.Address{vnet.IPAddress([]byte{127, 0, 0, 1})},
// },
}
// inboundsSettings, _ := json.Marshal(v2ray.InboundsSettings{
// Auth: "noauth",
// IP: "127.0.0.1",
// UDP: true,
// })
// inboundsSettingsMsg := json.RawMessage(inboundsSettings)
// jsonConfig.InboundConfigs = []conf.InboundDetourConfig{
// conf.InboundDetourConfig{
// Tag: "socks-in",
// Protocol: "socks",
// PortRange: &conf.PortRange{From: 8088, To: 8088},
// ListenOn: &conf.Address{vnet.IPAddress([]byte{127, 0, 0, 1})},
// Settings: &inboundsSettingsMsg,
// },
// conf.InboundDetourConfig{
// Tag: "http-in",
// Protocol: "http",
// PortRange: &conf.PortRange{From: 8090, To: 8090},
// ListenOn: &conf.Address{vnet.IPAddress([]byte{127, 0, 0, 1})},
// },
// }
vmessOutboundDetourConfig := createVmessOutboundDetourConfig(profile)
// second
outboundsSettings2, _ := json.Marshal(v2ray.OutboundsSettings{DomainStrategy: "UseIP"})
Expand Down

0 comments on commit 204b438

Please sign in to comment.