mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-10-08 02:00:33 +08:00
修订代码;将addr的赋值从各个proxy自己的方法中提出来
This commit is contained in:
@@ -231,13 +231,17 @@ func configCommon(ser ProxyCommon, cc *CommonConf) {
|
||||
|
||||
}
|
||||
|
||||
//setNetwork, setIsDial(true),setDialConf(dc), call configCommon
|
||||
//SetAddrStr, setNetwork, setIsDial(true),setDialConf(dc), call configCommon
|
||||
func configCommonForClient(cli ProxyCommon, dc *DialConf) {
|
||||
cli.setNetwork(dc.Network)
|
||||
cli.setIsDial(true)
|
||||
cli.setDialConf(dc)
|
||||
cli.setTag(dc.Tag)
|
||||
|
||||
if cli.Name() != "direct" {
|
||||
cli.SetAddrStr(dc.GetAddrStrForListenOrDial())
|
||||
}
|
||||
|
||||
configCommon(cli, &dc.CommonConf)
|
||||
|
||||
if dc.AdvancedLayer == "ws" {
|
||||
@@ -245,8 +249,9 @@ func configCommonForClient(cli ProxyCommon, dc *DialConf) {
|
||||
}
|
||||
}
|
||||
|
||||
//setNetwork, setTag, setCantRoute,setListenConf(lc), call configCommon
|
||||
//SetAddrStr,setNetwork, setTag, setCantRoute,setListenConf(lc), call configCommon
|
||||
func configCommonForServer(ser ProxyCommon, lc *ListenConf) {
|
||||
ser.SetAddrStr(lc.GetAddrStrForListenOrDial())
|
||||
ser.setNetwork(lc.Network)
|
||||
ser.setListenConf(lc)
|
||||
ser.setTag(lc.Tag)
|
||||
|
Reference in New Issue
Block a user