mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 21:51:23 +08:00
b15344ec78
1.allow maybe empty group 2.use COMPATIBLE(DIRECT alias) when proxy group is empty 3.http provider pass through tunnel
21 lines
364 B
Go
21 lines
364 B
Go
package inner
|
|
|
|
import (
|
|
"github.com/Dreamacro/clash/adapter/inbound"
|
|
C "github.com/Dreamacro/clash/constant"
|
|
"net"
|
|
)
|
|
|
|
var tcpIn chan<- C.ConnContext
|
|
|
|
func New(in chan<- C.ConnContext) {
|
|
tcpIn = in
|
|
}
|
|
|
|
func HandleTcp(dst string, host string) net.Conn {
|
|
conn1, conn2 := net.Pipe()
|
|
context := inbound.NewInner(conn2, dst, host)
|
|
tcpIn <- context
|
|
return conn1
|
|
}
|