{"id":15351324,"url":"https://github.com/oowl/ngx_stream_socks_module","last_synced_at":"2025-06-12T11:37:30.119Z","repository":{"id":114827638,"uuid":"453299505","full_name":"oowl/ngx_stream_socks_module","owner":"oowl","description":"Socks5 and HTTP proxy server based on nginx stream module implementation.","archived":false,"fork":false,"pushed_at":"2023-01-09T14:54:33.000Z","size":121,"stargazers_count":24,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T04:38:26.197Z","etag":null,"topics":["c","http","https","nginx","proxy","socks"],"latest_commit_sha":null,"homepage":"","language":"C","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/oowl.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":"2022-01-29T04:53:06.000Z","updated_at":"2025-03-12T10:04:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7a45cee-64d0-42dc-9070-eb4de52ae51f","html_url":"https://github.com/oowl/ngx_stream_socks_module","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"acf31be0a046edf42518958b7a322e5367734761"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/oowl/ngx_stream_socks_module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oowl%2Fngx_stream_socks_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oowl%2Fngx_stream_socks_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oowl%2Fngx_stream_socks_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oowl%2Fngx_stream_socks_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oowl","download_url":"https://codeload.github.com/oowl/ngx_stream_socks_module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oowl%2Fngx_stream_socks_module/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259456360,"owners_count":22860542,"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":["c","http","https","nginx","proxy","socks"],"created_at":"2024-10-01T12:03:35.484Z","updated_at":"2025-06-12T11:37:30.086Z","avatar_url":"https://github.com/oowl.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx_stream_socks_module\n## Description\nProxy server based on nginx stream module implementation. It support HTTP and Socks5(TCP) proxy.\n\n\n## Installation\n\n```\n$ cd nginx \n$ ./configure --add-module=/path/ngx_stream_socks_module --with-stream\n$ make \u0026\u0026 make install\n```\n\n## Configuration directives\n\n### `socks`\n\n- **syntax**: `socks`\n- **default**: `-`\n- **context**: `server`\n\nSet socks server in current server context.\n\n### `socks_user_passwd`\n\n- **syntax**: `socks_user_passwd user passwd`\n- **default**: `-`\n- **context**: `stream`,`server`\n\nAdd username/password authentication to socks5 server. Adding this conf is like opening the socks5 username/password Authentication. You can use this conf to add multilateral username/password authentication for many times.\n\n### `socks_proxy_bind`\n\n- **syntax**: `socks_proxy_bind address [transparent] | off;`\n- **default**: `-`\n- **context**: `stream`,`server`\n\nMakes outgoing connections to a socks proxied server originate from the specified local IP address. Parameter value can contain variables (1.11.2). The special value off cancels the effect of the socks_proxy_bind directive inherited from the previous configuration level, which allows the system to auto-assign the local IP address.\n\n### `socks_proxy_socket_keepalive`\n\n- **syntax**: `socks_proxy_socket_keepalive on | off;`\n- **default**: `socks_proxy_socket_keepalive off;`\n- **context**: `stream`,`server`\n\nConfigures the “TCP keepalive” behavior for outgoing connections to a socks proxied server. By default, the operating system’s settings are in effect for the socket. If the directive is set to the value “on”, the SO_KEEPALIVE socket option is turned on for the socket.\n\n### `socks_proxy_buffer_size`\n\n- **syntax**: `socks_proxy_buffer_size size;`\n- **default**: `socks_proxy_buffer_size 16k;`\n- **context**: `stream`,`server`\n\nSets the size of the buffer used for reading data from the proxied server. Also sets the size of the buffer used for reading data from the client.\n\n### `socks_proxy_connect_timeout`\n\n- **syntax**: `socks_proxy_connect_timeout time;`\n- **default**: `socks_proxy_buffer_size 60s;`\n- **context**: `stream`,`server`\n\nDefines a timeout for establishing a connection with a proxied server.\n\n### `socks_proxy_timeout`\n\n- **syntax**: `socks_proxy_timeout time;`\n- **default**: `socks_proxy_timeout 10m;`\n- **context**: `stream`,`server`\n\nSets the timeout between two successive read or write operations on client or proxied server connections. If no data is transmitted within this time, the connection is closed.\n\n### `socks_proxy_upload_rate`\n\n- **syntax**: `socks_proxy_upload_rate rate;`\n- **default**: `socks_proxy_upload_rate 0;`\n- **context**: `stream`,`server`\n\nLimits the speed of reading the data from the client. The rate is specified in bytes per second. The zero value disables rate limiting. The limit is set per a connection, so if the client simultaneously opens two connections, the overall rate will be twice as much as the specified limit.\n\n### `socks_proxy_download_rate`\n\n- **syntax**: `socks_proxy_download_rate rate;`\n- **default**: `socks_proxy_download_rate 0;`\n- **context**: `stream`,`server`\n\nLimits the speed of reading the data from the proxied server. The rate is specified in bytes per second. The zero value disables rate limiting. The limit is set per a connection, so if nginx simultaneously opens two connections to the proxied server, the overall rate will be twice as much as the specified limit.\n\n## Variables\n\n### `$socks_connect_addr`\nsocks connect contain addr and port\n\n### `$socks_name`\nsocks auth user name in current connection\n\n### `$socks_passwd`\nsocks auth password in current connection\n\n### `$socks_protocol`\nproxy protocol in current connection\n\n## Usage\n```\nstream {\n    resolver 8.8.8.8 ipv6=off;\n    log_format socks 'socks: $socks_connect_addr $socks_name $socks_passwd $socks_protocol';\n    server {         \n        listen     0.0.0.0:22345;\n        socks;\n        socks_user_passwd \u003cuser1\u003e \u003cpassword1\u003e;\n        socks_user_passwd \u003cuser2\u003e \u003cpassword2\u003e;\n        access_log socks_access.log socks;\n    }\n}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foowl%2Fngx_stream_socks_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foowl%2Fngx_stream_socks_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foowl%2Fngx_stream_socks_module/lists"}