{"id":13542517,"url":"https://github.com/wiserain/docker-ctunnel","last_synced_at":"2025-04-02T10:30:55.781Z","repository":{"id":40467098,"uuid":"218138433","full_name":"wiserain/docker-ctunnel","owner":"wiserain","description":"caddy-forwardproxy + green-tunnel","archived":true,"fork":false,"pushed_at":"2022-05-06T13:25:09.000Z","size":46,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-03T08:33:44.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/wiserain/ctunnel","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiserain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-28T20:24:18.000Z","updated_at":"2023-10-23T02:53:21.000Z","dependencies_parsed_at":"2022-08-09T21:20:30.448Z","dependency_job_id":null,"html_url":"https://github.com/wiserain/docker-ctunnel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiserain%2Fdocker-ctunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiserain%2Fdocker-ctunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiserain%2Fdocker-ctunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiserain%2Fdocker-ctunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiserain","download_url":"https://codeload.github.com/wiserain/docker-ctunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246796831,"owners_count":20835453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T10:01:09.430Z","updated_at":"2025-04-02T10:30:55.498Z","avatar_url":"https://github.com/wiserain.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile","others"],"sub_categories":[],"readme":"# docker-ctunnel\n\n[[**c**]addy-forwardproxy](https://github.com/caddyserver/forwardproxy) + [green-[**tunnel**]](https://github.com/SadeghHayeri/GreenTunnel)\n\n## Usage\n\n```yaml\nversion: '3'\n\nservices:\n  ctunnel:\n    container_name: ctunnel\n    image: wiserain/ctunnel:latest\n    restart: always\n    network_mode: bridge\n    ports:\n      - \"${PORT_TO_EXPOSE}:${PROXY_PORT:-8008}\"\n    environment:\n      - PUID=${PUID}\n      - PGID=${PGID}\n      - PROXY_USER=${PROXY_USER}\n      - PROXY_PASS=${PROXY_PASS}\n```\n\nYou can access to your password-authenticated proxy server via\n\n```http://${PROXY_USER}:${PROXY_PASS}@${DOCKER_HOST}:${PROXY_PORT:-8008}```\n\nThis service is run by caddy forward-proxy and will relay all your requests to the internally running green-tunnel below\n\n```bash\ngt --ip 0.0.0.0 --port ${GT_PORT:-21000} --system-proxy false \\\n    --dns-type ${GT_DNSTYPE:-https} \\\n    --dns-server ${GT_DNSSERVER:-https://1.1.1.1/dns-query}\n```\n\nIf you are familar with ```Caddyfile```, you may want your container-volume ```/config``` maped and make your own ```Caddyfile``` to customize behaviour of caddy-server. Default is\n\n```bash\n0.0.0.0:${PROXY_PORT:-8008}\nforwardproxy {\n    basicauth ${PROXY_USER} ${PROXY_PASS}\n    upstream http://localhost:${GT_PORT:-21000}\n    hide_ip\n    hide_via\n}\n```\n\n## Direct connection to green-tunnel\n\nAs green-tunnel is running with ```0.0.0.0:21000```, you can directly access it independently to caddy forward-proxy running at front by publishing your container port ```21000```. It is highly recommended exposing the port for internal use only.\n\n## Environment variables\n\n| ENV  | Description  | Default  |\n|---|---|---|\n| ```PUID``` / ```PGID```  | uid and gid for running an app  | ```911``` / ```911```  |\n| ```TZ```  | timezone  | ```Asia/Seoul```  |\n| ```PROXY_ENABLED```  | set ```false``` to disable caddy | ```true``` |\n| ```PROXY_USER``` / ```PROXY_PASS```  | required both to activate proxy authentication   |  |\n| ```PROXY_PORT```  | to run caddy forward-proxy in a different port  | ```8008``` |\n| ```PROXY_VERBOSE```  | append ```-log stdout``` to caddy server cmd  |  |\n| ```GT_ENABLED```  | set ```false``` to disable green-tunnel  | ```true``` |\n| ```GT_PORT```  | to run green-tunnel in different port  | ```21000```  |\n| ```GT_VERBOSE```  | set ```true``` to run green-tunnel in verbose mode for the purpose of debugging  |  |\n| ```GT_DNSTYPE```  | agrument ```--dns-type``` for [green-tunnel CLI](https://github.com/SadeghHayeri/GreenTunnel#command-line-interface-cli)  | ```https```  |\n| ```GT_DNSSERVER```  | agrument ```--dns-server``` for [green-tunnel CLI](https://github.com/SadeghHayeri/GreenTunnel#command-line-interface-cli)  | ```https://1.1.1.1/dns-query```  |\n\n## TODO\n\n- [ ] Suppress log for certificate maintenance\n- [ ] Apply http/2 for better performance?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiserain%2Fdocker-ctunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiserain%2Fdocker-ctunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiserain%2Fdocker-ctunnel/lists"}