{"id":23419400,"url":"https://github.com/bannsec/socks.pl","last_synced_at":"2025-04-09T08:47:38.137Z","repository":{"id":249437156,"uuid":"831227950","full_name":"bannsec/socks.pl","owner":"bannsec","description":"A repository for a socks server implementation in Perl","archived":false,"fork":false,"pushed_at":"2024-07-21T15:42:04.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T03:16:37.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","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/bannsec.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":"2024-07-20T01:29:52.000Z","updated_at":"2024-07-21T15:23:50.000Z","dependencies_parsed_at":"2024-07-20T20:28:42.827Z","dependency_job_id":null,"html_url":"https://github.com/bannsec/socks.pl","commit_stats":null,"previous_names":["bannsec/socks.pl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Fsocks.pl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Fsocks.pl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Fsocks.pl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bannsec%2Fsocks.pl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bannsec","download_url":"https://codeload.github.com/bannsec/socks.pl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008629,"owners_count":21032556,"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-12-23T01:17:53.919Z","updated_at":"2025-04-09T08:47:38.111Z","avatar_url":"https://github.com/bannsec.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Actions Test Status](https://github.com/bannsec/socks.pl/actions/workflows/test.yml/badge.svg)\n\n# SOCKS Proxy Server Implementation in Perl\n\nThis is a Perl implementation of a SOCKS proxy server supporting SOCKS4, SOCKS5, and SOCKS5h protocols.\n\n## Features\n\n- Supports SOCKS4, SOCKS5, and SOCKS5h protocols\n- Optional user/password authentication\n- Configurable port\n- Debug logging (to console or file)\n\n## Usage\n\nBasic usage:\n\n```bash\nperl socks.pl [options]\n```\n\n### Options\n\n| Option | Description |\n|--------|-------------|\n| `-p \u003cport\u003e` | Specify the port to listen on (default: 1080) |\n| `-auth \u003cuser:pass\u003e` | Enable authentication with specified credentials |\n| `-d [file]` | Enable debug logging (optionally to a file) |\n| `-h` | Display help message |\n\n### Environment Variables\n\n| Variable | Description |\n|--------|-------------|\n| `SOCKS_PORT` | Specify the port to listen on (default: 1080) |\n\n### Examples\n\n1. Start a SOCKS listener on default port (1080):\n   ```bash\n   perl socks.pl\n   ```\n\n2. Start a SOCKS listener on port 2020:\n   ```bash\n   perl socks.pl -p 2020\n   ```\n\n3. Enable debug logging to console:\n   ```bash\n   perl socks.pl -d\n   ```\n\n4. Enable debug logging to a file:\n   ```bash\n   perl socks.pl -d debug.log\n   ```\n\n5. Start with authentication:\n   ```bash\n   perl socks.pl -auth user:pass\n   ```\n\n6. Combine multiple options:\n   ```bash\n   perl socks.pl -p 1080 -auth user:pass -d\n   ```\n\n### Using the SOCKS_PORT environment variable\n\nYou can also specify the port using the `SOCKS_PORT` environment variable. The precedence rules are as follows:\n\n1. If no command line flag or environment variable is set, the default port (1080) is used.\n2. If both the environment variable and the command line flag are set, the command line flag takes precedence.\n3. If either the environment variable or the command line flag is set, the specified value is used.\n\n### Examples with SOCKS_PORT environment variable\n\n1. Start a SOCKS listener on port 2020 using the environment variable:\n   ```bash\n   export SOCKS_PORT=2020\n   perl socks.pl\n   ```\n\n2. Start a SOCKS listener on port 3030 using the command line flag (overrides the environment variable):\n   ```bash\n   export SOCKS_PORT=2020\n   perl socks.pl -p 3030\n   ```\n\n## Authentication\n\nIf the `-auth` option is not specified, the server operates as an open SOCKS server without authentication.\n\n## Stopping the Server\n\nTo stop the server, use `Ctrl+C` in the terminal where it's running.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbannsec%2Fsocks.pl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbannsec%2Fsocks.pl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbannsec%2Fsocks.pl/lists"}