nurdism / neko

A self hosted virtual browser (rabb.it clone) that runs in docker.
Apache License 2.0
2.03k stars 185 forks source link

[FEATURE] Catch true IP for reverse proxies #46

Closed TiredSysOp closed 4 years ago

TiredSysOp commented 4 years ago

Is your feature request related to a problem? Please describe. Can't IP ban people behind nginx as I can't get nginx to pass user IPs to neko and all users essentially have the same ip so ip banning results in banning all users

Describe the solution you'd like extract client IP from reverse proxy on the backend:

  1. Non-standard de-facto X-Forwarded-For HTTP request header, contains all the proxies passed and requesting client IP address(es).

  2. Forwarded HTTP request header, is a new standardized way to replace X-Forwarded-For, also contains IP addresses for all proxies passed and requesting client.

  3. X-Real-IP HTTP request header, or any custom HTTP request header, to arbitrarily contain client IP address.

Describe alternatives you've considered Running neko without nginx

Additional context nginx is required as there are multiple services running on the same box

TiredSysOp commented 4 years ago

Currently using return 301 https://example.com:8080$request_uri$is_args$args; as a dirty workaround to expose neko to the internet