Skip to content

Commit c7334c5

Browse files
committed
added advance options functionality,
updated instructions. recompiled tor with new toolchain.
1 parent 19a0a2d commit c7334c5

File tree

13 files changed

+892
-629
lines changed

13 files changed

+892
-629
lines changed

Diff for: _platform_specific/i686/tor.nexe

128 KB
Binary file not shown.

Diff for: _platform_specific/x86_64/tor.nexe

128 KB
Binary file not shown.

Diff for: gui/css/theme.css

+17-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ body.hide {
6161
width: calc(100% - 16px); }
6262

6363
.main-container {
64-
padding: 16px; }
64+
padding: 16px;}
6565
.main-container .mdl-progress {
6666
width: 100%; }
6767
.main-container .advanced-button {
@@ -154,7 +154,7 @@ body.hide {
154154
.main-container .mdl-card .mdl-card__actions.expand {
155155
opacity: 1; }
156156
.main-container .mdl-card .mdl-card__actions.proxycard {
157-
height: 200px;
157+
height: inherit;
158158
overflow: visible; }
159159
.main-container .mdl-card .mdl-card__actions.cportcard {
160160
height: 64px; }
@@ -360,6 +360,9 @@ body.hide {
360360
.first-time-dialog--overlay .demo-card-square #ok_button {
361361
display: block;
362362
margin: 0 auto; }
363+
.first-time-dialog--overlay .demo-card-square #anonymity_ok_button {
364+
display: block;
365+
margin: 0 auto; }
363366

364367
.first-time-dialog--overlay.visible {
365368
opacity: 1;
@@ -392,3 +395,15 @@ body.dark {
392395
background-color: #2F536B; }
393396
body.dark .mdl-menu__outline {
394397
background-color: #163F5A; }
398+
399+
#anonymity{
400+
display:none;
401+
}
402+
403+
.main-container .mdl-card .mdl-card__actions.advoptcard {
404+
height: 90px;
405+
}
406+
407+
#settings_container{
408+
margin-left: 6%;
409+
}

Diff for: gui/js/main.js

+19-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ document.addEventListener('DOMContentLoaded', function () {
1515
accessible_ports: "all",
1616
reachable_addresses: "all",
1717
tor_port: 9999,
18-
theme: "light"
18+
theme: "dark",
19+
adv_opt:"none"
1920
}, function (items) {
2021
//console.log(items);
2122
if (items.restarting_tor || items.autostart_tor) {
@@ -26,6 +27,7 @@ document.addEventListener('DOMContentLoaded', function () {
2627
});
2728
chrome.storage.local.set({ restarting_tor: false });
2829
document.getElementById('start_button_text').innerHTML = "Restart Tor";
30+
document.getElementById('anonymity').setAttribute('style', 'display:inline-block');
2931
}
3032
set_gui(items);
3133
set_settings(items); // in tor.js
@@ -54,6 +56,11 @@ document.getElementById('ok_button').addEventListener("click", function () {
5456
chrome.storage.local.set({ firstrun: false });
5557
});
5658

59+
//anonymity
60+
document.getElementById('anonymity_ok_button').addEventListener("click", function () {
61+
document.getElementById('anonymity-help--overlay').classList.remove('visible');
62+
});
63+
5764
//start / restart tor button
5865
document.getElementById('start_button').addEventListener("click", function () {
5966
if (document.getElementById('start_button_text').innerHTML == "Start Tor") {
@@ -63,6 +70,7 @@ document.getElementById('start_button').addEventListener("click", function () {
6370
});
6471
updateTorStatus( "Tor is running, see below for details.");
6572
document.getElementById('start_button_text').innerHTML = "Restart Tor";
73+
document.getElementById('anonymity').setAttribute('style', 'display:inline-block');
6674
} else {
6775
chrome.storage.local.set({ restarting_tor: true });
6876
document.querySelector('body').classList.add('hide');
@@ -110,4 +118,13 @@ document.getElementById('help').addEventListener("click", function () {
110118
setTimeout(function () {
111119
window.location.assign("about.html");
112120
}, 300);*/
113-
});
121+
});
122+
123+
//anonymity
124+
document.getElementById('anonymity').addEventListener("click", function () {
125+
document.getElementById("anonymity-help--overlay").classList.add("visible");
126+
/*document.querySelector('body').classList.add('hide');
127+
setTimeout(function () {
128+
window.location.assign("about.html");
129+
}, 300);*/
130+
});

Diff for: gui/js/settings.js

+43-6
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ var error_count = 0;
88

99
//settings key value pair
1010
var default_settings = {
11-
theme: "light",
11+
theme: "dark",
1212
proxy_type: "none",
1313
proxy_address: "none",
1414
proxy_port: "none",
1515
autostart_tor: false,
1616
accessible_ports: "all",
17-
tor_port: 9999
17+
tor_port: 9999,
18+
adv_opt:"none"
1819
};
1920

2021
document.addEventListener('DOMContentLoaded', function () {
@@ -49,6 +50,12 @@ function populate_gui(items) {
4950
to_be_saved["accessible_ports"] = true;
5051
document.getElementById('acsport__port').value = items.accessible_ports;
5152
}
53+
// advance options
54+
if (items.adv_opt != "none") {
55+
document.getElementById("adv_opt").click();
56+
to_be_saved["adv_opt"] = true;
57+
document.getElementById("adv_opt_text").value = items.adv_opt;
58+
}
5259
//set tor port
5360
document.getElementById('cport__port').value = items.tor_port;
5461
}
@@ -98,7 +105,7 @@ document.getElementById('select_proxy').addEventListener("click", function (e) {
98105
//set text of drop down
99106
document.getElementById('proxy_text').innerHTML = e.target.getAttribute("data-text");
100107
});
101-
//accessible port
108+
//accessible port
102109
document.getElementById('acsport').addEventListener("click", function () {
103110
var chk = this.checked;
104111
if (chk) {
@@ -112,6 +119,21 @@ document.getElementById('acsport').addEventListener("click", function () {
112119
to_be_saved["accessible_ports"] = false;
113120
}
114121
});
122+
123+
//advance options
124+
document.getElementById('adv_opt').addEventListener("click", function () {
125+
var chk = this.checked;
126+
if (chk) {
127+
document.getElementById('adv_opt_card').classList.add('expand');
128+
document.getElementById('adv_opt_card').classList.add('advoptcard');
129+
to_be_saved["adv_opt"] = true;
130+
}
131+
else {
132+
document.getElementById('adv_opt_card').classList.remove('expand');
133+
document.getElementById('adv_opt_card').classList.remove('advoptcard');
134+
to_be_saved["adv_opt"] = false;
135+
}
136+
});
115137
//autostart_tor
116138
document.getElementById('autostart_tor').addEventListener("click", function () {
117139
if (this.checked) {
@@ -278,13 +300,28 @@ function save_settings() {
278300
settings["reachable_addresses"] = "all";
279301
settings["accessible_ports"] = "all";
280302
}
303+
304+
// ---------- advance options -----------
305+
if (to_be_saved["adv_opt"]) {
306+
var adv_opt = document.getElementById('adv_opt_text').value;
307+
var error = false;
308+
if (adv_opt == "") {
309+
raise_error("advance option cannot be empty, please disable it or give the options", "adv_opt_text");
310+
error = true;
311+
}
312+
if (!error) {
313+
settings["adv_opt"] = adv_opt;
314+
}
315+
} else {
316+
settings["adv_opt"] = "none";
317+
}
281318
//---------------saving settings----------
282319
if (error_count == 0) {
283320
chrome.storage.local.set(settings, function () {
284-
console.log(to_be_saved);
285-
console.log(settings);
321+
//console.log(to_be_saved);
322+
//console.log(settings);
286323
});
287324
}
288325
}
289326
//save settings
290-
document.getElementById('save').addEventListener("click", save_settings);
327+
document.getElementById('save').addEventListener("click", save_settings);

Diff for: gui/main.html

+117-14
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ <h6 class="h6padding--fix">
4848
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent advanced-button">
4949
<span id="start_button_text">Start Tor</span>
5050
</button>
51+
<button id="anonymity"
52+
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent advanced-button">
53+
Are you browsing anonymously ?
54+
</button>
5155
<label id="autostart_checkbox_cover" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect autostart_fix"
5256
for="autostart_checkbox">
5357
<input type="checkbox" id="autostart_checkbox" class="mdl-checkbox__input"/>
@@ -72,54 +76,153 @@ <h2 class="mdl-card__title-text">
7276
Thanks for installing KroTor, with this app you can access internet via Tor. [visit any blocked
7377
websites, browse anonymously etc]<br/>
7478
Once started, tor socks proxy will be available <em>on your system</em> which can be accessed at
75-
127.0.0.1:9999
79+
127.0.0.1:9999<br/>
80+
This app is open sourced, for details click <a href="https://deepankar.io/krotor"
81+
target="_blank">here</a>.
7682
</p>
7783
<hr/>
7884
<p>
79-
<strong>Usage Instructions</strong>
80-
<br/>Chrome Apps (such as this one) cannot set the proxy settings in the Chrome browser,
81-
<em> In order to use Tor Socks proxy created by this app, please configure any extension or system
82-
settings accordingly.</em> <br/>
83-
<em>For example:</em> <br/>
84-
You can use extension <a
85+
<strong>Instructions</strong><br/>
86+
In order to use Tor Socks proxy created by this app, please configure any extension/system
87+
settings/apps accordingly.<br/>
88+
<em>Following instructions are only applicable for Google Chrome.</em><br/>
89+
Chrome Apps (such as this one) cannot set the proxy settings in the Chrome browser, only extensions can
90+
do so.As an example, one can use extension <a
91+
href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif"
92+
target="_blank">ProxySwitchyOmega(open sourced)</a><br/>
93+
<strong>Setup</strong>
94+
<em>This is one time process.</em><br/>
95+
Install <a
8596
href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif"
86-
target="_blank"> SwitchyOmega</a> with following settings<br/>
97+
target="_blank">ProxySwitchyOmega</a> or any proxy extension.<br/>
98+
Create a proxy profile named KroTor with following settings.<br/>
8799
protocol : socks5<br/>
88100
server : 127.0.0.1<br/>
89101
port : 9999 (or the tor port you defined in settings)<br/>
90-
<em>In future, there is plan to create a companion extension for this app.</em>
102+
<strong>Using it</strong><br/>
103+
1. Run KroTor, click on Start Tor, <em>make sure you see "Bootstrapped 100%" in terminal window(app's
104+
middle section with black background)</em><br/>
105+
2. Enable KroTor proxy in SwitchyOmega's dropdown menu(click its icon i.e. black O on right side of
106+
address bar)
91107
</p>
92108
<hr/>
93109
<p>
94-
To verify that you are on Tor network, please visit : <a href="https://check.torproject.org" target="_blank">https://check.torproject.org</a>
110+
To verify that you are on Tor network, please visit : <a href="https://check.torproject.org"
111+
target="_blank">https://check.torproject.org</a>
95112
</p>
96113
<hr/>
97114
<p>
98115
If Tor takes too long to connect, try enabling/modifying accessible ports in settings.
99116
</p>
100117
<hr/>
118+
<p>
119+
If you face any issue, <a href="https://codebuff.net/krotor/support" target="_blank">please ask on the
120+
support page</a>.
121+
</p>
122+
<hr/>
123+
<p>
124+
<Strong>Advance options.</Strong><br/>
125+
If you want set exitnodes, provide username/password for (network)proxy etc, you can do so by enabling
126+
advance options in settings and provide them in format OPTIONS values<br/>
127+
As an example:<br/>
128+
For exitnodes: ExitNodes node,node,…<br/>
129+
For username/password for (network)proxy: HTTPSProxyAuthenticator username:password (this is stored in
130+
cleartext in your browser locally.<br/>
131+
You can give multiple options, make sure there is a space between them i.e. OPTIONS1 values1 OPTIONS2
132+
values2 ...<br/>
133+
For more details see <a href="https://www.torproject.org/docs/tor-manual.html.en" target="_blank">Tor
134+
manual</a>
135+
</p>
136+
<hr/>
137+
<p>
138+
This app lacks the functionality to configure custom bridges, pluggable transports. There is plan to
139+
implement it but I can't give ETA.
140+
</p>
141+
<hr/>
101142
<p>
102143
Please note that this Chrome App is not a substitute of <a
103144
href="https://www.torproject.org/download/download-easy.html.en" target="_blank">Tor Browser
104145
Bundle</a>
105146
</p>
147+
</div>
148+
<div class="mdl-card__actions mdl-card--border">
149+
<button id="ok_button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
150+
Ok
151+
</button>
152+
</div>
153+
</div>
154+
</div>
155+
156+
<!--Are you browsing anonymously-->
157+
<div id="anonymity-help--overlay" class="first-time-dialog--overlay">
158+
<div id="anonymity_overlay" class="demo-card-square mdl-card mdl-shadow--2dp mdl-card--scrollable">
159+
<div class="mdl-card__title">
160+
<h5>
161+
Instructions to check if you are accessing internet via Tor and browsing anonymously.
162+
</h5>
163+
</div>
164+
<div class="mdl-card__supporting-text">
165+
<strong>Before proceeding make sure that you have configured everything correctly, click help button to see
166+
the instructions.</strong>
106167
<hr/>
107168
<p>
108-
If you face any issue, <a href="https://codebuff.net/krotor/support" target="_blank">please ask on the
109-
support page</a>.
169+
To verify that you are on Tor network, please visit : <a href="https://check.torproject.org"
170+
target="_blank">https://check.torproject.org</a>
110171
</p>
111172
<hr/>
112173
<p>
113-
This app lacks the functionality to configure custom bridges and pluggable transports. There is plan to implement it but I can't give ETA.
174+
To check if your local ip (your unique identifier on internet) is leaking or not please visit : <a
175+
href="https://ipleak.net" target="_blank">https://ipleak.net</a>
176+
<br/> To avoid webrtc leaks follow instructions given at <a href="https://ipleak.net/#webrtcleak"
177+
target="_blank">https://ipleak.net/#webrtcleak</a><br/>
178+
Note to window users:<br/>
179+
Window's system proxy settings are unreliable and on top of that <a href="https://ipleak.net/#dnsleak"
180+
target="_blank">DNS queries are are
181+
also unreliable on it</a>.<br/>
182+
</p>
183+
<hr/>
184+
<p>
185+
As a general rule:<br/>
186+
Make sure you use KroTor only with those applications/operating systems which have support for
187+
socks4/socks5 proxy support (remote dns resolution). Example: for Google Chrome you can use switchyomega
188+
extension.
189+
</p>
190+
<hr/>
191+
<p>
192+
<strong>Remember anonymity and privacy are two different things.</strong>
193+
</p>
194+
<hr/>
195+
<p>
196+
<strong>Note from developer (<a href="https://deepankar.io" target="_blank"> Deepankar
197+
Tyagi </a>):</strong><br/>
198+
These are just my opinions and are not endorsed by anyone.<br/>
199+
Two main factors are responsible for being anonymous :<br/>
200+
1. The traffic coming to and from the user's system must not be traceable back to user's system.(The way
201+
in which the user's system connects to outside world must not lead to disclosure of user's
202+
identity)<br/>
203+
2. The action of user must not lead to disclosure of user's identity.<br/>
204+
KroTor(Tor Network) takes care of first part and user is responsible for second part.<br/>
205+
IMHO, no one can guarantee a 100% anonymity or for that matter I definitely cannot(because of second
206+
part), that being said it is highly likely that user will remain anonymous without any extra steps other
207+
than setting KroTor correctly.<br/>
208+
To increase the chances of being anonymous on chrome, run chrome in incognito mode with all the
209+
extensions(except proxy extension) disabled, password auto fetching disabled and avoid using
210+
applications/websites which do not honor proxy/privacy settings.(you can disable the JavaScript also)
211+
For more details visit:
212+
<a href="https://www.torproject.org/download/download#warning" target="_blank">https://www.torproject.org/download/download#warning</a>
213+
<br/>
214+
<strong>The developer is not responsible for any of user's actions or user's actions' consequences.
215+
This app is provided as is without any guarantees.</strong>
114216
</p>
115217
</div>
116218
<div class="mdl-card__actions mdl-card--border">
117-
<button id="ok_button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
219+
<button id="anonymity_ok_button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
118220
Ok
119221
</button>
120222
</div>
121223
</div>
122224
</div>
225+
123226
<script src="js/main.js"></script>
124227
</body>
125228
</html>

0 commit comments

Comments
 (0)