{ "info": { "author": "jtmoon79", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: HTTP Servers" ], "description": "\n# Go To HTTP Redirect Server\n\n[![CircleCI](https://circleci.com/gh/jtmoon79/coverlovin2.svg?style=svg)](https://circleci.com/gh/jtmoon79/goto_http_redirect_server)\n[![Requirements Status](https://requires.io/github/jtmoon79/goto_http_redirect_server/requirements.svg?branch=master)](https://requires.io/github/jtmoon79/goto_http_redirect_server/requirements/?branch=master)\n[![PyPI version](https://badge.fury.io/py/goto-http-redirect-server.svg)](https://badge.fury.io/py/goto-http-redirect-server)\n[![Python versions](https://img.shields.io/pypi/pyversions/goto-http-redirect-server.svg?longCache=True)](https://pypi.org/pypi/goto-http-redirect-server/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nThe **_\"Go To\" HTTP Redirect Server_** for sharing custom shortened HTTP URLs\non your network.\n\nTrivial to run and reload. Only uses Python built-in modules. Super handy \ud83d\ude04 \u203c\n\n## Setup and run\n\n1. create a tab-separated values file (`'\\t'`) with a list of HTTP redirects.
\n Fields are \"_from path_\", \"_to URL_\", \"_added by user_\", and \"_added on datetime_\".
\n For example, given a file `./redirects1.csv`\n\n /builds\thttps://build-server.mycorp.local/build-list\talice\t2019-08-10 00:05:10\n /hr\thttp://human-resources.mycorp.local/login\tbob\t2018-07-11 22:15:10\n /aws\thttps://us-west-2.console.aws.amazon.com/console/home?region=us-west-2#\tcarl\t2019-01-05 12:35:10\n\n2. (optional) Install\n\n - Install manually\n ```\n python setup.py bdist_wheel\n python -m pip install --user ./dist/goto_http_redirect_server-*-py3-none-any.whl\n ```\n\n - Or, try helper scripts [`tools/build-install.sh`](./tools/build-install.sh) or [`tools/build-install.ps1`](./tools/build-install.ps1)\n\n - Or, try [`tools/eazy-run.sh`](./tools/eazy-run.sh) and pass command-line options as if\n running `goto_http_redirect_server.py`.\n\n3. start the _Go To HTTP Redirect Server_\n\n goto_http_redirect_server --redirects ./redirects1.csv\n\n or, if Install step was skipped,\n\n python goto_http_redirect_server.py --redirects ./redirects1.csv\n\n Requires at least Python version 3.5.2.\n\n### Use\n\nFrom your browser, browse to a redirect path! For example, given a network host\n`goto` running `goto_http_redirect_server` on port `80`, and given the\nexample redirects file `./redirects1.csv` above, then
\nin your browser, type **`goto/hr\u23ce`**. Your browser will end up at\n**`http://human-resources.mycorp.local/login`** \ud83d\ude1d\u203c\n\n\n\nSadly, some browsers will assume a single word host, e.g. `goto/hr`, is a\nsearch engine query, i.e. the browser will query Google for \"`goto/hr`\".\nUsers may need to pass the local network domain name, e.g. `goto.local/hr`, to\nforce the browser to use local network host `goto.local`.\\*\\*\n\n\n\n### Live Reload\n\nWhen the tab-separated values files are modified, this program can reload them.\nNo service downtime!\n\n#### Reload via Signals\n\n 1. Note during startup the Process ID (or query the host System).\n\n 2. Send the process signal to the running `goto_http_redirect_server`.
\n In Unix, use `kill`.
\n In Windows, use [`windows-kill.exe`](https://github.com/alirdn/windows-kill/releases)
\n The running `goto_http_redirect_server` will re-read all files passed via\n `--redirects`.\n\n#### Reload via browser\n\n1. Pass `--reload-path /reload` as a program command-line options.\n\n2. Browse to `http://host/reload`.\n\n### Pro Tips\n\n- Add a DNS addressable host on your network named `goto`. Run\n `goto_http_redirect_server` on the host.
\n Network users can type in their browser address bar `goto/\u2026\u23ce` to easily use\n the _\"Go To\" HTTP Redirect Server_.\\*\\*\n\n- There are many methods to secure a running process.\n One method is to use `authbind` to run `goto_http_redirect_server` as a low\n privilege process.\n\n apt install authbind\n touch /etc/authbind/byport/80\n chown nobody /etc/authbind/byport/80\n chmod 0500 /etc/authbind/byport/80\n sudo -u nobody -- authbind --deep python goto_http_redirect_server \u2026\n\n
\n\n\\*\\* _Mileage May Vary_ \ud83d\ude14\n\n----\n\n## `--help` message\n\n usage: goto_http_redirect_server [--from-to from to]\n [--redirects REDIRECTS_FILES] [--ip IP]\n [--port PORT] [--status-path STATUS_PATH]\n [--reload-path RELOAD_PATH]\n [--redirect-code REDIRECT_CODE]\n [--field-delimiter FIELD_DELIMITER]\n [--shutdown SHUTDOWN] [--log LOG] [--debug]\n [--version] [-?]\n\n The \"Go To\" HTTP Redirect Server! For sharing custom shortened HTTP URLs on your\n network.\n\n HTTP 308 Permanent Redirect reply server. Load this server with redirects of \"from path\" and\n \"to URL\" and let it run indefinitely. Reload the running server by\n signaling the process.\n\n Redirects:\n One or more required. May be passed multiple times.\n\n --from-to from to A single redirection of \"from path\" and \"to URL\"\n fields. For example, --from-to \"/hr\" \"http://human-\n resources.mycorp.local/login\"\n --redirects REDIRECTS_FILES\n File of redirection information. Within a file, is one\n redirection entry per line. An entry is four fields\n using tab character for field separator. The four\n entry fields are: \"from path\", \"to URL\", \"added by\n user\", and \"added on datetime\" separated by a tab.\n\n Network Options:\n --ip IP, -i IP IP interface to listen on. Default is 127.0.0.1 .\n --port PORT, -p PORT IP port to listen on. Default is 80 .\n\n Miscellaneous Options:\n --status-path STATUS_PATH\n Override status page path. This is the page that dumps\n information about the process and loaded redirects.\n This can be the default landing page e.g. --status-\n path \"/\" . Default status page path is \"/status\".\n --reload-path RELOAD_PATH\n Allow reloads by HTTP GET Request to passed URI Path.\n e.g. --reload-path \"/reload\". May be a potential\n security or stability issue. The program will always\n allow reload by process signal. Default is off.\n --redirect-code REDIRECT_CODE\n Override default HTTP Redirect Status Code as an\n integer. Most often the desired override will be 307\n (Temporary Redirect). Any HTTP Status Code could be\n used but odd things will happen if a value like 500 is\n returned. This Status Code is only returned when a\n loaded redirect entry is found and returned. Default\n successful redirect Status Code is 308 (Permanent\n Redirect).\n --field-delimiter FIELD_DELIMITER\n Field delimiter string for --redirects files. Default\n is \" \" (tab character) between fields.\n --shutdown SHUTDOWN Shutdown the server after passed seconds. Intended for\n testing.\n --log LOG Log to file at path LOG. Default logging is to\n sys.stderr.\n --debug Set logging level to DEBUG. Default is INFO.\n --version show program version and exit.\n -?, -h, --help show this help message and exit.\n\n About Redirect Entries:\n\n Entries found in --redirects file(s) and entries passed via --from-to are\n combined.\n Entries passed via --from-to override any matching \"from path\" entry found in\n redirects files.\n The \"from path\" field corresponds to the URI Path in the originating request.\n The \"to URL\" field corresponds to HTTP Header \"Location\" in the server\n Redirect reply.\n\n A redirects file entry has four fields separated by a tab character \"\\t\";\n \"from path\", \"to URL\", \"added by user\", \"added on datetime\". For example,\n\n hr http://human-resources.mycorp.local/login bob 2019-09-07 12:00:00\n\n The last two fields, \"added by user\" and \"added on datetime\", are intended\n for record-keeping within an organization.\n\n A passed redirect (either via --from-to or --redirects file) should have a\n leading \"/\" as this is the URI path given for processing.\n For example, the URL \"http://host/hr\" is processed by goto_http_redirect_server\n as URI path \"/hr\".\n\n About Paths:\n\n Options --status-path and --reload-path may be passed paths to obscure access\n from unauthorized users. e.g.\n\n --status-path '/aaa5309f-cad4-441a-9075-259ddf1545e6'\n\n About Reloads:\n\n Sending a process signal to the running process will cause\n a reload of any files passed via --redirects. This allows live updating of\n redirect information without disrupting the running server process.\n On Unix, the signal is SIGUSR1. On Windows, the signal is SIGBREAK.\n On this system, the signal is Signals.SIGBREAK (21).\n On Unix, use program `kill`. On Windows, use program `windows-kill.exe`.\n\n A reload of redirection files may also be requested via passed URI path\n --reload-path '/path'.\n\n If security and stability are a concern then only allow reloads via process\n signals.\n\n----\n\n\"profile\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jtmoon79/goto_http_redirect_server", "keywords": "http-server redirect-urls shortcuts shorturl shorturl-servicesshorturls url-shortener", "license": "Apache License 2.0 (Apache-2.0)", "maintainer": "", "maintainer_email": "", "name": "goto-http-redirect-server", "package_url": "https://pypi.org/project/goto-http-redirect-server/", "platform": "", "project_url": "https://pypi.org/project/goto-http-redirect-server/", "project_urls": { "Bug Reports": "https://github.com/jtmoon79/goto_http_redirect_server/issues", "Homepage": "https://github.com/jtmoon79/goto_http_redirect_server", "Source": "https://github.com/jtmoon79/goto_http_redirect_server" }, "release_url": "https://pypi.org/project/goto-http-redirect-server/0.4.1/", "requires_dist": null, "requires_python": ">=3.5.2", "summary": "The \"Go To\" HTTP Redirect Server for sharing custom shortened HTTP URLs on your network.", "version": "0.4.1" }, "last_serial": 5833324, "releases": { "0.3.2": [ { "comment_text": "", "digests": { "md5": "d091acf50e8fa10718690e8569116c5e", "sha256": "e6a6b03fc40659e5335d85350ff301b4a6b4a0a5c71cf2f2c41d92fef9294aa6" }, "downloads": -1, "filename": "goto_http_redirect_server-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d091acf50e8fa10718690e8569116c5e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 19291, "upload_time": "2019-09-12T09:04:20", "url": "https://files.pythonhosted.org/packages/40/ea/ea4d8763f3463f236b9d1d8c705ecd53df4f023f9a1e2e20f2a65dbea1db/goto_http_redirect_server-0.3.2-py3-none-any.whl" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "25f14b60f07c0af97008003b09dcb685", "sha256": "15a0dc152fd35617280b5fc71f0332380afe32f35e67239fe764d8737a3e6a2d" }, "downloads": -1, "filename": "goto_http_redirect_server-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "25f14b60f07c0af97008003b09dcb685", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 19156, "upload_time": "2019-09-12T09:12:16", "url": "https://files.pythonhosted.org/packages/9d/8c/89f7581b2dd399abd6e7400d54e7a90752cd496341d179f6aeb7da1746af/goto_http_redirect_server-0.3.3-py3-none-any.whl" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "5b868ca132f34ded70fd30c347a24d07", "sha256": "f61e1af738e0b5fb08131b31385de1bd3a055a927527ee99a0782dc579f8373c" }, "downloads": -1, "filename": "goto_http_redirect_server-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5b868ca132f34ded70fd30c347a24d07", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 19270, "upload_time": "2019-09-12T09:41:26", "url": "https://files.pythonhosted.org/packages/c3/ee/f05bcad628a0398f16f4de6f13d08b87fb4039b90cf07ffde0d6af9bfe59/goto_http_redirect_server-0.3.4-py3-none-any.whl" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "01152e1546abd826f9dbdbeff0aaff7f", "sha256": "d20d53384f4db504a773a99c1a36d6425038ff5cf574d173ef9854bffcbb965c" }, "downloads": -1, "filename": "goto_http_redirect_server-0.3.5-py3-none-any.whl", "has_sig": false, "md5_digest": "01152e1546abd826f9dbdbeff0aaff7f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.2", "size": 19300, "upload_time": "2019-09-12T16:31:14", "url": "https://files.pythonhosted.org/packages/a4/0f/c7712921c845a858d1fd3ae11c626b3088fe54254fc9fabad7fb20a408fc/goto_http_redirect_server-0.3.5-py3-none-any.whl" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "de50bd6af0a8ec7b52c2d5151ff1118c", "sha256": "d13a30c8dacf469d748f56b6fa9534ec235161e333e6fcf433e003acb64b13bd" }, "downloads": -1, "filename": "goto_http_redirect_server-0.3.6-py3-none-any.whl", "has_sig": false, "md5_digest": "de50bd6af0a8ec7b52c2d5151ff1118c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.2", "size": 19302, "upload_time": "2019-09-12T16:41:37", "url": "https://files.pythonhosted.org/packages/15/fe/1c8a444573cf6a55859f8596fef547a18229cd171c3275998c1443f6b913/goto_http_redirect_server-0.3.6-py3-none-any.whl" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "eb83d479c4b428bbcbfe8e6b3852155a", "sha256": "be042b12413465101d867917a90991c4ffee91be29994a64d85bde7e770caa22" }, "downloads": -1, "filename": "goto_http_redirect_server-0.3.7-py3-none-any.whl", "has_sig": false, "md5_digest": "eb83d479c4b428bbcbfe8e6b3852155a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.2", "size": 19336, "upload_time": "2019-09-13T04:40:04", "url": "https://files.pythonhosted.org/packages/fc/d4/ca700f84116c7ff91826359cbfda95becab0bef34a3b55b4f11fc7ed9f18/goto_http_redirect_server-0.3.7-py3-none-any.whl" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5eb8191717cbc4ff1fa24bef7ebf36b2", "sha256": "5aeffbe89c283106a3ca0af9e288cfbbf2f0ad25806d68dc698c0d3c2f43fe41" }, "downloads": -1, "filename": "goto_http_redirect_server-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5eb8191717cbc4ff1fa24bef7ebf36b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.2", "size": 19540, "upload_time": "2019-09-15T07:17:51", "url": "https://files.pythonhosted.org/packages/48/8b/203a9412c2228fc9ffa8d85edafa8d25eb301a4db1cf308ccd15a79dd3ea/goto_http_redirect_server-0.4.0-py3-none-any.whl" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "d44c6e596944b5fbadc1c81d37b867f8", "sha256": "2c71af28fdf96a729e5ae1335718eac8e8bbc68699e22dad88eb933f4ed8ec68" }, "downloads": -1, "filename": "goto_http_redirect_server-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d44c6e596944b5fbadc1c81d37b867f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.2", "size": 19714, "upload_time": "2019-09-16T00:04:32", "url": "https://files.pythonhosted.org/packages/c4/93/083c7e34aac966099b1c15fbdfa98a7b1d537e7623f52656cb5518a49b24/goto_http_redirect_server-0.4.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d44c6e596944b5fbadc1c81d37b867f8", "sha256": "2c71af28fdf96a729e5ae1335718eac8e8bbc68699e22dad88eb933f4ed8ec68" }, "downloads": -1, "filename": "goto_http_redirect_server-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d44c6e596944b5fbadc1c81d37b867f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.2", "size": 19714, "upload_time": "2019-09-16T00:04:32", "url": "https://files.pythonhosted.org/packages/c4/93/083c7e34aac966099b1c15fbdfa98a7b1d537e7623f52656cb5518a49b24/goto_http_redirect_server-0.4.1-py3-none-any.whl" } ] }