{"id":17594896,"url":"https://github.com/pinnaculum/ipfs-gwx","last_synced_at":"2025-08-18T22:31:32.664Z","repository":{"id":178117663,"uuid":"229560088","full_name":"pinnaculum/ipfs-gwx","owner":"pinnaculum","description":"Async HTTP/HTTPS proxy for IPFS","archived":false,"fork":false,"pushed_at":"2019-12-22T11:59:21.000Z","size":86,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T00:09:44.296Z","etag":null,"topics":["gateway","gateway-service","ipfs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinnaculum.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-22T11:53:24.000Z","updated_at":"2020-06-02T13:57:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f953aa04-39eb-4f2f-a564-935eb75c7ae3","html_url":"https://github.com/pinnaculum/ipfs-gwx","commit_stats":null,"previous_names":["pinnaculum/ipfs-gwx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinnaculum%2Fipfs-gwx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinnaculum%2Fipfs-gwx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinnaculum%2Fipfs-gwx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinnaculum%2Fipfs-gwx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinnaculum","download_url":"https://codeload.github.com/pinnaculum/ipfs-gwx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230284070,"owners_count":18202330,"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":["gateway","gateway-service","ipfs"],"created_at":"2024-10-22T07:12:24.550Z","updated_at":"2024-12-18T14:17:16.679Z","avatar_url":"https://github.com/pinnaculum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\nipfs-gwx\n========\n\nSimple IPFS \u003c=\u003e HTTP gw with virtual hosts support to serve content locally to\nyour network.\n\nIt uses Python 3.5 and is built around the aiohttp_ asynchronous HTTP framework.  \n\nInstallation\n============\n\nPIP\n---\n\nAssuming you have Python 3.5 installed:\n\n.. code-block:: shell\n\n    pip install -r requirements.txt\n    python setup.py install\n\nDocker\n------\n\nA Dockerfile is provided. By default the container assumes you have a\n**go-ipfs** container reachable via the hostname **ipfs**, so just run a\n**ipfs/go-ipfs** container, then fire the **ipfs-gwx** container and link them:\n\n.. code-block:: shell\n\n    docker pull ipfs/go-ipfs:latest\n    docker build -t ipfs-gwx .\n    docker run --name ipfs1 ipfs/go-ipfs\n    docker run -it --link ipfs1:ipfs ipfs-gwx\n\nUsage\n=====\n\n.. code-block:: shell\n\n    ipfs-gwx --config ipfs-gwx.conf\n\nUse **-d** to enable debug.\n\nIPFS daemon configuration\n-------------------------\n\nBy default it will connect to **localhost**, port **5001**.\n\nUse **--ipfsapihost** and **--ipfsapiport** to specify which IPFS daemon to\nconnect to, e.g:\n\n.. code-block:: shell\n\n    ipfs-gwx --config ipfs-gwx.conf --ipfsapihost 192.168.1.1 --ipfsapiport 5004\n\nConfiguration\n=============\n\nConfiguration is done via a simple JSON file, look in the **examples**\ndirectory for simple examples. A configuration for relaying\n**/ipns/ipfs.io** on port 80 would be:\n\n.. code-block:: json\n\n    {\n        \"ipnscachepath\": \"/tmp/ipfsgwx-cache.json\",\n        \"listen\": {\n            \"0.0.0.0:80\": {\n                \"proto\": \"http\"\n            }\n        },\n        \"vhosts\": {\n            \".*\": {\n                \"ipns\": \"ipfs.io\"\n            }\n        }\n    }\n\nHTTPS is supported:\n\n.. code-block:: json\n\n    \"listen\": {\n        \"0.0.0.0:443\": {\n            \"proto\": \"https\",\n            \"certificate\": \"/path/to/cert.pem\",\n            \"key\": \"/path/to/cert.key\"\n        }\n    }\n\nVirtual hosts\n-------------\n\nVirtual hosts support proxying from the IPNS or IPFS namespace. Define your \nvirtual hosts in the **vhosts** section. The virtual host key is a Python\nregular expression that is matched against the HTTP **Host:** header. You can\nuse a **get-all** wildcard but always put it last:\n\n.. code-block:: json\n\n    \"vhosts\": {\n        \"my-website.example.com\": {\n            \"ipns\": \"mykey\"\n        },\n        \".*\": {\n            // default vhost if no match\n        }\n    }\n\nProxying IPFS hashes\n^^^^^^^^^^^^^^^^^^^^\n\nTo serve **/ipfs/QmYNQJoKGNHTpPxCBPh9KkDpaExgd2duMa3aF6ytMpHdao** on\n**localhost** for example, use:\n\n.. code-block:: json\n\n    \"vhosts\": {\n        \"localhost\": {\n            \"ipfs\": \"/ipfs/QmYNQJoKGNHTpPxCBPh9KkDpaExgd2duMa3aF6ytMpHdao\"\n        }\n    }\n\nor without the **/ipfs** prefix:\n\n.. code-block:: json\n\n    \"vhosts\": {\n        \"localhost\": {\n            \"ipfs\": \"QmYNQJoKGNHTpPxCBPh9KkDpaExgd2duMa3aF6ytMpHdao\"\n        }\n    }\n\nProxying IPNS hashes/names\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe default TTL for entries in the IPNS cache is **10 minutes** but you should\nalways override it using the **cachettl** (time in seconds) key in the virtual\nhost config:\n\n.. code-block:: json\n\n    \"vhosts\": {\n        \"localhost\": {\n            \"ipns\": \"ipfs.io\",\n            \"cachettl\": \"3600\"\n        }\n    }\n\nFeatures\n========\n\n- Virtual hosts\n- Configurable IPNS cache when needed\n- HTTPS and IPv6 support\n- Directory listing (similar to go-ipfs_'s gateway, thanks to dir-index-html_)\n\n.. _dir-index-html: https://github.com/ipfs/dir-index-html\n.. _go-ipfs: https://github.com/ipfs/go-ipfs\n\nRequirements\n============\n\n- Python \u003e= 3.5\n- aioipfs_\n- aiohttp_\n\n.. _aiohttp: https://pypi.python.org/pypi/aiohttp\n.. _aioipfs: https://gitlab.com/cipres/aioipfs\n\nThanks\n======\n\nMany thanks to the IPFS community for this great project.\n\nLicense\n=======\n\n**ipfs-gwx** is offered under the GNU GPL3 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinnaculum%2Fipfs-gwx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinnaculum%2Fipfs-gwx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinnaculum%2Fipfs-gwx/lists"}