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

Set a specific port for incoming peers instead of a random port #107

Closed
rpellerin opened this issue Aug 23, 2014 · 8 comments
Closed

Set a specific port for incoming peers instead of a random port #107

rpellerin opened this issue Aug 23, 2014 · 8 comments

Comments

@rpellerin
Copy link

At the moment, how can we set a specific port for incoming peers? I've read 'torrent-stream' documentation, and it's written that default port is 6881, but with peerflix that's not true. The port is randomly chosen.
It would be great if we could add an argument to peerflix that would specify a peer port. It's very annoying because I'm using iptables as a firewall.
Thanks

@mafintosh
Copy link
Owner

If you send me a PR that fixes this I'll happily merge it :)

@mafintosh
Copy link
Owner

--port-port [port] has been added in peerflix 0.14.0 which allows you to explicitly set a peer listening port

@rpellerin
Copy link
Author

Woow great! Thanks a lot!

@rpellerin
Copy link
Author

It doesn't seem to work. I tried 'peerflix -x 8889 ""' and 'peerflix --port-port 8889 ""' and then I did 'sudo netstat -taupe'. The output was:

tcp 0 0 :8888 *: LISTEN pi 71192 16663/peerflix
tcp 0 0 :8889 *: LISTEN pi 71181 16663/peerflix
udp 0 0 :49214 *: pi 71191 16663/peerflix

The port 49214 seems to have been randomely chosen and I think it's the peer port. If I start my firewall and allow TCP on port 8889, no peer is found. Any idea?
Thanks

@mafintosh
Copy link
Owner

It should be --peer-port [port]

@rpellerin
Copy link
Author

It doesn't appear in 'peerflix --help'. You said '--port-port' in your previous post. I'll try this tonight thanks

@mafintosh
Copy link
Owner

It should appear in peerflix --help. My output is:

Usage: peerflix magnet-link-or-torrent [options]

Options:
  -c, --connections  max connected peers                            [default: 100]
  -p, --port         change the http port                           [default: 8888]
  -i, --index        changed streamed file (index)
  -l, --list         list available files with corresponding index
  -t, --subtitles    load subtitles file
  -q, --quiet        be quiet
  -v, --vlc          autoplay in vlc*
  -s, --airplay      autoplay via AirPlay
  -m, --mplayer      autoplay in mplayer*
  -k, --mpv          autoplay in mpv*
  -o, --omx          autoplay in omx**
  -j, --jack         autoplay in omx** using the audio jack
  -f, --path         change buffer file path
  -b, --blocklist    use the specified blocklist
  -n, --no-quit      do not quit peerflix on vlc exit
  -a, --all          select all files in the torrent
  -r, --remove       remove files on exit
  -e, --peer         add peer by ip:port
  -x, --peer-port    set peer listening port     /// here it is :)
  -d, --not-on-top   do not float video on top
  --version          prints current version

* Autoplay can take several seconds to start since it needs to wait for the first piece
** OMX player is the default Raspbian video player

Which version are you using? peerflix --version

@rpellerin
Copy link
Author

My bad, it appears, I haven't read all. As I said I used -x without success. Can you show me your sudo netstat -taupe output please while using a specific port?

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

No branches or pull requests

2 participants