Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add announce_port support #21692

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xThiebaut
Copy link

@0xThiebaut 0xThiebaut commented Oct 27, 2024

The announce_port setting permits to overwrite the port passed along to trackers as the &port= parameter. If left as the default, the listening port is used. This setting is only meant for very special cases where a seed's listening port differs from the effectively exposed port (e.g., through external NAT-PMP). See arvidn/libtorrent#7771 for an example use-case.

This PR adds the relevant setting alongside the existing announce_ip setting.
image

The setting subsequently modifies the announced port (&port=1234):

127.0.0.1 - - [27/Oct/2024 09:44:16] "GET /announce?info_hash=%a7%801%f7%3b%a1k%3a%8e%b6%84%dd%cfyw%f1%f3%b8m!&peer_id=-qB5100-YwWihiQ4KGdM&port=1234&uploaded=0&downloaded=0&left=0&corrupt=0&key=CEDD0BC7&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0&ip=1.2.3.4 HTTP/1.1" 404 -

src/base/bittorrent/sessionimpl.cpp Outdated Show resolved Hide resolved
src/base/bittorrent/sessionimpl.cpp Show resolved Hide resolved
src/gui/advancedsettings.h Outdated Show resolved Hide resolved
src/gui/advancedsettings.cpp Outdated Show resolved Hide resolved
src/gui/advancedsettings.cpp Show resolved Hide resolved
src/webui/www/private/views/preferences.html Outdated Show resolved Hide resolved
@Chocobo1 Chocobo1 added the WebUI WebUI-related issues/changes label Nov 9, 2024
@0xThiebaut
Copy link
Author

On a side-note, the requires restart statement was copied over from the similar announce_ip setting; I'm however doubting whether this is an accurate statement for both.

Copy link

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

@github-actions github-actions bot added the Stale label Jan 10, 2025
Copy link

This PR was closed because it has been stalled for some time with no activity.

@github-actions github-actions bot closed this Jan 18, 2025
@Neustradamus
Copy link

@0xThiebaut: What is the situation of your PR?

@0xThiebaut
Copy link
Author

@Neustradamus this PR was closed due to inactivity as completing the PR required the upstream arvidn/libtorrent#7771 change to reach a release. libtorrent:v2.0.11 was released 3 days ago so I will re-open the PR this weekend.

@xavier2k6
Copy link
Member

@0xThiebaut FYI - libtorrent 2.0.11 isn't available in our CI yet, however #22217 is open/approved & should be merged within the next day.

@0xThiebaut
Copy link
Author

Thanks for the heads-up @xavier2k6 , any chance you have the permissions to reopen this PR? It was closed as stale and I'd prefer re-opening it to maintain the history instead of filing a new one.

@xavier2k6 xavier2k6 reopened this Jan 31, 2025
@xavier2k6
Copy link
Member

Re-opened

@0xThiebaut
Copy link
Author

Pending #22217

@0xThiebaut 0xThiebaut marked this pull request as ready for review January 31, 2025 21:21
@0xThiebaut 0xThiebaut changed the title [Draft] Add announce_port support Add announce_port support Jan 31, 2025
@xavier2k6
Copy link
Member

Pending #22217

Merged now.

@xavier2k6
Copy link
Member

@0xThiebaut It mat be worthwhile to re-base.

@0xThiebaut 0xThiebaut force-pushed the announce_port branch 2 times, most recently from 00c4d70 to b76b3a5 Compare February 4, 2025 12:11
@0xThiebaut
Copy link
Author

@0xThiebaut It mat be worthwhile to re-base.

Rebased.

@Chocobo1 Chocobo1 added the Core label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants