mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-12-24 13:27:56 +08:00
该不可用bug是从1.1.9开始的, 当时重构后没有对tproxy进行测试,导致遗留一个很笨的bug. 之前的tproxy不支持分流。实际上是可以分流的。这里改动了一下函数签名,新增 *netLayer.RoutePolicy 参数, 就支持了分流。
18 lines
462 B
Go
18 lines
462 B
Go
//go:build !linux
|
|
// +build !linux
|
|
|
|
package v2ray_simple
|
|
|
|
import (
|
|
"github.com/e1732a364fed/v2ray_simple/netLayer"
|
|
"github.com/e1732a364fed/v2ray_simple/netLayer/tproxy"
|
|
"github.com/e1732a364fed/v2ray_simple/proxy"
|
|
"github.com/e1732a364fed/v2ray_simple/utils"
|
|
)
|
|
|
|
//非阻塞。在非linux系统中无效。
|
|
func ListenTproxy(string, proxy.Client, *netLayer.RoutePolicy) (_ *tproxy.Machine) {
|
|
utils.Error("Tproxy not possible on non-linux device")
|
|
return
|
|
}
|