mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-10-25 09:40:24 +08:00
添加自定义网络层功能;添加udp网络层支持
配置中,listen和dial中,可添加 network = "udp" 字段,不添加则默认tcp
This commit is contained in:
@@ -231,8 +231,9 @@ func configCommon(ser ProxyCommon, cc *CommonConf) {
|
||||
|
||||
}
|
||||
|
||||
//setIsDial(true),setDialConf(dc), call configCommon
|
||||
//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)
|
||||
@@ -244,8 +245,9 @@ func configCommonForClient(cli ProxyCommon, dc *DialConf) {
|
||||
}
|
||||
}
|
||||
|
||||
//setTag, setCantRoute,setListenConf(lc), call configCommon
|
||||
//setNetwork, setTag, setCantRoute,setListenConf(lc), call configCommon
|
||||
func configCommonForServer(ser ProxyCommon, lc *ListenConf) {
|
||||
ser.setNetwork(lc.Network)
|
||||
ser.setListenConf(lc)
|
||||
ser.setTag(lc.Tag)
|
||||
ser.setCantRoute(lc.NoRoute)
|
||||
|
||||
Reference in New Issue
Block a user