Skip to content

Put proxy support back in #30

Closed
Closed
@flashmob

Description

@flashmob

Even though proxying via Nginx is not necessary these days, proxy support may still be useful for load balancing purposes.

The proxy server uses the XCLIENT command to tell the server behind the proxy what the source IP address is.

Requirements:

Support the XCLIENT command (with an option to enable it in config).

case strings.Index(cmd, "XCLIENT") == 0:
				// Nginx sends this
				// XCLIENT ADDR=212.96.64.216 NAME=[UNAVAILABLE]
				client.Address = input[13:]
				client.Address = client.Address[0:strings.Index(client.Address, " ")]
				fmt.Println("client address:[" + client.Address + "]")
				responseAdd(client, "250 OK")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions