{"id":31029973,"url":"https://github.com/yusing/nginx-proxy-cli","last_synced_at":"2025-09-13T22:57:26.449Z","repository":{"id":199248260,"uuid":"702456834","full_name":"yusing/nginx-proxy-cli","owner":"yusing","description":"Manipulate reversed proxies in command line","archived":false,"fork":false,"pushed_at":"2024-02-16T12:18:05.000Z","size":35,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-02T03:53:07.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusing.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}},"created_at":"2023-10-09T10:58:31.000Z","updated_at":"2024-05-01T14:49:48.000Z","dependencies_parsed_at":"2023-12-06T22:27:25.055Z","dependency_job_id":"8d9890cc-d15c-44a2-9aaf-2c4fdd8b5f4e","html_url":"https://github.com/yusing/nginx-proxy-cli","commit_stats":null,"previous_names":["yusing/nginx-proxy-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yusing/nginx-proxy-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fnginx-proxy-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fnginx-proxy-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fnginx-proxy-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fnginx-proxy-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusing","download_url":"https://codeload.github.com/yusing/nginx-proxy-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fnginx-proxy-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275038259,"owners_count":25394640,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-13T22:57:14.024Z","updated_at":"2025-09-13T22:57:26.430Z","avatar_url":"https://github.com/yusing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-proxy-cli\nManipulate reversed proxies in command line\n\n(**Caution**) *I have no responsibility when causing bugs/conflicts using the script, use on your own risk. But feel free to create \"issues\" or feature requests on GitHub.*\n\n(**Notice**) You cuold also use [docker-playbook](https://github.com/yusing/docker-playbook) and might be simpler.\n\n## Why?\n\nIt saves time.\n\nHeading into the web UI, tabs and buttons is annoying when you add proxies frequently.\n\nThis script allows you to create / delete proxy with few taps on your keyboard. With generated default location entry with proper proxy_set_header, etc. \n\n## What you may want to do:\n1. Rename it to something like `nginx_proxy`\n2. Move it to `$HOME/.local/bin`\n3. `chmod +x $HOME/.local/bin/nginx_proxy`\n4. Setup for first time (2 Options):\n    - `NPM_URL=\"https://{your_npm_url}\" NPM_USER=\"{login_email}\" NPM_PASS=\"{login_password}\" nginx_proxy list-user`\n    - nginx_proxy list-user then enter your credentials when prompted\n5. Enjoy\n\n## Available commands:\n-  list-user: List all users (no args)\n-  list-cert: List all certificates (no args)\n-  list-proxy: List all proxies (no args)\n-  add-proxy: Add a new proxy (with optional `--dry-run` to preview changes)\n-  delete-proxy: Delete a proxy (no args)\n-  edit-proxy: Edit a proxy (no args)\n-  upload-cert: Upload SSL certificate (no args)\n-  delete-cert: Delete a certificate (no args)\n-  new-cert: Get new SSL certificate from Let's Encrypt with Cloudflare DNS challenge (no args)\n\n## Environment Variables:\n- `HOME` (required): By default, auth credentials with be saved in $HOME/.local/nginx_proxy.json (with 0600 permission)\n\n## Sample Input/output:\n```plain\nCurrent User: [User 1] somebody@mail.com somebody yusing\nEnter domain names (comma separated): home.domain.com\nEnter target scheme (http/https): http\nEnter target hostname / IP: homelab\nEnter target port: 5037\n{1: [Certificate 1]\n    Nice Name: Let's Encrypt\n    Domains: ['*.domain.com']\n    Expires On: 2023-12-31 10:13:10}\nEnter certificate ID: 1\nIs this a websocket proxy? (y/n): n\nIs this a HTTP/2 proxy? (y/n): n\nDouble check the following information:\n{'cert': \"Let's Encrypt\",\n 'domains': ['home.domain.com'],\n 'is_websocket': 'no',\n 'target': 'http://homelab:5037'}\nAdvanced config:\nlocation / {\n  proxy_pass http://homelab:5037;\n  proxy_set_header Host $host;\n  proxy_set_header X-Real-IP $remote_addr;\n  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n  proxy_set_header X-Forwarded-Proto $scheme;\n  proxy_http_version 1.1;\n}\nConfirm? (y/n): y\nResponse:\n{'access_list': None,\n 'access_list_id': 0,\n 'advanced_config': 'location / {\\n'\n                    '  proxy_pass http://homelab:5037;\\n'\n                    '  proxy_set_header Host $host;\\n'\n                    '  proxy_set_header X-Real-IP $remote_addr;\\n'\n                    '  proxy_set_header X-Forwarded-For '\n                    '$proxy_add_x_forwarded_for;\\n'\n                    '  proxy_set_header X-Forwarded-Proto $scheme;\\n'\n                    '  proxy_http_version 1.1;\\n'\n                    '}',\n 'allow_websocket_upgrade': 0,\n 'block_exploits': 1,\n 'caching_enabled': 0,\n 'certificate': {'created_on': '2023-10-02 11:20:40',\n                 'domain_names': ['*.domain.com'],\n                 'expires_on': '2023-12-31 10:13:10',\n                 'id': 1,\n                 'is_deleted': 0,\n                 'meta': {},\n                 'modified_on': '2023-10-02 11:20:40',\n                 'nice_name': \"Let's Encrypt\",\n                 'owner_user_id': 2,\n                 'provider': 'other'},\n 'certificate_id': 5,\n 'created_on': '2023-10-09 11:42:23',\n 'domain_names': ['home.domain.com'],\n 'enabled': 1,\n 'forward_host': 'homelab',\n 'forward_port': 5037,\n 'forward_scheme': 'http',\n 'hsts_enabled': 0,\n 'hsts_subdomains': 0,\n 'http2_support': 0,\n 'id': 1,\n 'ipv6': True,\n 'locations': [],\n 'meta': {'dns_challenge': False, 'letsencrypt_agree': False},\n 'modified_on': '2023-10-09 11:42:23',\n 'owner': {'avatar': '//www.gravatar.com/avatar/3309f87ec4b86ff05a065680e1c40e6a?default=mm',\n           'created_on': '2023-09-30 11:18:00',\n           'email': 'somebody@mail.com',\n           'id': 1,\n           'is_deleted': 0,\n           'is_disabled': 0,\n           'modified_on': '2023-10-02 21:07:32',\n           'name': 'somebody',\n           'nickname': 'somebody',\n           'roles': ['admin']},\n 'owner_user_id': 1,\n 'ssl_forced': 1,\n 'use_default_location': False}\nDone adding home.domain.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fnginx-proxy-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusing%2Fnginx-proxy-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fnginx-proxy-cli/lists"}