config.proto 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. syntax = "proto3";
  2. package xray.proxy.socks;
  3. option csharp_namespace = "Xray.Proxy.Socks";
  4. option go_package = "github.com/xtls/xray-core/proxy/socks";
  5. option java_package = "com.xray.proxy.socks";
  6. option java_multiple_files = true;
  7. import "common/net/address.proto";
  8. import "common/protocol/server_spec.proto";
  9. // Account represents a Socks account.
  10. message Account {
  11. string username = 1;
  12. string password = 2;
  13. }
  14. // AuthType is the authentication type of Socks proxy.
  15. enum AuthType {
  16. // NO_AUTH is for anonymous authentication.
  17. NO_AUTH = 0;
  18. // PASSWORD is for username/password authentication.
  19. PASSWORD = 1;
  20. }
  21. // ServerConfig is the protobuf config for Socks server.
  22. message ServerConfig {
  23. AuthType auth_type = 1;
  24. map<string, string> accounts = 2;
  25. xray.common.net.IPOrDomain address = 3;
  26. bool udp_enabled = 4;
  27. uint32 user_level = 6;
  28. }
  29. // ClientConfig is the protobuf config for Socks client.
  30. message ClientConfig {
  31. // Sever is a list of Socks server addresses.
  32. repeated xray.common.protocol.ServerEndpoint server = 1;
  33. }