{"id":23085196,"url":"https://github.com/z3ntl3/proxifier","last_synced_at":"2025-04-03T15:24:39.090Z","repository":{"id":236049849,"uuid":"791802785","full_name":"Z3NTL3/proxifier","owner":"Z3NTL3","description":"Zero dependency swift proxy client for SOCKS4/4a/5 and HTTP/HTTPS","archived":false,"fork":false,"pushed_at":"2024-06-30T12:44:03.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T04:15:59.366Z","etag":null,"topics":["go","socks","socks4","socks4a","socks5"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Z3NTL3.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-25T11:59:55.000Z","updated_at":"2024-10-23T18:24:51.000Z","dependencies_parsed_at":"2024-05-19T21:30:53.742Z","dependency_job_id":"856f5815-d951-4d4f-922a-624ea1e52c96","html_url":"https://github.com/Z3NTL3/proxifier","commit_stats":null,"previous_names":["z3ntl3/socks","z3ntl3/proxifier"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Z3NTL3%2Fproxifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Z3NTL3%2Fproxifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Z3NTL3%2Fproxifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Z3NTL3%2Fproxifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Z3NTL3","download_url":"https://codeload.github.com/Z3NTL3/proxifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247025533,"owners_count":20871209,"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":["go","socks","socks4","socks4a","socks5"],"created_at":"2024-12-16T17:50:48.059Z","updated_at":"2025-04-03T15:24:39.066Z","avatar_url":"https://github.com/Z3NTL3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003ckbd\u003e\u003cimg src=\"https://github.com/Z3NTL3/socks/assets/48758770/9c91baa2-03df-480b-8c02-4e082a2f28f5\" width=\"400\" border=\"1px solid red\"\u003e\u003c/kbd\u003e\n\t\u003cdiv\u003e\n\t\t\u003cimg alt=\"GitHub go.mod Go version\" src=\"https://img.shields.io/github/go-mod/go-version/z3ntl3/socks\"\u003e\n\t\t\u003cimg alt=\"GitHub Tag\" src=\"https://img.shields.io/github/v/tag/z3ntl3/socks\"\u003e\n\t\t\u003cimg alt=\"Static Badge\" src=\"https://img.shields.io/badge/author-z3ntl3-blue?style=plastic\"\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n\n# Proxifier\n\nReliable proxy client library for Go programs.\n\n#### Features\n\n* [X] TLS \n* [X] SOCKS4\n* [X] SOCKS5\n* [X] HTTP ``(HTTP FORWARD)``\n* [X] HTTPS ``(HTTP TUNNEL)``\n* [X] Auth\n\n##### Todo\n* [ ] SOCKS``4/a`` support\n\n\n## Examples\n\n#### HTTPS AUTH\n\nHTTPS TUNNEL mechanism with authentication.\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"crypto/tls\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\thttpClient := proxifier.HTTPClient{\n\t\tTLS: true,\n\t\tAuth: proxifier.Auth{\n\t\t\tUsername: \"hello\",\n\t\t\tPassword: \"world\",\n\t\t},\n\t}\n\n\tconn, err := httpClient.PROXY(\"https://httpbin.org/ip\", proxifier.Context{\n\t\tResolver: net.ParseIP(\"117.74.65.207\"),\n\t\tPort: 54417,\n\t}, time.Second * 10); if err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer conn.Close()\n\n\ttlsConn := tls.Client(conn, \u0026tls.Config{\n\t\tInsecureSkipVerify: true,\n\t})\n\n\tif _, err = tlsConn.Write([]byte(\"GET /ip HTTP/1.1\\r\\nHost: httpbin.org\\r\\nConnection: close\\r\\n\\r\\n\")); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t\n\tresp, err := io.ReadAll(tlsConn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Println(string(resp))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 took 7s\n❯ go run .\n2024/05/17 18:49:27 HTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nServer: CherryPy/3.2.5\nWww-Authenticate: Basic realm=\"Broadband Router\"\nDate: Fri, 17 May 2024 16:49:28 GMT\nContent-Length: 32\nConnection: close\n\n{\n  \"origin\": \"117.74.65.207\"\n}\n*/\n```\n\n#### HTTPS NO AUTH\n\nHTTPS TUNNEL with no authentication\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"crypto/tls\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\thttpClient := proxifier.HTTPClient{\n\t\tTLS: true,\n\t}\n\n\tconn, err := httpClient.PROXY(\"https://httpbin.org/ip\", proxifier.Context{\n\t\tResolver: net.ParseIP(\"117.74.65.207\"),\n\t\tPort: 54417,\n\t}, time.Second * 10); if err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer conn.Close()\n\n\ttlsConn := tls.Client(conn, \u0026tls.Config{\n\t\tInsecureSkipVerify: true,\n\t})\n\n\tif _, err = tlsConn.Write([]byte(\"GET /ip HTTP/1.1\\r\\nHost: httpbin.org\\r\\nConnection: close\\r\\n\\r\\n\")); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t\n\tresp, err := io.ReadAll(tlsConn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Println(string(resp))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 took 7s\n❯ go run .\n2024/05/17 18:49:27 HTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nServer: CherryPy/3.2.5\nWww-Authenticate: Basic realm=\"Broadband Router\"\nDate: Fri, 17 May 2024 16:49:28 GMT\nContent-Length: 32\nConnection: close\n\n{\n  \"origin\": \"117.74.65.207\"\n}\n*/\n```\n\n#### HTTP NO AUTH\n\nHTTP FORWARD with no authentication.\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\thttpClient := proxifier.HTTPClient{}\n\n\tconn, err := httpClient.PROXY(\"https://httpbin.org/ip\", proxifier.Context{\n\t\tResolver: net.ParseIP(\"85.209.2.126\"),\n\t\tPort:     4444,\n\t}, time.Second*10)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer conn.Close()\n\n\tresp, err := io.ReadAll(conn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\n\t}\n\n\tlog.Println(string(resp))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 took 3s\n❯ go run .\n2024/05/17 18:35:41 HTTP/1.1 200 OK\nServer: nginx/1.14.0 (Ubuntu)\nDate: Fri, 17 May 2024 16:35:41 GMT\nContent-Type: application/json\nContent-Length: 31\nConnection: close\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\n\n{\n  \"origin\": \"85.209.2.126\"\n}\n*/\n```\n\n#### HTTP AUTH\nHTTP FORWARD with authentication\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\thttpClient := proxifier.HTTPClient{\n\t\tAuth: proxifier.Auth{\n\t\t\tUsername: \"hello\",\n\t\t\tPassword: \"world\",\n\t\t},\n\t}\n\n\tconn, err := httpClient.PROXY(\"https://httpbin.org/ip\", proxifier.Context{\n\t\tResolver: net.ParseIP(\"85.209.2.126\"),\n\t\tPort:     4444,\n\t}, time.Second*10)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer conn.Close()\n\n\tresp, err := io.ReadAll(conn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\n\t}\n\n\tlog.Println(string(resp))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 took 3s\n❯ go run .\n2024/05/17 18:35:41 HTTP/1.1 200 OK\nServer: nginx/1.14.0 (Ubuntu)\nDate: Fri, 17 May 2024 16:35:41 GMT\nContent-Type: application/json\nContent-Length: 31\nConnection: close\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\n\n{\n  \"origin\": \"85.209.2.126\"\n}\n*/\n```\n\n#### SOCKS5 NO AUTH\n\nWith no authentication\n\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"context\"\n\t\"crypto/tls\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\taddr, err := proxifier.LookupHost(\"httpbin.org\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\ttarget := proxifier.Context{\n\t\tResolver: net.ParseIP(addr[0]),\n\t\tPort:     443,\n\t}\n\n\tproxy := proxifier.Context{\n\t\tResolver: net.ParseIP(\"38.154.227.167\"),\n\t\tPort:     5868,\n\t}\n\n\tclient, err := proxifier.New(\u0026proxifier.Socks5Client{},target, proxy)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tctx, cancel := context.WithTimeout(context.Background(), time.Second*15)\n\tdefer cancel()\n\t\n\tif err := proxifier.Connect(client, ctx); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tdefer client.Close()\n\tclient.SetLinger(0)\n\n\n\ttlsConn := tls.Client(client, \u0026tls.Config{\n\t\tInsecureSkipVerify: true,\n\t})\n\n\tif _, err := tlsConn.Write([]byte(\"GET /ip HTTP/1.1\\r\\nHost: httpbin.org\\r\\nConnection: close\\r\\n\\r\\n\")); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tdata, err := io.ReadAll(tlsConn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Println(string(data))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 \n❯ go run .\n2024/05/17 18:44:03 HTTP/1.1 200 OK\nDate: Fri, 17 May 2024 16:44:03 GMT\nContent-Type: application/json\nContent-Length: 33\nConnection: close\nServer: gunicorn/19.9.0\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\n\n{\n  \"origin\": \"38.154.227.167\"\n}\n*/\n```\n\n#### SOCKS4\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\taddr, err := proxifier.LookupHost(\"httpbin.org\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\ttarget := proxifier.Context{\n\t\tResolver: net.ParseIP(addr[0]),\n\t\tPort:     443,\n\t}\n\n\tproxy := proxifier.Context{\n\t\tResolver: net.ParseIP(\"174.64.199.82\"),\n\t\tPort:     4145,\n\t}\n\n\tclient, err := proxifier.New(\u0026proxifier.Socks4Client{},target, proxy)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tctx, cancel := context.WithTimeout(context.Background(), time.Second*15)\n\tdefer cancel()\n\t\n\tif err := proxifier.Connect(client, ctx); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tdefer client.Close()\n\tclient.SetLinger(0)\n\n\ttlsConn := tls.Client(client, \u0026tls.Config{\n\t\tInsecureSkipVerify: true,\n\t})\n\n\tif _, err := tlsConn.Write([]byte(\"GET /ip HTTP/1.1\\r\\nHost: httpbin.org\\r\\nConnection: close\\r\\n\\r\\n\")); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tdata, err := io.ReadAll(tlsConn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Println(string(data))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 took 6s\n❯ go run .\n2024/05/17 18:54:00 HTTP/1.1 200 OK\nDate: Fri, 17 May 2024 16:54:00 GMT\nContent-Type: application/json\nContent-Length: 32\nConnection: close\nServer: gunicorn/19.9.0\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\n\n{\n  \"origin\": \"174.64.199.82\"\n}\n*/\n```\n\n#### SOCKS5 AUTH\n\nWith authentication.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"io\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/Z3NTL3/proxifier\"\n)\n\nfunc main() {\n\taddr, err := proxifier.LookupHost(\"httpbin.org\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\ttarget := proxifier.Context{\n\t\tResolver: net.ParseIP(addr[0]),\n\t\tPort:     443,\n\t}\n\n\tproxy := proxifier.Context{\n\t\tResolver: net.ParseIP(\"38.154.227.167\"),\n\t\tPort:     5868,\n\t}\n\n\tclient, err := proxifier.New(\u0026proxifier.Socks5Client{},target, proxy)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t\n\t{\n\t\tclient.Auth.Username = \"lqafmzlx\"\n\t\tclient.Auth.Password = \"i9mzzjv4qdz2\"\n\t}\n\n\tctx, cancel := context.WithTimeout(context.Background(), time.Second*15)\n\tdefer cancel()\n\t\n\tif err := proxifier.Connect(client, ctx); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tdefer client.Close()\n\tclient.SetLinger(0)\n\n\ttlsConn := tls.Client(client, \u0026tls.Config{\n\t\tInsecureSkipVerify: true,\n\t})\n\n\tif _, err := tlsConn.Write([]byte(\"GET /ip HTTP/1.1\\r\\nHost: httpbin.org\\r\\nConnection: close\\r\\n\\r\\n\")); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tdata, err := io.ReadAll(tlsConn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Println(string(data))\n}\n/*\nRESULT:\n\n~\\Documents\\sockstests via 🐹 v1.22.2 \n❯ go run .\n2024/05/17 18:37:49 HTTP/1.1 200 OK\nDate: Fri, 17 May 2024 16:37:49 GMT\nContent-Type: application/json\nContent-Length: 33\nConnection: close\nServer: gunicorn/19.9.0\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Credentials: true\n\n{\n  \"origin\": \"38.154.227.167\"\n}\n*/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz3ntl3%2Fproxifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz3ntl3%2Fproxifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz3ntl3%2Fproxifier/lists"}