config.proto 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 anounymous 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 timeout = 5 [deprecated = true];
  28. uint32 user_level = 6;
  29. }
  30. // ClientConfig is the protobuf config for Socks client.
  31. message ClientConfig {
  32. // Sever is a list of Socks server addresses.
  33. repeated xray.common.protocol.ServerEndpoint server = 1;
  34. }