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 proxy options to allow proxying tracker and peer connections #874

Open
wants to merge 16 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Remove useless conditions conditions

  • Loading branch information
yciabaud committed Sep 6, 2016
commit 04399a6759aae830b893c670a649ebdfa17e59da
@@ -122,9 +122,9 @@ function WebTorrent (opts) {
if (!socksProxy.proxy.type) socksProxy.proxy.type = 5

// Ensure electron-wrtc is used in electron with socks proxy
if (self.tracker && socksProxy && self.proxyOpts.proxyPeerConnections &&
if (self.tracker && self.proxyOpts.proxyPeerConnections &&
process && process.versions['electron'] &&
(!self.tracker.wrtc || (self.tracker.wrtc && !self.tracker.wrtc.electronDaemon))) {
self.tracker.wrtc && !self.tracker.wrtc.electronDaemon) {
console.warn('You need to provide an electron-wrtc instance in opts.wrtc to use Socks proxy in electron -> WebRTC is disabled')

This comment has been minimized.

Copy link
@romaincointepas

romaincointepas Sep 5, 2016

console.warn('You need to provide an electron-wrtc instance in opts.wrtc to use Socks proxy in electron -> WebRTC is disabled')

I don't think this warning should be thrown if self.tracker.wrtc === false.

This comment has been minimized.

Copy link
@yciabaud

yciabaud Sep 6, 2016

Author Contributor

You are right

self.tracker.wrtc = false
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.