{"id":22246227,"url":"https://github.com/jpbaking/cpto-tinyproxy","last_synced_at":"2026-02-03T23:32:35.315Z","repository":{"id":144051657,"uuid":"364924048","full_name":"jpbaking/cpto-tinyproxy","owner":"jpbaking","description":"Containerized HTTP/SOCKS Proxy Through Containerized OpenVPN | tinyproxy","archived":false,"fork":false,"pushed_at":"2021-05-10T01:31:25.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T05:42:24.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpbaking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-06T13:41:35.000Z","updated_at":"2021-05-10T01:31:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"17838681-6887-4175-a385-9574185b3852","html_url":"https://github.com/jpbaking/cpto-tinyproxy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jpbaking/cpto-tinyproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbaking%2Fcpto-tinyproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbaking%2Fcpto-tinyproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbaking%2Fcpto-tinyproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbaking%2Fcpto-tinyproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpbaking","download_url":"https://codeload.github.com/jpbaking/cpto-tinyproxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpbaking%2Fcpto-tinyproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29061560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T23:14:54.203Z","status":"ssl_error","status_checked_at":"2026-02-03T23:14:50.873Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-03T05:26:41.023Z","updated_at":"2026-02-03T23:32:35.299Z","avatar_url":"https://github.com/jpbaking.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPTO:TINYPROXY\n\nThis is a part/submodule of the \"Containerized HTTP/SOCKS Proxy Through OpenVPN\" (CPTO) project.\n\n![PREVIEW](https://raw.githubusercontent.com/jpbaking/cpto/main/.images/preview.png)\n\nCPTO will expose HTTP/SOCKS proxy ports that forwards traffic through the OpenVPN client configured. Perfect for those that don't want/need to have their entire host machine be on the OpenVPN network.\n\n\u003e **WARNING**: This project was made for educational purposes (and convenience). Please DO NOT USE for PRODUCTION or COMMERCIAL deployments.\n\n... also serves as demonstration of:\n- Non-typical `docker`/`docker-compose` (POD-like) networking _([official doc](https://docs.docker.com/compose/compose-file/compose-file-v2/#network_mode))_\n- YAML anchors in `docker-compose.yaml` _([guide by medium.com](https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd))_\n- Working with Alpine images _([official site](https://alpinelinux.org/about/) / [in docker hub](https://hub.docker.com/_/alpine))_\n- `docker` Multi-stage builds _([official doc](https://docs.docker.com/develop/develop-images/multistage-build/))_\n- Git submodules _([official doc](https://git-scm.com/book/en/v2/Git-Tools-Submodules))_\n- Oldie-but-Goodie (and tiny) open-source networking apps/tools:\n  - tinyproxy _([official site](http://tinyproxy.github.io/) / [github](https://github.com/tinyproxy/tinyproxy))_\n  - srelay _([official site](https://socks-relay.sourceforge.io/) / [sourceforge](https://sourceforge.net/p/socks-relay/srelay/ci/master/tree/))_\n  - haproxy _([official site](http://www.haproxy.org/) / [github](https://github.com/haproxy/haproxy))_\n\n**REF:** https://github.com/jpbaking/cpto\n\n# CPTO Usage\n\n## **Step #1:** Clone the CPTO repository\n\n```bash\n$ git clone git@github.com:jpbaking/cpto.git\n$ cd cpto\n```\n\nThis `.git` repository is basically a `docker-compose` project:\n\n```bash\n$ ls -la\ntotal 56\ndrwxrwxr-x  8 user group 4096 May  6 16:01 .\ndrwxrwxr-x 10 user group 4096 May  6 15:31 ..\n-rwxrwxr-x  1 user group  307 May  6 15:31 compose.sh\ndrwxrwxr-x  2 user group 4096 May  6 15:33 cpto-haproxy\ndrwxrwxr-x  2 user group 4096 May  6 15:33 cpto-openvpn\ndrwxrwxr-x  2 user group 4096 May  6 15:33 cpto-srelay\ndrwxrwxr-x  2 user group 4096 May  6 15:33 cpto-tinyproxy\n-rw-rw-r--  1 user group 1110 May  6 15:50 docker-compose.yaml\n-rw-rw-r--  1 user group 1491 May  6 16:06 .env\ndrwxrwxr-x  9 user group 4096 May  6 15:32 .git\n-rw-rw-r--  1 user group   15 May  6 15:31 .gitignore\n-rw-rw-r--  1 user group  387 May  6 15:31 .gitmodules\ndrwxr-xr-x  2 user group 4096 May  6 15:53 .openvpn\n-rw-rw-r--  1 user group 2601 May  6 16:14 README.md\n```\n\nFeel free to use the `compose.sh` bash script. It basically is a `docker-compose` helper/shortcut that checks if `docker` and `docker-compose` are installed, and consistently supplies the `--project-name=cpto` argument.\n\n### **OPTIONAL:** \"pull\" the submodules:\n\nIf you're curious or want to hack something:\n```bash\n$ git submodule update --init --recursive\n```\nEnjoy!~\n\n## **Step #2:** Configuration (REQUIRED)\n\nModify the [docker compose `.env`](https://docs.docker.com/compose/environment-variables/#the-env-file) file:\n\n```bash\n# -------------------------------------------------------------------------\n# [OPENVPN_CONFIG_DIR]\n# The folder that holds your OpenVPN client configuration (and possibly a\n# password file as well). If you do not need to pass configuration files\n# (eg: if you only need OpenVPN arguments), you may leave the detault value\n# as-is (it won't have any effect anyway).\n# -------------------------------------------------------------------------\nOPENVPN_CONFIG_DIR=\"./.openvpn\"\n\n# -------------------------------------------------------------------------\n# [OPENVPN_CMD_ARGS]\n# This exactly is what will be fed as arguments/parameters to OpenVPN.\n# Something like: `openvpn ${OPENVPN_CMD_ARGS}`\n# NOTE: The working directory in the container will be the mounted volume\n#       pointing to the directory specified in `OPENVPN_CONFIG_DIR`.\n# -------------------------------------------------------------------------\nOPENVPN_CMD_ARGS=\"--config client.ovpn --auth-user-pass client.pass --auth-nocache\"\n\n# -------------------------------------------------------------------------\n# [HTTP_PROXY_PORT]\n# The port to expose for HTTP Proxy (tinyproxy).\n# -------------------------------------------------------------------------\nHTTP_PROXY_PORT=\"3128\"\n\n# -------------------------------------------------------------------------\n# [SOCKS_PROXY_PORT]\n# The port to expose for SOCKS4/SOCKS5 Proxy (srelay).\n# -------------------------------------------------------------------------\nSOCKS_PROXY_PORT=\"1080\"\n```\n\n## **Step #3:** Docker Compose CLI\n\n`compose.sh` ([docker-compose](https://docs.docker.com/compose/reference/)) usage:\n\n* \"Start\": `./compose.sh pull \u0026\u0026 ./compose.sh up --detach --no-build`\n* \"Stop\": `./compose.sh down`\n* List Containers: `./compose.sh ps`\n* Tail-Follow Logs: `./compose.sh logs -f --tail 100`\n* I hacked something, now...\n  * Build: `./compose.sh build`\n  * Build \u0026 \"Start\": `./compose.sh up --detach --build`\n\n**REF:** [https://docs.docker.com/compose/reference/](https://docs.docker.com/compose/reference/)\n\n\n## **Step #4:** Test (optional)\n\nJust execute `test.sh`! It will also show you sample usage with `curl`:\n\n```bash\n$ ./test.sh\n\nCMD: curl -s https://checkip.amazonaws.com\nYour home WAN IP: 111.111.111.111\n\nCMD: curl -s --proxy http://127.0.0.1:3128 https://checkip.amazonaws.com\nIP through HTTP Proxy (port: 3128): 222.222.222.222\n\nCMD: curl -s --proxy socks4://127.0.0.1:1080 https://checkip.amazonaws.com\nIP through SOCKS4 Proxy (port: 1080): 222.222.222.222\n\nCMD: curl -s --proxy socks5://127.0.0.1:1080 https://checkip.amazonaws.com\nIP through SOCKS5 Proxy (port: 1080): 222.222.222.222\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpbaking%2Fcpto-tinyproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpbaking%2Fcpto-tinyproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpbaking%2Fcpto-tinyproxy/lists"}