mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
add packet encoding support in simplified socks5 server config
This commit is contained in:
parent
31d248aac7
commit
e7ffcfd4f6
@ -12,9 +12,10 @@ func init() {
|
|||||||
common.Must(common.RegisterConfig((*ServerConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
|
common.Must(common.RegisterConfig((*ServerConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
|
||||||
simplifiedServer := config.(*ServerConfig)
|
simplifiedServer := config.(*ServerConfig)
|
||||||
fullServer := &socks.ServerConfig{
|
fullServer := &socks.ServerConfig{
|
||||||
AuthType: socks.AuthType_NO_AUTH,
|
AuthType: socks.AuthType_NO_AUTH,
|
||||||
Address: simplifiedServer.Address,
|
Address: simplifiedServer.Address,
|
||||||
UdpEnabled: simplifiedServer.UdpEnabled,
|
UdpEnabled: simplifiedServer.UdpEnabled,
|
||||||
|
PacketEncoding: simplifiedServer.PacketEncoding,
|
||||||
}
|
}
|
||||||
return common.CreateObject(ctx, fullServer)
|
return common.CreateObject(ctx, fullServer)
|
||||||
}))
|
}))
|
||||||
|
@ -8,6 +8,7 @@ option java_multiple_files = true;
|
|||||||
|
|
||||||
import "common/protoext/extensions.proto";
|
import "common/protoext/extensions.proto";
|
||||||
import "common/net/address.proto";
|
import "common/net/address.proto";
|
||||||
|
import "common/net/packetaddr/config.proto";
|
||||||
|
|
||||||
message ServerConfig{
|
message ServerConfig{
|
||||||
option (v2ray.core.common.protoext.message_opt).type = "inbound";
|
option (v2ray.core.common.protoext.message_opt).type = "inbound";
|
||||||
@ -15,6 +16,7 @@ message ServerConfig{
|
|||||||
|
|
||||||
v2ray.core.common.net.IPOrDomain address = 3;
|
v2ray.core.common.net.IPOrDomain address = 3;
|
||||||
bool udp_enabled = 4;
|
bool udp_enabled = 4;
|
||||||
|
v2ray.core.net.packetaddr.PacketAddrType packet_encoding = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ClientConfig {
|
message ClientConfig {
|
||||||
|
Loading…
Reference in New Issue
Block a user