@@ -105,6 +105,11 @@ func getOUt(peer *config.Peer) option.Outbound {
105
105
func Client (gamePeer , httpPeer * config.Peer , proxyDNS , localDNS string , rules []option.Rule ) (* box.Box , error ) {
106
106
home , _ := os .UserHomeDir ()
107
107
proxyOut := getOUt (gamePeer )
108
+ httpOut := proxyOut
109
+ if httpPeer != nil {
110
+ httpOut = getOUt (httpPeer )
111
+ }
112
+ httpOut .Tag = "http"
108
113
proxyOut .Tag = "proxy"
109
114
options := box.Options {
110
115
Context : context .Background (),
@@ -205,13 +210,13 @@ func Client(gamePeer, httpPeer *config.Peer, proxyDNS, localDNS string, rules []
205
210
AutoDetectInterface : true ,
206
211
GeoIP : & option.GeoIPOptions {
207
212
Path : fmt .Sprintf ("%s%c%s%c%s" , home , os .PathSeparator , ".gpp" , os .PathSeparator , "geoip.db" ),
208
- DownloadURL : "https://ghp.ci/https:// github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db" ,
209
- DownloadDetour : "direct " ,
213
+ DownloadURL : "https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db" ,
214
+ DownloadDetour : "http " ,
210
215
},
211
216
Geosite : & option.GeositeOptions {
212
217
Path : fmt .Sprintf ("%s%c%s%c%s" , home , os .PathSeparator , ".gpp" , os .PathSeparator , "geosite.db" ),
213
- DownloadURL : "https://ghp.ci/https:// github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db" ,
214
- DownloadDetour : "direct " ,
218
+ DownloadURL : "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db" ,
219
+ DownloadDetour : "http " ,
215
220
},
216
221
Rules : []option.Rule {
217
222
{
@@ -320,10 +325,9 @@ func Client(gamePeer, httpPeer *config.Peer, proxyDNS, localDNS string, rules []
320
325
options .Options .Route .Rules = append (options .Options .Route .Rules , rules ... )
321
326
// http
322
327
if httpPeer != nil && httpPeer .Name != gamePeer .Name {
323
- out := getOUt (httpPeer )
324
- options .Options .Outbounds = append (options .Options .Outbounds , out )
325
- options .Options .Route .Rules = append (options .Options .Route .Rules , option.Rule {Type : "default" , DefaultOptions : option.DefaultRule {Protocol : option.Listable [string ]{"http" }, Outbound : out .Tag }})
326
- options .Options .Route .Rules = append (options .Options .Route .Rules , option.Rule {Type : "default" , DefaultOptions : option.DefaultRule {Network : option.Listable [string ]{"tcp" }, Port : []uint16 {80 , 443 , 8080 , 8443 }, Outbound : out .Tag }})
328
+ options .Options .Outbounds = append (options .Options .Outbounds , httpOut )
329
+ options .Options .Route .Rules = append (options .Options .Route .Rules , option.Rule {Type : "default" , DefaultOptions : option.DefaultRule {Protocol : option.Listable [string ]{"http" }, Outbound : httpOut .Tag }})
330
+ options .Options .Route .Rules = append (options .Options .Route .Rules , option.Rule {Type : "default" , DefaultOptions : option.DefaultRule {Network : option.Listable [string ]{"tcp" }, Port : []uint16 {80 , 443 , 8080 , 8443 }, Outbound : httpOut .Tag }})
327
331
}
328
332
if config .Debug .Load () {
329
333
options .Log = & option.LogOptions {
0 commit comments