frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
455 stars 138 forks source link

start_upnp() #86

Closed WhiteTrashLord closed 8 years ago

WhiteTrashLord commented 8 years ago

Solved

aldenml commented 8 years ago

UPnP is enable by default when you create a session (the same way libtorrent behave). We didn't expose a toggle UPnP in jlibtorrent, but you can code it the same way it's for DHT, see https://github.com/frostwire/frostwire-jlibtorrent/blob/master/src/main/java/com/frostwire/jlibtorrent/DHT.java#L206

aldenml commented 8 years ago

Thank you for the info, it is always good to double check the default values. The documentation you are pointing out is for a very old version 0.16.18.

Here it is the new documentation http://www.rasterbar.com/products/libtorrent/reference-Settings.html#enable_upnp, it is enable by default :)

Do you have any problems with it?

aldenml commented 8 years ago

No idea, is this torrent popular? are a lot of peers in the swarm?

aldenml commented 8 years ago

I think that is the idea, if there are a lot of peers, eventually you get less and less request of pieces.

Put the corresponding mask and print: ListenSucceededAlert, ListenFailedAlert and Portmap* alerts

WhiteTrashLord commented 8 years ago

How to increase active_limit? It seems to be very important.

aldenml commented 8 years ago
SettingsPack sp = new SettingsPack();
pack.setInteger(settings_pack.int_types.active_limit.swigValue(), <value>);
session.applySettings(sp);
WhiteTrashLord commented 8 years ago

Thanks. Maybe you should make a method like setActiveLimit(int limit).

gubatron commented 8 years ago

@WhiteTrashLord here are the settings I use in libtorrent to enable super seeding

max_upload_speed -1 
auto_managed 0
max_active_downloading -1
max_active_limit -1
max_active_seeding -1 
max_connections_global 200 
max_connections_per_second 20 
max_connections_per_torrent -1 
max_download_speed -1 
max_download_speed_per_torrent -1 
max_half_open_connections 50 
max_upload_slots_global 100  
max_upload_slots_per_torrent -1
seed_time_limit -1
seed_time_ratio_limit -1
share_ratio_limit -1
stop_seed_ratio -1
WhiteTrashLord commented 8 years ago

@gubatron Thanks but I think your settings are not original Libtorrent settings. Do you use Deluge?

gubatron commented 8 years ago

yes those are my deluge server settings

On Fri, Apr 15, 2016 at 12:00 PM WhiteTrashLord notifications@github.com wrote:

@gubatron https://github.com/gubatron Thanks but I think your settings are not original Libtorrent settings. Do you use Deluge?

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/frostwire/frostwire-jlibtorrent/issues/86#issuecomment-210566043