websocket: record X-Real-IP header
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
We currently don't support TLS here, so a reverse proxy needs to be set up, which has the side effect of loosing real ip addresses in `ipfs swarm peers`.
We could check if the `X-Real-IP` header is set when accepting connections and change the ip address we report as the remote (and probably only do that when we proxy from localhost)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where websocket connections are accepted and where the remote address reported by `ipfs swarm peers` is derived. Review how `X-Real-IP` would be trusted when proxying from localhost, then define tests for connections with and without the header. Done means the reported address preserves the real client IP only under the intended proxy conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100