{"id":22912002,"url":"https://github.com/opencoff/go-proxies","last_synced_at":"2025-05-09T01:40:27.023Z","repository":{"id":28815322,"uuid":"32338524","full_name":"opencoff/go-proxies","owner":"opencoff","description":"SOCKSv5 and HTTP Proxy Server in golang","archived":false,"fork":false,"pushed_at":"2020-06-16T20:20:42.000Z","size":137,"stargazers_count":19,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T20:41:59.021Z","etag":null,"topics":["go","golang-application","golang-http","golang-server","golang-socks5","http-proxy","rate-limit","socks5-server","yaml-configuration"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"easybuilders/easybuild-easyblocks","license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencoff.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2015-03-16T16:35:52.000Z","updated_at":"2024-11-24T06:49:26.000Z","dependencies_parsed_at":"2022-08-21T23:50:31.335Z","dependency_job_id":null,"html_url":"https://github.com/opencoff/go-proxies","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-proxies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-proxies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-proxies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-proxies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencoff","download_url":"https://codeload.github.com/opencoff/go-proxies/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176417,"owners_count":21866141,"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","golang-application","golang-http","golang-server","golang-socks5","http-proxy","rate-limit","socks5-server","yaml-configuration"],"created_at":"2024-12-14T04:19:32.062Z","updated_at":"2025-05-09T01:40:26.997Z","avatar_url":"https://github.com/opencoff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"What is this?\n=============\nA simple implementation of HTTP and SOCKSv5 proxy servers in golang.\nThe proxy is expected to scale well on a modern multi-processor box.\nIt runs on any platform that is supported by Go.\n\nBuilding the servers\n---------------------\nYou need a reasonably new Golang toolchain (1.8+). And the ``go``\nexecutable needs to be in your path. Then run::\n\n    make\n\n\nThe Makefile is exceedingly simple; it invokes::\n\n    ./build\n\n\n``build`` is the primary script responsible for building ``goproxy``.\nIt places the binary in TARGET specific directory. e.g., for linux-amd64,\nthe binaries will be in ``./bin/linux-amd64``; and OS X, it will be in\n``./bin/darwin-amd64`` and so on.\n\nYou can cross-compile by passing appropriate architecture names to\nthe script. e.g., to build on host OS X for openbsd-amd64::\n\n    ./build --arch=openbsd-amd64 \n\nYou can build a statically linked executable (with no other runtime dependency)::\n\n    ./build -s\n\nThe script also has other options. To see them::\n\n    ./build --help\n\n\nUsage\n-----\nThe server takes a YAML config file as its sole command line argument. The server\ndoes not fork itself into the background. If you need that capability, explore your\nplatform's init toolchain (e.g., ``start-stop-daemon``).\n\nThe server can run in debug mode::\n\n    ./bin/linux-amd64/goproxy -d etc/goproxy.conf\n\n\nIn debug mode, the logs are sent to STDOUT and the debug level is set to DEBUG\n(i.e., verbose).\n\nIn the absence of the ``-d`` flag, the default log level is INFO.\n\nConfig File\n-----------\nThe server config file is a YAML v2 document. It has a section for HTTP proxy and a\nseparate section for SOCKSv5 proxy. An example is below::\n\n    # Log file; can be one of:\n    #  - Absolute path\n    #  - SYSLOG\n    #  - STDOUT\n    #  - STDERR\n    #log: /tmp/goproxy.log\n    log: STDOUT\n\n    # Logging level - \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\"\n    loglevel: DEBUG\n\n    # Path to URL Log and response codes\n    #urllog:\n\n    # drop privileges as soon as listeners are setup to the uid/gid below.\n    # Only meaningful if go-proxy is started as root.\n    uid: nobody\n    gid: nobody\n\n    # Listeners\n    http:\n        -\n            listen: 127.0.0.1:8080\n\n            # if you want this listener to use a specific outbound IP, then set that\n            # here\n            #bind:\n\n            # ACL\n            allow: [127.0.0.1/8, 11.0.1.0/24, 11.0.2.0/24]\n            deny: []\n\n            # limit to N reqs/sec globally and M requests per-host\n            ratelimit:\n                global: 2000\n                perhost: 30\n\n\n    socks:\n        -\n            listen: 127.0.0.1:2080\n            #bind:\n            allow: [127.0.0.1/8, 11.0.1.0/24, 11.0.2.0/24]\n            deny: []\n            # limit to N reqs/sec globally\n            ratelimit:\n                global: 2000\n                perhost: 30\n\n\n\nMajor features\n--------------\n- No authentication (yes, its a feature)\n- flexible allow/deny rules for discriminating clients\n- multiple listeners - each with their own ACL\n- Rate limiting incoming connections (global and per-host)\n\nAccess Control Rules\n--------------------\nGo-socksd implements a flexible ACL by combination of\nallow/deny rules. The rules are evaluated in the following order:\n\n- If explicitly denied, the host is blocked\n- If explicitly allowed, the host is allowed\n- Explicit denial takes precedence over explicit allow\n- Empty allow list is the same as \"allow all\"\n\nExample of allow/deny combinations\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Only allow specific subnets and deny everyone else:\n\n    allow: [ 192.168.55.0/24, 172.16.10.0/24, 127.0.0.1/8 ],\n    deny: []\n\n\n2. Allow all except selected subnets:\n\n    allow: [],\n    deny: [ 192.168.80.0/24\", 172.16.5.0/24 ]\n\n\n3. Expliclty block certain hosts and explicitly allow certain\n   subnets and block everyone else:\n\n    allow: [ 192.168.55.0/24, 172.16.10.0/24, 127.0.0.1/8 ],\n    deny:  [ 192.168.1.1/32, 192.168.80.0/24, 172.16.5.0/24 ]\n\n\nDevelopment Notes\n=================\nIf you are a developer, the notes here will be useful for you:\n\n* We use go module support; so you will need go 1.10+ for this to work.\n\n* The build script ``build`` is a shell script to build the program.\n  It does two very important things:\n    * Puts the binary in an OS/Arch specific directory\n    * Injects a git version-tag into the final binary (\"linker resolved symbol\")\n\n* Example config files is in the ``etc/goproxy.conf`` directory.\n\n\nRedirect Error\n--------------\nIf you are receiving some error like::\n\n  gopkg.in/h2non/bimg.v1: Cloning and checking out v1.0.6..\n  error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301\n  fatal: The remote end hung up unexpectedly\n\nIt is because something in git around version 2.11.1 stops following redirects.\nA popular repository of golang packages uses this. To workaround, try::\n\n  git config --global http.https://gopkg.in.followRedirects true\n\n.. vim: ft=rst:sw=4:ts=4:expandtab:tw=84:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoff%2Fgo-proxies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencoff%2Fgo-proxies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoff%2Fgo-proxies/lists"}