Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: correct grammatical and formatting errors in the gaming-oriented-routing document #548

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 74 additions & 58 deletions docs/en/configuration/gaming-oriented-routing.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,88 @@
DAE Config (e.g. /etc/dae/config.dae)
# Routing Configuration for Gaming

DSCP allows network devices to prioritize tagged packets, ensuring that gaming traffic isn’t delayed by other data on the network. For gaming, where low latency and stable connections are critical, combine DSCP and VPN can help minimize these issues.

By using DSCP tagging and VPN tunnels for gaming traffic, this setup can achieve the following:

- Prioritize gaming traffic to reduce latency and jitter.
- Ensure secure data transmission, bypassing ISP throttling and traffic management.
- Adapt to various VPN protocols, making it versatile for different network environments.

### DAE Configuration (e.g., /etc/dae/config.dae)
This setup optimizes routing specifically for gaming, aiming to minimize latency and enhance speed by avoiding proxies and leveraging direct routes with fwmark. The configuration is designed to prioritize gaming traffic efficiently.

```
routing {
#stop using low efficiency socks5 proxy or else
#dscp(8) -> game

#using fw mark for ultra fast gaming experience
dscp(8) -> direct(mark:0x800)
# Direct all gaming traffic for low latency
# Set DSCP mark for prioritized gaming traffic
dscp(8) -> direct(mark:0x800)
}

```

OpenWRT Network Config (e.g. /etc/config/network)
### OpenWRT Network Config (e.g. /etc/config/network)
This example configures a WireGuard tunnel in OpenWRT to provide an optimized route for gaming traffic. Select the appropriate MTU value based on game requirements (e.g., CS2 requires MTU > 1300 for proper UDP Ping functionality).

```
config interface 'wg100'
option proto 'wireguard'
option private_key '[Client Private Key]'
list addresses '10.7.0.2/24'
list addresses 'fd42:42:42::2/64'
option mtu '1420'

config wireguard_wg100
option public_key '[Server Public Key]'
option endpoint_host '[Your Server IP]'
list allowed_ips '0.0.0.0/0'
list allowed_ips '::/0'

# IPv4 Route for gaming traffic
config route
option interface 'wg100'
option target '0.0.0.0/0'
option gateway '10.7.0.1'
option table '114'

Please choose the tunnel MTU carefully (CS2 Require MTU > 1300 due to UDP Ping (1300 bytes))
# IPv6 Route for gaming traffic
config route6
option interface 'wg100'
option target '::/0'
option gateway 'fd42:42:42::1'
option table '114'

# IPv4 Rule for gaming traffic using fwmark
config rule
option lookup '114'
option mark '0x800/0x800'

# IPv6 Rule for gaming traffic using fwmark
config rule6
option lookup '114'
option mark '0x800/0x800'
```
config interface 'wg100'
option proto 'wireguard'
option private_key '[Client Private Key]'
list addresses '10.7.0.2/24'
list addresses 'fd42:42:42::2/64'
option mtu '1420'

config wireguard_wg100
option public_key '[Server Public Key]'
option endpoint_host '[Your Server IP]'
list allowed_ips '0.0.0.0/0'
list allowed_ips '::/0'

config route
option interface 'wg100'
option target '0.0.0.0/0'
option gateway '10.7.0.1'
option table '114'

config route6
option interface 'wg100'
option target '::/0'
option gateway 'fd42:42:42::1'
option table '114'

config rule
option lookup '114'
option mark '0x800/0x800'

config rule6
option lookup '114'
option mark '0x800/0x800'

### OpenWRT Firewall Config (e.g. /etc/config/firewall)
This firewall configuration ensures that gaming traffic from a specific device (e.g., Gaming PC) is correctly translated within the VPN environment, both for IPv4 and IPv6.

```
# IPv4 NAT for gaming traffic
config nat
option src 'vpn'
option src_ip '[Gaming PC IPv4 Address]'
option target 'SNAT'
option snat_ip '10.7.0.2'
option family 'ipv4'
list proto 'all'

OpenWRT Firewall Config (e.g. /etc/config/firewall)
# IPv6 NAT for gaming traffic
config nat
option src 'vpn'
option src_ip '[Gaming PC IPv6 Address]'
option target 'SNAT'
option snat_ip 'fd42:42:42::2'
option family 'ipv6'
list proto 'all'

```
config nat
option src 'vpn'
option src_ip '[Gaming PC IPv4 Address]'
option target 'SNAT'
option snat_ip '10.7.0.2'
option family 'ipv4'
list proto 'all'

config nat
option src 'vpn'
option src_ip '[Gaming PC IPv6 Address]'
option target 'SNAT'
option snat_ip 'fd42:42:42::2'
option family 'ipv6'
list proto 'all'

```
This configuration establishes low-latency, efficient routing for gaming traffic via a WireGuard tunnel, using fwmark to avoid proxy delays and enable direct connections for enhanced performance.