full.toml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [client]
  2. remote_addr = "example.com:2333" # Necessary. The address of the server
  3. default_token = "default_token_if_not_specify" # Optional. The default token of services, if they don't define their own ones
  4. [client.transport]
  5. type = "tcp" # Optional. Possible values: ["tcp", "tls"]. Default: "tcp"
  6. [client.transport.tls] # Necessary if `type` is "tls"
  7. trusted_root = "ca.pem" # Necessary. The certificate of CA that signed the server's certificate
  8. hostname = "example.com" # Optional. The hostname that the client uses to validate the certificate. If not set, fallback to `client.remote_addr`
  9. [client.transport.noise] # Noise protocol. See `docs/security.md` for further explanation
  10. pattern = "Noise_NK_25519_ChaChaPoly_BLAKE2s" # Optional. Default value as shown
  11. local_private_key = "key_encoded_in_base64" # Optional
  12. remote_public_key = "key_encoded_in_base64" # Optional
  13. [client.services.service1] # A service that needs forwarding. The name `service1` can change arbitrarily, as long as identical to the name in the server's configuration
  14. type = "tcp" # Optional. The protocol that needs forwarding. Possible values: ["tcp", "udp"]. Default: "tcp"
  15. token = "whatever" # Necessary if `client.default_token` not set
  16. local_addr = "127.0.0.1:1081" # Necessary. The address of the service that needs to be forwarded
  17. [client.services.service2] # Multiple services can be defined
  18. local_addr = "127.0.0.1:1082"
  19. [server]
  20. bind_addr = "0.0.0.0:2333" # Necessary. The address that the server listens for clients. Generally only the port needs to be change.
  21. default_token = "default_token_if_not_specify" # Optional
  22. [server.transport]
  23. type = "tcp" # Same as `[client.transport]`
  24. [server.transport.tls] # Necessary if `type` is "tls"
  25. pkcs12 = "identify.pfx" # Necessary. pkcs12 file of server's certificate and private key
  26. pkcs12_password = "password" # Necessary. Password of the pkcs12 file
  27. [server.transport.noise] # Same as `[client.transport.noise]`
  28. pattern = "Noise_NK_25519_ChaChaPoly_BLAKE2s"
  29. local_private_key = "key_encoded_in_base64"
  30. remote_public_key = "key_encoded_in_base64"
  31. [server.services.service1] # The service name must be identical to the client side
  32. type = "tcp" # Optional. Same as the client `[client.services.X.type]
  33. token = "whatever" # Necesary if `server.default_token` not set
  34. bind_addr = "0.0.0.0:8081" # Necessary. The address of the service is exposed at. Generally only the port needs to be change.
  35. [server.services.service2]
  36. bind_addr = "0.0.0.1:8082"