-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
The TransparentProxyServer constructor does not validate the parameter but the field which always have the default value, invalidating the guard clauses.
| public TransparentProxyServer(IPEndPoint localEP, IProxyServerConnectionManager connectionManager = null, TransparentProxyServerMethod method = TransparentProxyServerMethod.DNAT, int backlog = 10) | |
| { | |
| if (_method != TransparentProxyServerMethod.Tunnel) | |
| { | |
| if (Environment.OSVersion.Platform != PlatformID.Unix) | |
| throw new NotSupportedException("Only Unix/Linux is supported."); | |
| if ((method == TransparentProxyServerMethod.DNAT) && (localEP.AddressFamily != AddressFamily.InterNetwork)) | |
| throw new NotSupportedException("Only IPv4 is supported with DNAT."); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels