{"id":13775884,"url":"https://github.com/jun7th/tsocks","last_synced_at":"2025-05-11T08:34:29.047Z","repository":{"id":96003323,"uuid":"76960333","full_name":"jun7th/tsocks","owner":"jun7th","description":"A reverse socks5 proxy server with ssl(一个Socks5代理服务器程序)","archived":false,"fork":false,"pushed_at":"2016-03-15T07:04:19.000Z","size":18662,"stargazers_count":23,"open_issues_count":0,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T17:12:20.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jun7th.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-12-20T13:49:18.000Z","updated_at":"2024-05-07T02:58:44.000Z","dependencies_parsed_at":"2023-03-12T18:30:22.443Z","dependency_job_id":null,"html_url":"https://github.com/jun7th/tsocks","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun7th%2Ftsocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun7th%2Ftsocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun7th%2Ftsocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jun7th%2Ftsocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jun7th","download_url":"https://codeload.github.com/jun7th/tsocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225031381,"owners_count":17410056,"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-03T17:01:53.521Z","updated_at":"2024-11-17T11:30:37.390Z","avatar_url":"https://github.com/jun7th.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"d03d494700077f6a65092985c06bf8e8\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"57b8e953d394bbed52df2a6976d98dfa\"\u003e\u003c/a\u003eSocks"],"readme":"# tsocks\nA reverse socks5 proxy server whith port forwarding mode and forward server mode\n\nSocks is a small program that has socks5 reverse proxy functionality, with the port forwarding agent can archieve intranet to intranet, but also has a positive socks5 proxy server.\nUsage:\n\n### 1. On the server has two network cards, one of the card is connected within a intranet, another cards connect to internet (public network ip):\n```\nOn the target server run:\ntsocks -s -p 1080\nUse socks proxy server to connect to this server's public network ip and 1080 ports.\n```\n### 2. The target server in the intranet, our machine is also in the intranet:\n```\nFirst on the internet server(if iP is 1.1.1.1) run:\ntsocks -f 8001 8002\nON the intranet server run:\ntsocks -s -r 1.1.1.1 -p 8001\nIn this machine socks5 proxy connection port VPS 8002\n```\n## or use ssl:\n```\nFirst on the internet server(if iP is 1.1.1.1) run:\ntsocks -f 443 8002 -S -c cert.pem\nON the intranet server run:\ntsocks -s -S -r 1.1.1.1 -p 443\nIn this machine socks5 proxy connection port VPS 8002\n```\n\n# tsocks\nTsocks是一个具有socks5反向代理功能的小程序，配合端口转发可以实现内网通内网的功能，同时也具有正向socks5代理服务器功能。\n用法：\n### 1.在具有两块网卡的服务器上，网卡一连接内网，网卡二连接外网（公网ip）：\n```\n在目标服务器上运行：\ntsocks -s -p 1080\n使用socks代理服务器连接这台服务器的公网ip和1080端口。\n```\n### 2.目标服务器处于内网，本机也处于内网：\n```\n首先在公网服务器(假如ip是 1.1.1.1)上面运行：\ntsocks -f 8001 8002\n在内网服务器上面运行：\ntsocks -s -r 1.1.1.1 -p 8001\n在本机使用socks5代理连接vps的8002端口\n```\n## 或者使用ssl:\n```\n首先在公网服务器(假如ip是 1.1.1.1)上面运行：\ntsocks -f 443 8002 -S -c cert.pem\n在内网服务器上面运行：\ntsocks -s -S -r 1.1.1.1 -p 443\n在本机使用socks5代理连接vps的8002端口\n```\n\n```\nusage: tsocks [options]\n  tsocks -s -p 1028\t\tSocks5 server mode\n  tsocks -s -r 1.1.1.1 -p 8001\tReverse socks5 server mode\n  tsocks -f 8001 8002\t\tPort forward mode\n  tsocks -s -S -r 1.1.1.1 -p 443\tReverse socks5  over ssl\n  tsocks -f 443 8002 -S -c cert.pem    Port forward over ssl\n  -----------------------------------------------------------------------\n  generate cert:\n  openssl req -new -x509 -keyout cert.pem -out cert.pem -days 1095 -nodes\n\ntsocks v1.0\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -s, --server          Socks5 server mode (default: False)\n  -p PORT, --port PORT  Socks5 server mode listen port or remote port\n                        (default: 1080)\n  -r REMOTE_IP, --remote REMOTE_IP\n                        Reverse socks5 server mode ,set remote relay IP\n                        (default: None)\n  -f PORT_1 PORT_2, --forward PORT_1 PORT_2\n                        Set forward mode,server connect port_1,client connect\n                        port_2 (default: None)\n  -d, --debug           Set debug mode,will show debug information (default:\n                        False)\n  -S, --ssl             Set use ssl,just support reverse proxy mode,relay\n                        server must also use ssl (default: False)\n  -c CERT_FILE, --cert CERT_FILE\n                        Set ssl cert file path,only set relay server (default:\n                        cert.pem)\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjun7th%2Ftsocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjun7th%2Ftsocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjun7th%2Ftsocks/lists"}