madcowfred / newsmangler

NNTP binary poster with mulitple connection support
37 stars 18 forks source link

No SSL = No security for uploads #13

Closed JackDandy closed 11 years ago

JackDandy commented 12 years ago

Under windows - even with my fakepoll patches i observed ...

asyncnntp.py was looping with

STATE_CONNECTING

given my connection details are SSL then can this be added, or am i missing something?

thanks in advance

madcowfred commented 12 years ago

SSL is sadly non-trivial to implement with async sockets under Python. I've looked into it but don't really have any plans to do it any time soon.

nickma82 commented 11 years ago

You are able to easily provide ssl for mangler.

For Debian based (Debian, Ubuntu): sudo apt-get install stunnel

# /etc/default/stunnel

# Change to one to enable stunnel automatic startup
ENABLED=1
FILES="/etc/stunnel/*.conf"
OPTIONS=""

# Change to one to enable ppp restart scripts
PPP_RESTART=0
# $vim /etc/stunnel/usenet.conf
client = yes

[nntp]
accept = 119
connect = your-provider.info:port

Finally modify your newsmangler.conf vim ~/.newsmangler.conf

[server]
# Connection info for the server
hostname: localhost
port: 119
madcowfred commented 11 years ago

^ stunnel is pretty easy to set up and use, I'll add some instructions to the README at some point.

orbisvicis commented 11 years ago

I recommend switching to twisted. The protocol is separate from the connection so it should support SSL out of the box. There also exists a Twisted.news.nntp.NNTPClient module so hopefully it should be a simpler drop-in replacement. Twisted provides its own logging but optionally can use python's logging module.