On Tue, Nov 11, 2008 at 1:05 AM, Egon Willighagen <[EMAIL PROTECTED]> wrote: > being rather interested in your patch, I tried to find where you added > the line, but could not find it. Maybe it's because I'm running 0.1.5 > and on Ubuntu, not Debian, but could you give some details (patch?) > where you added that addr.startswith('192.168.') line...
The change is to the line in apt_p2p/HTTPServer.py (should be around 266) that says: if request.remoteAddr.host != "127.0.0.1": That allows only the local host to send apt requests (everyone else matches this if statement, and so gets blocked). If you want anyone on your local network to be able to send requests, you can change it to: if (request.remoteAddr.host != "127.0.0.1" and not request.remoteAddr.host.startswith("192.168.")): replacing "192.168." with whatever prefix is appropriate to your local network. You could add more ands to the if for other local prefixes you want to allow here too. The logic gets a little confusing here, but if you want to make it seem simpler the above should be equivalent to: if not (request.remoteAddr.host == "127.0.0.1" or request.remoteAddr.host.startswith("192.168.")): I hope that helps. Feel free to ask more questions if you still can't get it to work. Cameron -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]