{"id":27262998,"url":"https://github.com/deiu/solidproxy","last_synced_at":"2026-01-11T22:55:34.300Z","repository":{"id":57601468,"uuid":"75122977","full_name":"deiu/solidproxy","owner":"deiu","description":"Proxy server with authentication (using WebID-TLS delegation)","archived":false,"fork":false,"pushed_at":"2017-06-03T01:32:44.000Z","size":187,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T05:58:28.268Z","etag":null,"topics":["data","delegation","linked","proxy-server","solid","webid","webid-tls-delegation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deiu.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}},"created_at":"2016-11-29T21:18:14.000Z","updated_at":"2023-03-06T21:43:45.000Z","dependencies_parsed_at":"2022-09-26T20:01:10.556Z","dependency_job_id":null,"html_url":"https://github.com/deiu/solidproxy","commit_stats":null,"previous_names":["solid/solidproxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiu%2Fsolidproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiu%2Fsolidproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiu%2Fsolidproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiu%2Fsolidproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deiu","download_url":"https://codeload.github.com/deiu/solidproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351389,"owners_count":21089271,"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":["data","delegation","linked","proxy-server","solid","webid","webid-tls-delegation"],"created_at":"2025-04-11T05:58:32.060Z","updated_at":"2026-01-11T22:55:34.294Z","avatar_url":"https://github.com/deiu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solidproxy\n[![](https://img.shields.io/badge/project-Solid-7C4DFF.svg?style=flat-square)](https://github.com/solid/solid)\n[![Build Status](https://travis-ci.org/deiu/solidproxy.svg?branch=master)](https://travis-ci.org/deiu/solidproxy)\n[![Coverage Status](https://coveralls.io/repos/github/deiu/solidproxy/badge.svg?branch=master)](https://coveralls.io/github/deiu/solidproxy?branch=master)\n[![Go report](https://goreportcard.com/badge/github.com/deiu/solidproxy)](https://goreportcard.com/report/github.com/deiu/solidproxy)\n[![GoDoc](https://camo.githubusercontent.com/be3d6b363bef3cc4f7ac7c0006e323c500dd171f/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f6a756c69656e7363686d6964742f68747470726f757465723f7374617475732e737667)](https://godoc.org/github.com/deiu/solidproxy)\n\n\nAgent/Proxy server with authentication (for WebID-TLS delegation) that can be used as a micro-service along a [Solid server](https://github.com/solid/solid-platform#servers).\n\n## Installation\n\n### Using the source code on Github\n\n`go get -u github.com/deiu/solidproxy/proxy-server`\n\n### Using the Docker image\n\n***Note:*** The docker image is configured to run on HTTP by default. This means that you should set up a reverse proxy using Nginx or Apache, and handle the HTTPS configuration there.\n\nFirst, you have to pull the docker image:\n\n\tdocker pull deiu/solidproxy\n\nNext, create a file called `env.list` in which you set the configuration variables (read below to find more about them).\n\nOnce you're done with the config, save the file and run the docker image:\n\n\tdocker run --env-file ./env.list -p \u003chost_proxyport\u003e:\u003ccontainer_proxyport\u003e -p \u003chost_agentport\u003e:\u003ccontainer_agentport\u003e deiu/solidproxy\n\nReplace the above port values with your own port numbers from your configuration.\n\n## Configuration for standalone server or docker image\n\nSolidproxy uses environment variables (for docker compatibility).\n\n* `SOLIDPROXY_VERBOSE` [default false] -- enables logging to `stderr`\n* `SOLIDPROXY_INSECURE` [default false] -- accept bad certificates (self-signed, expired, etc.) when connecting to remore servers\n* `SOLIDPROXY_PROXYPORT` [default 3129]-- the default port for the proxy service\n* `SOLIDPROXY_AGENTPORT` [default 3200]-- the default port for the agent WebID service\n* `SOLIDPROXY_AGENT` -- the URL (WebID) of the agent (in case it's on a different server). This is important if you want to use the proxy for delegation of authenticated requests.\n* `SOLIDPROXY_ENABLEPROXYTLS` -- enable HTTPS for the proxy service\n* `SOLIDPROXY_ENABLEAGENTTLS` -- enable HTTPS for the agent service\n* `SOLIDPROXY_TLSKEY` -- path to the TLS key file (using PEM format)\n* `SOLIDPROXY_TLSCERT` -- path to the TLS cert file (using PEM format)\n\n***Example:***\n\n```\nexport SOLIDPROXY_VERBOSE=\"1\"\nexport SOLIDPROXY_INSECURE=\"1\"\n\nexport SOLIDPROXY_PROXYPORT=\"3129\"\nexport SOLIDPROXY_AGENTPORT=\"3200\"\n\nexport SOLIDPROXY_AGENT=\"https://example.org:3200/webid#me\"\n\nexport SOLIDPROXY_ENABLEPROXYTLS=\"1\"\nexport SOLIDPROXY_ENABLEAGENTTLS=\"1\"\nexport SOLIDPROXY_TLSKEY=\"test_key.pem\"\nexport SOLIDPROXY_TLSCERT=\"test_cert.pem\"\n```\n\n### User profile configuration\n\nFor the delegated authentication to work, you need to indicate that you trust and use a third party agent to authenticate and perform requests on your behalf.\n\nThis is just a simple matter of adding the following triple to your WebID profile:\n\n```\n\u003chttps://bob.com/profile#me\u003e \u003chttp://www.w3.org/ns/auth/acl#delegates\u003e \u003chttps://example.org:3200/webid#me\u003e .\n```\n\nThis triple says that you *delegate* the agent with the WebID `https://example.org:3200/webid#me`.\n\n## Usage\n\nThe app spawns two servers. One that serves the proxy on port `3129` and route `/proxy` by default (i.e. `example.org:3129/proxy`). And another one on port `3200` and route `webid` (i.e. `example.org:3200/webid`), which serves the agent's WebID profile for authenticated requests.\n\n### Running as a micro-service\n\nIf you want to use the proxy, your Solid server needs to forward requests to the following URL:\n\n`https://example.org:3129/proxy?uri=https://alice.com/foo/bar`\n\nSay your Solid is available at `https://bob.com/`. You need to configure it so that it forwards all requests it receives at `https://bob.com/proxy` to the solidproxy server running at `https://bob.com:3129/proxy`.\n\nAditionally, if you want to use the delegation feature of the server, you need to specify the user on whose behalf the request is made. To do this, your server needs to set the `User` header to the WebID of the user.\n\nFor example, if your server considers Bob to be authenticated and wants to perform a request on Bob's behalf, then it will set the `User` header to Bob's WebID: `https://bob.com/webid#me` as seen below.\n\n```\nGET /proxy?uri=https://alice.com/foo/bar HTTP/1.1\nHost: example.org:3129\nUser: https://bob.com/webid#me\n...\n```\n\n### Running as a library\n\nHere is a short example showing how you can use the proxy as a library in your own Go project.\n\n```golang\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/deiu/solidproxy\"\n)\n\nfunc main() {\n\tmux := http.NewServeMux()\n\n\t// Init logger\n\tlogger := log.New(os.Stderr, \"[debug] \", log.Flags()|log.Lshortfile)\n\n\t// Next we create a new (local) agent object with its corresponding key\n\t// pair and profile document and serve it under /agent\n\t// Alternatively, we can create a \"remote\" agent to which we need to \n\t// provide a cert (tls.Certificate) you can load from somewhere:\n\t// agent, err := solidproxy.NewAgent(\"https://example.org/agent#me\")\n\t// agent.Cert = someTLScert\n\t\n\tagent, err := solidproxy.NewAgentLocal(\"http://localhost:8080/agent#me\")\n\tif err != nil {\n\t\tlog.Println(\"Error creating new agent:\", err.Error())\n\t\treturn\n\t}\n\t// assign logger\n\tagent.Log = logger\n\t\n\t// Skip verifying trust chain for certificates?\n\t// Use true when dealing with self-signed certs (testing, etc.)\n\tinsecureSkipVerify := true\n\t// Create a new proxy object\n\tproxy := solidproxy.NewProxy(agent, insecureSkipVerify)\n\t// assign logger\n\tproxy.Log = logger\n\n\t// Prepare proxy handler and serve it at http://localhost:8080/proxy\n\tmux.HandleFunc(\"/proxy\", proxy.Handler) \n\n\t// The handleAgent is only needed if you plan to serve the agent's WebID\n\t// profile yourself; it will be available at http://localhost:8080/agent\n\tmux.HandleFunc(\"/agent\", agent.Handler) \n\n\tlogger.Println(\"Listening...\")\n\thttp.ListenAndServe(\":8080\", mux)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeiu%2Fsolidproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeiu%2Fsolidproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeiu%2Fsolidproxy/lists"}