It would be nice if SABnzbdplus could bind to multiple addresses (and maybe ports). That way, SAB would be reachable on all it's IPv4 and IPv6 addresses, i.e. 127.0.0.1, 192.168.1.72, 2001:888:197d::1 and maybe it's host name.
Fix for #537 (Support for listening on multiple ports). cherrypy.server now has no "httpserver" attribute; instead, it has an "httpservers" attribute, a dict of the form {server object: bind_addr} where bind_addr is usually (host, port). New start_all method. Calling stop stops all httpservers, and restart stops all then restarts all.
Thanks!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
The new cherrypy.server object can now control more than one HTTP server. Add additional ones via server.httpservers[myserver] = (host, port). This can be used to listen on multiple ports or protocols.
It is not-known when we will add CherryPy 3 support, but it shouldn't be too far off.
I too, would like to get IP Binding working with SAB, as this is the most missed feature when I switched from using Hella.
I am on OSX 10.5.2 (Mac Mini), and as OSX has ability to create IP Multihoming/multiple IPs per interfaces, I have setup multiple IPs, each using different gateways.
Basically, the reason for doing this is so that on one machine, I could have SAB downloading in the background binding to IP two using gateway two, while browse using the default IP one, on gateway one. This allows both my browsing, and my SAB NZB downloads to go full speed.
Would this configuration be possible on current SAB 0.3.4 on OSX? If so, could you point me to the direction of setting this up?
I have looked at this in the past.
The Python socket library does not support binding to a specific network interface.
So implementing this is a real big challenge.
Volunteers?
Last edited by shypike on April 14th, 2008, 6:21 am, edited 1 time in total.
sander wrote:0.0.0.0 works for IPv4, but not for IPv6 like http://[::1]:8080/sabnzbd/queue/
It is possible to make sabnzbd+ (tested on 0.4 beta 2) bind to all (and only) ipv6 addresses, by specifying --server :::8080 (so without any square brackets). This seems a bit non-standard, as normally ipv6 ip addresses in urls and so on are indeed specified like [::1] (or [::] for "all zero"). In addition, sabnzbd+ in this case fails to open the proper address in the browser on startup, instead it tries to connect to http://:::8080/sabnzbd which is definately a bug.
Given the above, the only things currently impossible are (1) to make sabnzbd+ listen on both all v4 and all v6 at the same time, and (2) to specify which interfaces to listen on. Both can be reasonably well worked around using firewall rules and/or forwarding apps (think the likes of 6tunnel).
Last edited by jcfp on April 14th, 2008, 9:42 am, edited 1 time in total.
I think the question was how do I connect to a Usenet server, forcing the use of a particular (virtual) network interface?
Suppose the network card gets assigned two different IP addresses (OSX can handle that) 192.168.1.5 and 192.168.1.6.
The request was to tell SABnzbd to make the connection to the Usenet server, via 192.168.1.5 and not the other one.
This is something Python does not enable you to do, at least I don't know how.
Letting the web-server part (= CherryPy) listen to multiple IP addresses is something completely different.
And indeed it is not supported by CherryPy2 and we need to migrate to CherryPy3 to be able to do it.
Last edited by shypike on April 15th, 2008, 2:03 pm, edited 1 time in total.
Yup, I know about the limitations (and worse) of cherrypy v2 vs. v3. I was responding to the (much older) post by Sander, which describes a problem I also ran into and made me run into a bug in sabnzbd (will post separately).
Regarding binding outgoing connections to a news server to a certain ip, hellanzb (which according to Beenthere supports binding to specific ip addresses for outgoing connections) is also written in python; I think it uses something called "twisted python" for its connectivity. That project's code might provide a clue as to how to achieve this in python.
Last edited by jcfp on April 15th, 2008, 11:39 am, edited 1 time in total.