[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] Proxy support patch



On Tue, Oct 7, 2014 at 7:46 AM, CustaiCo <custaico@...373...> wrote:
> I have completed the work to add proxying to msmtp without any
> dependancy on any other library. Initially I was just linking against
> the proxychains code.

socks5 seems the most common, which this patch handles.
And proxy.c has socks4.
Though should we add socks4a for completeness?

Lint...

# fn name in comment doesnt exist
     33 + * net_proxy_connect()
# lines are different text
    175 + * proxychains The 'good parts' version by CustaiCo
    461 +/* proxychans - The 'good parts' edition - CustaiCo */
# bad comment form
    142             len=strlen(user)+1; // username

> I still
> haven't changed the auto configuration macros to add proxy.h and proxy.c
> to the build.

# don't think this is actually needed given HAVE_PROXY exists
src/proxy.h:18:#ifndef __PROXY_HEADER


net.c: In function 'net_connect_proxy':
net.c:358: warning: implicit declaration of function 'tunnel_to'
net.c:358: error: 'SOCKS5_TYPE' undeclared (first use in this function)

I must have missed something to still get the above.

> Included is completely untested ipv6 support when using a proxy. I've
> written it in a way that I *think* ipv6 should but I have no way to
> actually test this due to lack of one that supports the protocol.

Dante or some of the other socks5 tools listed might have an IPv6
server that could be easily tested against through ports on ::1. ie:
msmtp -> [::1]:1111 (dante socks5) -> [::1]:2222 (netcat TCP listen)