syncthing/cmd/stdiscosrv
vapatel2 854499382e
cmd/stdiscosrv: Prevent nil IPs from X-Forwarded-For (fixes #9189) (#9190)
### Purpose

Treat X-Forwarded-For as a comma-separated string to prevent nil IP being returned by the Discovery Server

### Testing

Unit Tests implemented

Testing with a Discovery Client can be done as follows:
```
A simple example to replicate this entails running Discovery with HTTP, use Nginx as a reverse proxy and hardcode (as an example) a list of IPs in the X-Forwarded-For header.
1. Send an Announcement with tcp://0.0.0.0:<some-port>
2. Query the DeviceID
3. Observe the returned IP Address is no longer nil; i.e.  `tcp://<nil>:<some-port>`
```
2023-11-08 11:10:23 +00:00
..
etc etc: Fix misleading comment in discosrv options file (#6258) 2020-01-06 22:43:41 +00:00
scripts build, etc: Add systemd units and ufw rules for relay and discovery (fixes #5115) (#5350) 2019-08-08 18:04:52 +02:00
apisrv_test.go cmd/stdiscosrv: Prevent nil IPs from X-Forwarded-For (fixes #9189) (#9190) 2023-11-08 11:10:23 +00:00
apisrv.go cmd/stdiscosrv: Prevent nil IPs from X-Forwarded-For (fixes #9189) (#9190) 2023-11-08 11:10:23 +00:00
database_test.go all: Support multiple device connections (fixes #141) (#8918) 2023-09-06 12:52:01 +02:00
database.go all: Support multiple device connections (fixes #141) (#8918) 2023-09-06 12:52:01 +02:00
database.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
database.proto all: Update protobuf package 1.0.0 -> 1.2.0 (#5452) 2019-01-14 11:53:36 +01:00
main.go cmd/stdiscosrv: Separate HTTPS and replication certificates 2023-08-23 13:43:54 +02:00
README.md build: Packaging for stdiscosrv 2018-01-16 20:46:48 +01:00
replication.go cmd/stdiscosrv: Slightly tweak replication settings 2023-10-04 14:15:00 +02:00
stats.go all: Minor deprecation updates 2022-07-28 17:54:12 +02:00

stdiscosrv

This is the global discovery server for the syncthing project.

Usage

https://docs.syncthing.net/users/stdiscosrv.html