mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-05 17:13:32 +08:00
Merge remote-tracking branch 'clash/dev' into Alpha
# Conflicts: # Makefile
This commit is contained in:
commit
14a9087538
@ -136,6 +136,7 @@ func NewHttp(option HttpOption) *Http {
|
||||
addr: net.JoinHostPort(option.Server, strconv.Itoa(option.Port)),
|
||||
tp: C.Http,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
user: option.UserName,
|
||||
pass: option.Password,
|
||||
|
@ -160,6 +160,7 @@ func NewShadowSocks(option ShadowSocksOption) (*ShadowSocks, error) {
|
||||
tp: C.Shadowsocks,
|
||||
udp: option.UDP,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
cipher: ciph,
|
||||
|
||||
|
@ -142,6 +142,7 @@ func NewShadowSocksR(option ShadowSocksROption) (*ShadowSocksR, error) {
|
||||
tp: C.ShadowsocksR,
|
||||
udp: option.UDP,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
cipher: coreCiph,
|
||||
obfs: obfs,
|
||||
|
@ -142,6 +142,7 @@ func NewSnell(option SnellOption) (*Snell, error) {
|
||||
tp: C.Snell,
|
||||
udp: option.UDP,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
psk: psk,
|
||||
obfsOption: obfsOption,
|
||||
|
@ -154,6 +154,7 @@ func NewSocks5(option Socks5Option) *Socks5 {
|
||||
tp: C.Socks5,
|
||||
udp: option.UDP,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
user: option.UserName,
|
||||
pass: option.Password,
|
||||
|
@ -189,6 +189,7 @@ func NewTrojan(option TrojanOption) (*Trojan, error) {
|
||||
tp: C.Trojan,
|
||||
udp: option.UDP,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
instance: trojan.New(tOption),
|
||||
option: &option,
|
||||
|
@ -291,6 +291,7 @@ func NewVmess(option VmessOption) (*Vmess, error) {
|
||||
tp: C.Vmess,
|
||||
udp: option.UDP,
|
||||
iface: option.Interface,
|
||||
rmark: option.RoutingMark,
|
||||
},
|
||||
client: client,
|
||||
option: &option,
|
||||
|
@ -105,9 +105,9 @@ func resolveSocketByNetlink(network string, ip net.IP, srcPort int) (int32, int3
|
||||
return 0, 0, fmt.Errorf("netlink message: NLMSG_ERROR")
|
||||
}
|
||||
|
||||
uid, inode := unpackSocketDiagResponse(&messages[0])
|
||||
if uid < 0 || inode < 0 {
|
||||
return 0, 0, fmt.Errorf("invalid uid(%d) or inode(%d)", uid, inode)
|
||||
inode, uid := unpackSocketDiagResponse(&messages[0])
|
||||
if inode < 0 || uid < 0 {
|
||||
return 0, 0, fmt.Errorf("invalid inode(%d) or uid(%d)", inode, uid)
|
||||
}
|
||||
|
||||
return inode, uid, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user