Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy protocol v2 implementation #18

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

sabudaye
Copy link

@sabudaye sabudaye commented Jun 5, 2017

Proxy protocol v2 implementation
Use proxy_ip_list option for gen_mc:start_link to declare list of IPv4 (4 digit touple) addresses

Example:
Opts = [{addr, Addr}, {port, Port}, {rps, false}, {proxy_ip_list, [{172,17,0,2}]}],
gen_mc:start_link({local, ServerName}, ?MODULE, [], Opts).

Then you need to implement handle_accept(Pid, {Addr, ProxyOpts}, From, St) function,
where ProxyOpts is a List of

[source_address :: inet:ip_address(),
dest_address :: inet:ip_address(),
source_port :: inet:port_number(),
dest_port :: inet:port_number(),
connection_info = []]

s.budaev added 9 commits June 5, 2017 12:06
…c/proxy-protocol.txt)

Use proxy_ip_list option for gen_mc:start_link to declare list of IPv4 (4 digit touple) addresses
Example:
Opts = [{addr, Addr}, {port, Port}, {rps, false}, {proxy_ip_list, [{172,17,0,2}]}],
gen_mc:start_link({local, ServerName}, ?MODULE, [], Opts).

Then you need to implement handle_accept(Pid, {Addr, ProxyOpts}, From, St) function,
where ProxyOpts is a List of
[source_address :: inet:ip_address(),
dest_address :: inet:ip_address(),
source_port :: inet:port_number(),
dest_port :: inet:port_number(),
connection_info = []]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant