Skip to main content

Client configuration

Configuration file:

  • Linux/macOS: /etc/tungo/client_configuration.json
  • Windows: %ProgramData%\TunGo\client_configuration.json

Restart the client after making changes.

Full example​

The client configuration is generated by the server. You can customize it if needed.

client_configuration.json
{
"ClientID": 1, // Client ID assigned by the server
"Protocol": "UDP", // Active transport: TCP, UDP, WS or WSS

// TCPSettings — TCP settings
"TCPSettings": {
"TunName": "c_tcptun0", // TUN interface name
"IPv4Subnet": "10.0.0.0/24", // IPv4 tunnel subnet
"IPv6Subnet": "fd00::/64", // IPv6 tunnel subnet; no IPv6 in the tunnel if omitted
"Server": { "IPv4": "192.0.2.1" }, // Server address; Domain or IPv6 can also be used instead of IPv4
"Port": 8080, // Server port to connect to
"DNSv4": ["1.1.1.1", "8.8.8.8"], // IPv4 DNS servers; optional, defaults shown
"DNSv6": ["2606:4700:4700::1111", "2001:4860:4860::8888"], // IPv6 DNS servers; optional, defaults shown
"MTU": 1500, // Tunnel MTU in bytes
"Protocol": "TCP", // Profile transport; top-level Protocol selects the active transport
"Encryption": "ChaCha20Poly1305", // Encryption algorithm
"DialTimeoutMs": 5000 // Connection timeout in milliseconds
},

// UDPSettings — UDP settings
"UDPSettings": {
"TunName": "c_udptun0", // TUN interface name
"IPv4Subnet": "10.0.1.0/24", // IPv4 tunnel subnet
"IPv6Subnet": "fd00:1::/64", // IPv6 tunnel subnet; no IPv6 in the tunnel if omitted
"Server": { "IPv4": "192.0.2.1" }, // Server address; Domain or IPv6 can also be used instead of IPv4
"Port": 9090, // Server port to connect to
"DNSv4": ["1.1.1.1", "8.8.8.8"], // IPv4 DNS servers; optional, defaults shown
"DNSv6": ["2606:4700:4700::1111", "2001:4860:4860::8888"], // IPv6 DNS servers; optional, defaults shown
"MTU": 1500, // Tunnel MTU in bytes
"Protocol": "UDP", // Profile transport; top-level Protocol selects the active transport
"Encryption": "ChaCha20Poly1305", // Encryption algorithm
"DialTimeoutMs": 5000 // Connection timeout in milliseconds
},

// WSSettings — WebSocket settings for WS and WSS
"WSSettings": {
"TunName": "c_wstun0", // TUN interface name
"IPv4Subnet": "10.0.2.0/24", // IPv4 tunnel subnet
"IPv6Subnet": "fd00:2::/64", // IPv6 tunnel subnet; no IPv6 in the tunnel if omitted
"Server": { "IPv4": "192.0.2.1" }, // Server address; Domain or IPv6 can also be used instead of IPv4
"Port": 1010, // Server port to connect to
"DNSv4": ["1.1.1.1", "8.8.8.8"], // IPv4 DNS servers; optional, defaults shown
"DNSv6": ["2606:4700:4700::1111", "2001:4860:4860::8888"], // IPv6 DNS servers; optional, defaults shown
"MTU": 1500, // Tunnel MTU in bytes
"Protocol": "WS", // Profile transport; top-level Protocol selects the active transport
"Encryption": "ChaCha20Poly1305", // Encryption algorithm
"DialTimeoutMs": 5000 // Connection timeout in milliseconds
},

"X25519PublicKey": "<server-public-key>", // Server public key from the generated configuration
"ClientPublicKey": "<client-public-key>", // Client public key registered on the server
"ClientPrivateKey": "<client-private-key>", // Client private key from the generated configuration

// IPv4 destination subnets routed through the VPN; full tunnel here
"TunnelRoutesV4": ["0.0.0.0/1", "128.0.0.0/1"],
// IPv6 destination subnets routed through the VPN; full tunnel here
"TunnelRoutesV6": ["::/1", "8000::/1"]
}