1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-12 19:00:43 +00:00

add packet encoding support in simplified socks5 server config

This commit is contained in:
Shelikhoo 2021-12-19 21:12:27 +00:00 committed by Xiaokang Wang (Shelikhoo)
parent 31d248aac7
commit e7ffcfd4f6
2 changed files with 6 additions and 3 deletions

View File

@ -12,9 +12,10 @@ func init() {
common.Must(common.RegisterConfig((*ServerConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
simplifiedServer := config.(*ServerConfig)
fullServer := &socks.ServerConfig{
AuthType: socks.AuthType_NO_AUTH,
Address: simplifiedServer.Address,
UdpEnabled: simplifiedServer.UdpEnabled,
AuthType: socks.AuthType_NO_AUTH,
Address: simplifiedServer.Address,
UdpEnabled: simplifiedServer.UdpEnabled,
PacketEncoding: simplifiedServer.PacketEncoding,
}
return common.CreateObject(ctx, fullServer)
}))

View File

@ -8,6 +8,7 @@ option java_multiple_files = true;
import "common/protoext/extensions.proto";
import "common/net/address.proto";
import "common/net/packetaddr/config.proto";
message ServerConfig{
option (v2ray.core.common.protoext.message_opt).type = "inbound";
@ -15,6 +16,7 @@ message ServerConfig{
v2ray.core.common.net.IPOrDomain address = 3;
bool udp_enabled = 4;
v2ray.core.net.packetaddr.PacketAddrType packet_encoding = 7;
}
message ClientConfig {