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

The port used by Joal is not seen as open by trackers #185

Open
rursache opened this issue Jan 31, 2023 · 16 comments
Open

The port used by Joal is not seen as open by trackers #185

rursache opened this issue Jan 31, 2023 · 16 comments

Comments

@rursache
Copy link

rursache commented Jan 31, 2023

Hi @anthonyraymond,

Thanks for this great project. I observed that Joal will 'seed' on port 49152 however when I open that port in my router, no tracker can see it as open. I've also tried portchecker.co, canyouseeme.org and others.

Using Joal via Docker with the following docker run command:

docker run -d \
  --name joal \
  --network=host \
  --restart unless-stopped \
  -e TZ=Europe/Bucharest \
  -v /private/path/to/data:/data \
  anthonyraymond/joal:latest \
  --joal-conf="/data" \
  --spring.main.web-environment=true \
  --server.port="6688" \
  --joal.ui.path.prefix="prefix" \
  --joal.ui.secret-token="token"

Yes, I know how to open ports as the qBitTorrent (Wireguard + others) port is open and it's visible by the above websites and trackers.

Any help? Some trackers will block any seeding attempts if the port is closed as uploading torrents IRL can't be done on closed ports.
Thank you

@laur89
Copy link
Contributor

laur89 commented Feb 3, 2023

@anthonyraymond is this because we're not really accepting any connections in ConnectionHandler?

Do you know what sort of I/O should happen between trackers and clients?

At any rate, started work on it here: https://github.com/anthonyraymond/joal/pull/187/files#diff-bc97f2cf481a4672f69346e371cb240ae51f309844399bda90a17072987b527dR79-R99

@rursache
Copy link
Author

rursache commented Feb 3, 2023

#187 should fix this, thanks @laur89!

is there any way to setup beta builds for docker? i would love to test the changes

@laur89
Copy link
Contributor

laur89 commented Feb 3, 2023

Check out corresponding branch & build the image: docker build .

@rursache
Copy link
Author

rursache commented Feb 3, 2023

@laur89 is it a drop-in replacement or should i update my config file? thanks again!

@laur89
Copy link
Contributor

laur89 commented Feb 3, 2023

Should be drop-in. If not, it's a bug.

@rursache
Copy link
Author

rursache commented Feb 3, 2023

it's working as expected, a simple drop-in replacement. thanks for your work.

please close this issue when it gets merged.

@laur89
Copy link
Contributor

laur89 commented Feb 3, 2023

Could you elaborate how you verified it? I have extremely low confidence in the current implementation, as I have no idea what communication, if any, trackers perform with the clients.

@rursache
Copy link
Author

rursache commented Feb 3, 2023

the trackers now see joal as a connectable client and the port seems open by using the sites in the issue description. i think most trackers just test if that port is actually open, nothing more. however, this could change from tracker to tracker. on mine it seems all good for now.

happy to provide more details/logs if needed

@anthonyraymond
Copy link
Owner

Hello,

Indeed the ConnectionHandler is not fully implemented. Ideally you would listen for peers request and answer with "choke". That's the ultimate goal of this class.

But in any case you'll need to open the port on your router. To be able to seed you need to have an open port on your router, there is no way around. Unless there is some part of the BitTorrent protocol that allow another way (maybe the client can send random parts to randiom peers on his behalf), i don't know the protocol very much on this part, i've never took time to fully RTFM ^^.
To have this port open, most BitTorrent client use UPnP to automatically create a port forwarding rule on your routers. This allow incomming traffic from the internet to reach your client.

@rursache
Copy link
Author

rursache commented Feb 6, 2023

@anthonyraymond Port forwarding is not an issue, as I said myself, it's needed for the bittorrent protocol. I did it on qBitTorrent and I did it for Joal.

After using @laur89's build, the trackers previously reporting Joal as "not connectable" are now "connectable" and they receive the "seeding effort" as previously, on the official Joal build, they did not.

I'm not knowledgeable enough to say if @laur89's implementation is perfect or ideal but it clearly improved the "handshake" with the trackers I had issues before.

EDIT: I'm open to sponsor both of you to get this project forward but neither have provided a way to do so 👀

@anthonyraymond
Copy link
Owner

@rursache i know, i've red through the entire post, but i've provided extra details to keep here for future possible improvements.

I've not enabled sponsorship for now. I'm in the midle of rewriting the whole project in another language. Adding some high requesting feature along the way.
When the new version gets released / stable, i'll provide some retribution options. For now, even if JOAL works perfectly and the overall experience is totally safe for users, the code base has grown from an original poorly designed structure. I won't feel conformtable making money out of this.

@datsoy
Copy link

datsoy commented May 28, 2023

Hi, may I know what port joal uses from 49152-65534 range?
Or is there a default one? Need to know what port to open. Thanks.

@rursache
Copy link
Author

@datsoy its 49152 as i said in my initial post.

@datsoy
Copy link

datsoy commented May 28, 2023

@datsoy its 49152 as i said in my initial post.

Thank you,
49152 is for outgoing port right?
Is there a incoming port should I open?
And I see ports for protocol handler and tomcat, Do i need them?

@rursache
Copy link
Author

@datsoy i have no idea what you're talking about. just open port 49152 and you're done.

@laur89
Copy link
Contributor

laur89 commented May 29, 2023

Hi, may I know what port joal uses from 49152-65534 range? Or is there a default one? Need to know what port to open. Thanks.

It uses the first port in that range it's able to bind to. Assuming no other program is using port 49152, it will be used. If it's already in use, then it'll try 49153 and so on until 65534.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants