rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
8.8k stars 440 forks source link

Slow TCP throughput Minecraft server #370

Open BrammyS opened 2 weeks ago

BrammyS commented 2 weeks ago

Describe the bug

I am experiencing a severe slow down of network traffic when using Rathole for a Minecraft server. The proxy server has a multi Gbit/s connection and our local connection is 1 Gbit/s, so this can not be an issue. I have also tried an iperf3 test with with the same configurations and it showed nothing out of the ordinary. What could be the issue here?

To Reproduce Steps to reproduce the behavior:

  1. Server config
    
    [server]
    bind_addr = "0.0.0.0:2333"
    default_token = "xxx"

[server.transport] type = "noise"

[server.transport.noise] local_private_key = "xxx"

[server.services.mc] bind_addr = "0.0.0.0:25565"

2. Client config
```toml
[client]
remote_addr = "0.0.0.0:2333"
default_token = "xxx"

[client.transport]
type = "noise"

[client.transport.noise]
remote_public_key = "xxx"

[client.services.mc]
local_addr = "10.0.1.5:25565"
  1. Docker-compose file
services:
  rathole:
    image: 'arm64-rathole'
    container_name: rathole
    restart: unless-stopped
    ports:
      - "2333:2333" # Only present on the server side
      - "25565:25565" # Only present on the server side
    volumes:
      - './config.toml:/app/config.toml'
    command:
      - '/app/config.toml'
    networks:
      tunnel:
        ipv4_address: 10.0.1.2
  mc: # Only present on client side
    ....
    ports:
      - "25565:25565" # Only present on the client side, used to connect directly to it.
    networks:
      tunnel:
        ipv4_address: 10.0.1.5

networks:
  tunnel:
    external: true

Configuration Configuration used to reproduce the behavior:

Logs

Environment: