Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: ports/tor/tor.js

Issue 1311703003: Added Tor Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ports/tor/pkg_info ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 NaClTerm.nmf = 'tor.nmf';
8
9 /* check whether another instance of this app is running
10 #TODO(dt) check if default port is occupied
11 #TODO(dt) check if(allowed) another tor process is running outside chrome. */
12 function anotherTorRunning(){
13 // since chrome 34 multiple windows in apps are not allowed by default
14 // thus returning false without any checking, (for now)
15 // return NaClTerm.started;
16 return false;
17 }
18
19 function populateArgv() {
20 //TODO(dt) get parameters from storage once GUI is ready.
21 //tor socks proxy port
22 NaClTerm.argv = ['--SOCKSPort', '9999'];
23 //playing it safe for now,tor creates relays/bridges through
24 // these addresses only
25 NaClTerm.argv = NaClTerm.argv.concat(['ReachableAddresses','*:80,*:443']);
26 }
27
28 function runTor() {
29 if(!anotherTorRunning()){
30 populateArgv();
31 NaClTerm.init();
32 }
33 }
34
35 window.onload = function() {
36 lib.init(function() {
37 runTor();
38 });
39 };
OLDNEW
« no previous file with comments | « ports/tor/pkg_info ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698