Sign inSign up

wiserain/ptunnel

By wiserain

•Updated over 4 years ago

python-proxy + green-tunnel

Image
1

500K+

wiserain/ptunnel repository overview

⁠docker-ptunnel

[p]ython-proxy⁠ + green-[tunnel]⁠

⁠Usage

version: '3'

services:
  ptunnel:
    container_name: ptunnel
    image: wiserain/ptunnel:latest
    restart: always
    network_mode: bridge
    ports:
      - "${PORT_TO_EXPOSE}:${PROXY_PORT:-8008}"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - PROXY_USER=${PROXY_USER}
      - PROXY_PASS=${PROXY_PASS}

Up and run your container as above. Then you can access to your password-authenticated proxy server via

http://${PROXY_USER}:${PROXY_PASS}@${DOCKER_HOST}:${PORT_TO_EXPOSE}

Python-proxy running at front will forward all your requests to the internally working green-tunnel below

gt --ip 0.0.0.0 --port ${GT_PORT:-21000} --system-proxy false \
    --dns-type ${GT_DNSTYPE:-https} \
    --dns-server ${GT_DNSSERVER:-https://1.1.1.1/dns-query}

⁠Direct connection to green-tunnel

As green-tunnel is binding to 0.0.0.0:21000, you can directly access it independently to the proxy running at front by publishing your container port 21000. It is highly recommended exposing the port for internal use only.

⁠Environment variables

ENVDescriptionDefault
PUID / PGIDuid and gid for running an app911 / 911
TZtimezoneAsia/Seoul
PROXY_ENABLEDset false to disable proxytrue
PROXY_USER / PROXY_PASSrequired both to activate proxy authentication
PROXY_PORTto run proxy in a different port8008
PROXY_VERBOSEsimple access logging
PROXY_AUTHTIMEre-auth time interval for same ip (second in string format)0
GT_ENABLEDset false to disable green-tunneltrue
GT_PORTto run green-tunnel in different port21000
GT_VERBOSEset true to run green-tunnel in verbose mode for the purpose of debugging
GT_DNSTYPEagrument --dns-type for green-tunnel CLI⁠https
GT_DNSSERVERagrument --dns-server for green-tunnel CLI⁠https://1.1.1.1/dns-query

Tag summary

Content type

Image

Digest

Size

62.5 MB

Last updated

over 4 years ago

docker pull wiserain/ptunnel