Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Synchronet Synchronet
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 194
    • Issues 194
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main
  • SynchronetSynchronet
  • Merge requests
  • !11

Merged
Created Oct 18, 2020 by Deon George@leenooksDeveloper

Enable obtaining source IP address if HAproxy is used

  • Overview 154
  • Commits 31
  • Pipelines 25
  • Changes 10

Hey Rob, I use SBBS in a docker container, but if I choose to deploy it in a swarm - because of docker NAT, all src IP addresses are from the docker host. (Which affects DNS resolution and an IP source address logic - like current connections, ip blocking etc.

To get around this, I wanted to put SBBS behind HAproxy, and leverage HAproxys "Proxy Protocol" which supplies the source address (and some other info) in the first TCP frame.

There may be a use case where folks want to put HAproxy in front SBBS to enable another layout of IP rule processing.

This patch parses that first frame to pluck the source IP address out and use it. (Please forgive my C++ coding - its not a language I code in - so if you see a better way of doing things, please make those changes - I'll learn something new if you do.)

...deon

Edited Nov 02, 2020 by Deon George
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: master