Sign inSign up

archef2000/rathole

By archef2000

Updated almost 3 years ago

Multiarch docker container for rathole

Image
2

10K+

archef2000/rathole repository overview

rathole docker container

Multiarch docker container for rathole

docker-compose

  rathole-server:
    image: archef2000/rathole:latest
    environment:
      - "RUST_LOG=info"
      - "ADDRESS=0.0.0.0:2333"
      - "SERVICE_TOKEN_1=***token***"
      - "SERVICE_NAME_1=service1"
      - "SERVICE_ADDRESS_1=0.0.0.0:5202"
    ports:
      - 2333:2333
      - 5202:5202
    restart: unless-stopped

  rathole-client:
    image: archef2000/rathole:latest
    command: client
    environment:
      - "RUST_LOG=info"
      - "ADDRESS=server-ip:2333"
      - "SERVICE_TOKEN_1=***token***"
      - "SERVICE_NAME_1=service1"
      - "SERVICE_ADDRESS_1=10.10.10.10:5202"
    restart: unless-stopped

Environment Variables

General

ExampleFunction
DEFAULT_TOKENThe default token of services, if they don't define their own ones
TRANSPORT_TYPEPossible values: ["tcp", "tls", "noise"]. Default: "tcp"
TCP_NODELAYDetermine whether to enable TCP_NODELAY, if applicable, to improve the latency but decrease the bandwidth. Default: true
KEEPALIVE_INTERVALSpecify tcp_keepalive_intvl in tcp(7), if applicable. Default: 8 seconds
KEEPALIVE_SECONDSSpecify tcp_keepalive_time in tcp(7), if applicable. Default: 20 seconds

Server side

NameFunction
ADDRESSThe address that the server listens for clients. Generally only the port needs to be change.
PKCS12pkcs12 file of server's certificate and private key
PKCS12_PASSWORDPassword of the pkcs12 file
HEARTBEAT_TIMEOUTSet to 0 to disable the application-layer heartbeat test. The value must be greater than server.heartbeat_interval. Default: 30 seconds
HEARTBEAT_INTERVALThe interval between two application-layer heartbeat. Set to 0 to disable sending heartbeat. Default: 30 seconds

Client-side

NameFunction
RETRY_INTERVALThe interval between retry to connect to the server. Default: 1 second
HEARTBEAT_TIMEOUTSet to 0 to disable the application-layer heartbeat test. The value must be greater than server.heartbeat_interval. Default: 40 seconds
ADDRESSThe address of the server
TRUSTED_ROOTThe certificate of CA that signed the server's certificate
TLS_HOSTNAMEThe hostname that the client uses to validate the certificate. If not set, fallback to client.remote_addr
PROXY_URLThe proxy used to connect to the server. http and socks5 is supported.

Services

RequiredNameFunction
yesSERVICE_NAME_$NIdentical to the name in the server's configuration
noSERVICE_TYPE_$NThe protocol that needs forwarding. Possible values: ["tcp", "udp"]. Default: "tcp"
yesSERVICE_TOKEN_$NNecessary if DEFAULT_TOKEN not set
yesSERVICE_ADDRESS_$Nclient: service location. server: service listening address
noSERVICE_NODELAY_1Override the TCP_NODELAY per service
noSERVICE_RETRY_1The interval between retry to connect to the server. Default: inherits the global config

Noise Protocol

Officail docs

NameExample
NOISE_PATTERNNoise_XX_25519_ChaChaPoly_BLAKE2s / Noise_KK_25519_ChaChaPoly_BLAKE2s
NOISE_REMOTE_PUBLIC_KEY
NOISE_LOCAL_PRIVATE_KEY

Tag summary

Content type

Image

Digest

sha256:37bafb549

Size

5.4 MB

Last updated

almost 3 years ago

docker pull archef2000/rathole