-
-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Hey @song940 first, great project!
Can you perhaps give all sockets the proxy protocol header? I would like to give the real client IP from the proxy. That the DNS server gets the correct IP from the client.
https://github.com/moznion/proxy-protocol-js
I imagined it in such a way that you can specify in the config whether you use it or not.
It should be enough to read the sockets and parse the header first before parsing the packets:
const proto = proxyProtocol.V1ProxyProtocol.parse(dnspacket);
console.log(proto);
// => V1ProxyProtocol {
// inetProtocol: 'TCP4',
// source: Host { ipAddress: '127.0.0.1', port: 12345 },
// destination: Host { ipAddress: '192.0.2.1', port: 54321 },
// data: '' }
const dnsrequest = proto.data
Metadata
Metadata
Assignees
Labels
No labels