Giter VIP home page Giter VIP logo

Comments (6)

 avatar commented on May 27, 2024

Yes I can move this line at the start of the function that's not a problem.
In this case we might have a look too at settingswindow.py at the end of the SetSettings function of the ServerFrame class.
What I'm trying to understand is what would break a Torify Nicotine+ ?
The line you're referring to 'upnp.IsPossible()' only checks if either the upnpc binary or python miniupnpc module is available and don't send any packet on the network as far as I know.

from nicotine-plus.

 avatar commented on May 27, 2024

I've relocate the line at the top of the function OnFirstConnect() in frame.py.

I've also found another line to relocate in the upnp.py init function:

# Local LAN IP
self.internalipaddress = gethostbyname(gethostname())

This line was doing a NS lookup and i've pushed it back down to the function actually doing the port mapping so it's not called at initialization/check times. See https://github.com/gfarmerfr/nicotine-plus/commit/710621bc69ffb9179123bd94d0f5675996d0b208 in https://github.com/gfarmerfr/nicotine-plus/tree/avoid-unwanted-traffic-upnp

from nicotine-plus.

Mutnick avatar Mutnick commented on May 27, 2024

The error occurs when resolving the host name.

upnp = UPnPPortMapping() leading to the gethostbyname(gethostname()) is where the error occurs.

On windows, gaierror: [Errno 11003] getaddrinfo failed
On a Debian based machine, gaierror: [Errno -2] Name or service not known

I'll look into this further but the point remains that if someone doesn't want the upnp functionality for whatever reason, there is no need to be calling it at all.

from nicotine-plus.

 avatar commented on May 27, 2024

Just posted a few seconds ago :)
Could you check my last post and tells me what do you think of the solution ?

from nicotine-plus.

Mutnick avatar Mutnick commented on May 27, 2024

Thank you, looks good.

from nicotine-plus.

 avatar commented on May 27, 2024

Merged into master.

from nicotine-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.