chore: add vmess, shadowsocks, tcptun and udptun listener

This commit is contained in:
wwqgtxx
2022-11-11 20:56:08 +08:00
parent 6dadc2357a
commit 3eacce9a66
10 changed files with 796 additions and 58 deletions

View File

@ -105,14 +105,18 @@ func GetGeneral() *config.General {
general := &config.General{
Inbound: config.Inbound{
Port: ports.Port,
SocksPort: ports.SocksPort,
RedirPort: ports.RedirPort,
TProxyPort: ports.TProxyPort,
MixedPort: ports.MixedPort,
Authentication: authenticator,
AllowLan: P.AllowLan(),
BindAddress: P.BindAddress(),
Port: ports.Port,
SocksPort: ports.SocksPort,
RedirPort: ports.RedirPort,
TProxyPort: ports.TProxyPort,
MixedPort: ports.MixedPort,
ShadowSocksConfig: ports.ShadowSocksConfig,
VmessConfig: ports.VmessConfig,
TcpTunConfig: ports.TcpTunConfig,
UdpTunConfig: ports.UdpTunConfig,
Authentication: authenticator,
AllowLan: P.AllowLan(),
BindAddress: P.BindAddress(),
},
Mode: tunnel.Mode(),
LogLevel: log.Level(),
@ -342,6 +346,10 @@ func updateGeneral(general *config.General, force bool) {
P.ReCreateAutoRedir(general.EBpf.AutoRedir, tcpIn, udpIn)
P.ReCreateTProxy(general.TProxyPort, tcpIn, udpIn)
P.ReCreateMixed(general.MixedPort, tcpIn, udpIn)
P.ReCreateShadowSocks(general.ShadowSocksConfig, tcpIn, udpIn)
P.ReCreateVmess(general.VmessConfig, tcpIn, udpIn)
P.ReCreateTcpTun(general.TcpTunConfig, tcpIn, udpIn)
P.ReCreateUdpTun(general.UdpTunConfig, tcpIn, udpIn)
}
func updateUsers(users []auth.AuthUser) {