Xray-core/proxy/socks/config.proto

48 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2020-11-25 13:01:53 +02:00
syntax = "proto3";
package xray.proxy.socks;
option csharp_namespace = "Xray.Proxy.Socks";
2020-12-04 03:36:16 +02:00
option go_package = "github.com/xtls/xray-core/proxy/socks";
2020-11-25 13:01:53 +02:00
option java_package = "com.xray.proxy.socks";
option java_multiple_files = true;
import "common/net/address.proto";
import "common/protocol/server_spec.proto";
// Account represents a Socks account.
message Account {
string username = 1;
string password = 2;
}
// AuthType is the authentication type of Socks proxy.
enum AuthType {
2024-07-12 01:20:06 +03:00
// NO_AUTH is for anonymous authentication.
2020-11-25 13:01:53 +02:00
NO_AUTH = 0;
// PASSWORD is for username/password authentication.
PASSWORD = 1;
}
2021-09-16 09:42:12 +03:00
enum Version {
SOCKS5 = 0;
SOCKS4 = 1;
SOCKS4A = 2;
}
2020-11-25 13:01:53 +02:00
// ServerConfig is the protobuf config for Socks server.
message ServerConfig {
AuthType auth_type = 1;
map<string, string> accounts = 2;
xray.common.net.IPOrDomain address = 3;
bool udp_enabled = 4;
uint32 timeout = 5 [deprecated = true];
uint32 user_level = 6;
}
// ClientConfig is the protobuf config for Socks client.
message ClientConfig {
// Sever is a list of Socks server addresses.
repeated xray.common.protocol.ServerEndpoint server = 1;
2021-09-16 09:42:12 +03:00
Version version = 2;
2020-11-25 13:01:53 +02:00
}