{"id":15941318,"url":"https://github.com/bryant1410/set-proxy","last_synced_at":"2025-04-03T21:15:52.401Z","repository":{"id":76851570,"uuid":"42404606","full_name":"bryant1410/set-proxy","owner":"bryant1410","description":"Script that sets env variables for proxy depending on the configured subnets","archived":false,"fork":false,"pushed_at":"2016-04-24T16:16:34.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T09:12:59.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryant1410.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":"2015-09-13T17:02:45.000Z","updated_at":"2016-07-25T18:44:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"90bbe4e5-974c-4fe2-873b-c524945599ce","html_url":"https://github.com/bryant1410/set-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant1410%2Fset-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant1410%2Fset-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant1410%2Fset-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant1410%2Fset-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryant1410","download_url":"https://codeload.github.com/bryant1410/set-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247078864,"owners_count":20879952,"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-10-07T07:03:11.063Z","updated_at":"2025-04-03T21:15:52.359Z","avatar_url":"https://github.com/bryant1410.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# set-proxy\n\nScript that sets env variables for proxy depending on the configured subnets.\n\n## Installation\n\nThi script is for Linux. Python 3, pip and some Python packages are needed. You can install it in Ubuntu (or Debian based) running:\n\n```bash\nsudo apt-get install python3 python3-pip\nsudo pip3 install netaddr netifaces\n```\n\nIn Fedora (or RedHat based) you need to run:\n\n```bash\nsudo yum install python3 python3-pip\nsudo pip3 install netaddr netifaces\n```\n\nTo install the script just clone the repo in your home and add an alias for quick execution. Add it to `~/.bashrc` so it's ran at the beginning of every non-login interactive shell:\n\n```bash\ncd ~\ngit clone https://github.com/bryant1410/set-proxy.git .set-proxy\necho 'alias set-proxy=\"source $HOME/.set-proxy/set_proxy.sh\"' \u003e\u003e ~/.bashrc\necho 'set-proxy' \u003e\u003e ~/.bashrc\n```\n\nStart a new shell in order to see the changes.\n\nTo run it whenever you want, do:\n\n```\nset-proxy\n```\n\n## Configuration\n\nBy default, it sets the proxy `proxy.fing.edu.uy:3128` if under subnet 164.0.0.0/8 in `eth0` or `wlan0`. You can change the subnets and interfaces in the file `check_subnet.py` and the proxy configuration in `set_proxy.sh`.\n\nIn order to keep these environment variables in sudo, run the following:\n\n```bash\nsudo visudo\n```\n\nThen add the line:\n\n```bash\nDefaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryant1410%2Fset-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryant1410%2Fset-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryant1410%2Fset-proxy/lists"}