Skip to content

Commit

Permalink
GFWList mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xxf098 committed Mar 16, 2020
1 parent 432adc6 commit ede7cb2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 0 additions & 3 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ func createRouterConfig(routeMode int) *conf.RouterConfig {
json.RawMessage(googleAPI),
json.RawMessage(blockDomain),
json.RawMessage(gfwList),
json.RawMessage(bypassLAN),
json.RawMessage(bypassChinaSite),
json.RawMessage(bypassChinaIP),
}
}
if routeMode == 5 {
Expand Down
14 changes: 11 additions & 3 deletions tun2socks.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,17 @@ func loadVmessConfig(profile *Vmess) (*conf.Config, error) {
vmessOutboundDetourConfig := createVmessOutboundDetourConfig(profile)
freedomOutboundDetourConfig := createFreedomOutboundDetourConfig()
// order matters
jsonConfig.OutboundConfigs = []conf.OutboundDetourConfig{
vmessOutboundDetourConfig,
freedomOutboundDetourConfig,
// GFWList mode, use 'direct' as default
if profile.RouteMode == 4 {
jsonConfig.OutboundConfigs = []conf.OutboundDetourConfig{
freedomOutboundDetourConfig,
vmessOutboundDetourConfig,
}
} else {
jsonConfig.OutboundConfigs = []conf.OutboundDetourConfig{
vmessOutboundDetourConfig,
freedomOutboundDetourConfig,
}
}
// stats
jsonConfig.Stats = &conf.StatsConfig{}
Expand Down

0 comments on commit ede7cb2

Please sign in to comment.