mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
fix: vless tcp not working
This commit is contained in:
parent
59a4c96fcb
commit
316522de53
|
@ -173,12 +173,12 @@ func (v *Vless) StreamConn(c net.Conn, metadata *C.Metadata) (net.Conn, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Vless) streamConn(c net.Conn, metadata *C.Metadata) (conn net.Conn, err error) {
|
func (v *Vless) streamConn(c net.Conn, metadata *C.Metadata) (conn net.Conn, err error) {
|
||||||
|
if metadata.NetWork == C.UDP {
|
||||||
metadata = &C.Metadata{ // a clear metadata only contains ip
|
metadata = &C.Metadata{ // a clear metadata only contains ip
|
||||||
NetWork: metadata.NetWork,
|
NetWork: metadata.NetWork,
|
||||||
DstIP: metadata.DstIP,
|
DstIP: metadata.DstIP,
|
||||||
DstPort: metadata.DstPort,
|
DstPort: metadata.DstPort,
|
||||||
}
|
}
|
||||||
if metadata.NetWork == C.UDP {
|
|
||||||
if v.option.PacketAddr {
|
if v.option.PacketAddr {
|
||||||
metadata = &C.Metadata{
|
metadata = &C.Metadata{
|
||||||
NetWork: C.UDP,
|
NetWork: C.UDP,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user