Skip to main content
paqet uses a unified YAML configuration approach that supports both client and server modes through a single configuration structure.

Configuration File Structure

All paqet configuration is defined in YAML format with the following top-level structure:
role: "client"  # or "server"
log:
  level: "info"
network:
  # Network interface settings
transport:
  # Transport protocol configuration

Role Field Requirement

The role field is required in all configuration files and must be explicitly set to either "client" or "server".
The role determines which configuration sections are active:
  • Client mode: Requires socks5 or forward sections, plus server connection details
  • Server mode: Requires listen section for incoming connections
Both modes require network and transport configuration.

Specifying Configuration

Use the -c flag to specify your configuration file when starting paqet:
# Start client
paqet -c client.yaml

# Start server
paqet -c server.yaml

Configuration Sections

The configuration file is organized into several sections:

Logging

Control log output levels (none, debug, info, warn, error, fatal)

Network

Network interface, IPv4/IPv6 addresses, MAC addresses, TCP flags, and PCAP settings

Transport

Protocol selection, connection pooling, buffer sizes, and KCP configuration

Encryption

Encryption algorithms and keys for secure communication

Client-Specific Sections

  • socks5: SOCKS5 proxy server configuration
  • forward: Port forwarding rules
  • server: Connection details for the paqet server

Server-Specific Sections

  • listen: Server listening address and port

Configuration Examples

Complete configuration examples are provided:

Configuration Validation

paqet validates all configuration on startup and will report detailed error messages if any issues are found:
validation failed:
  - network interface is required
  - KCP encryption key is required
Many configuration parameters have sensible defaults and can be omitted. See the client and server reference pages for default values.

Next Steps

Client Configuration

Configure paqet client with SOCKS5 and forwarding

Server Configuration

Set up paqet server for incoming connections

Transport Settings

Optimize KCP protocol for your network

Encryption

Secure your connection with encryption

Build docs developers (and LLMs) love