Skip to content

Commit

Permalink
added advance options functionality,
Browse files Browse the repository at this point in the history
updated instructions.
recompiled tor with new toolchain.
  • Loading branch information
codebuff committed Mar 15, 2016
1 parent 19a0a2d commit c7334c5
Show file tree
Hide file tree
Showing 13 changed files with 892 additions and 629 deletions.
Binary file modified _platform_specific/i686/tor.nexe
Binary file not shown.
Binary file modified _platform_specific/x86_64/tor.nexe
Binary file not shown.
19 changes: 17 additions & 2 deletions gui/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ body.hide {
width: calc(100% - 16px); }

.main-container {
padding: 16px; }
padding: 16px;}
.main-container .mdl-progress {
width: 100%; }
.main-container .advanced-button {
Expand Down Expand Up @@ -154,7 +154,7 @@ body.hide {
.main-container .mdl-card .mdl-card__actions.expand {
opacity: 1; }
.main-container .mdl-card .mdl-card__actions.proxycard {
height: 200px;
height: inherit;
overflow: visible; }
.main-container .mdl-card .mdl-card__actions.cportcard {
height: 64px; }
Expand Down Expand Up @@ -360,6 +360,9 @@ body.hide {
.first-time-dialog--overlay .demo-card-square #ok_button {
display: block;
margin: 0 auto; }
.first-time-dialog--overlay .demo-card-square #anonymity_ok_button {
display: block;
margin: 0 auto; }

.first-time-dialog--overlay.visible {
opacity: 1;
Expand Down Expand Up @@ -392,3 +395,15 @@ body.dark {
background-color: #2F536B; }
body.dark .mdl-menu__outline {
background-color: #163F5A; }

#anonymity{
display:none;
}

.main-container .mdl-card .mdl-card__actions.advoptcard {
height: 90px;
}

#settings_container{
margin-left: 6%;
}
21 changes: 19 additions & 2 deletions gui/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ document.addEventListener('DOMContentLoaded', function () {
accessible_ports: "all",
reachable_addresses: "all",
tor_port: 9999,
theme: "light"
theme: "dark",
adv_opt:"none"
}, function (items) {
//console.log(items);
if (items.restarting_tor || items.autostart_tor) {
Expand All @@ -26,6 +27,7 @@ document.addEventListener('DOMContentLoaded', function () {
});
chrome.storage.local.set({ restarting_tor: false });
document.getElementById('start_button_text').innerHTML = "Restart Tor";
document.getElementById('anonymity').setAttribute('style', 'display:inline-block');
}
set_gui(items);
set_settings(items); // in tor.js
Expand Down Expand Up @@ -54,6 +56,11 @@ document.getElementById('ok_button').addEventListener("click", function () {
chrome.storage.local.set({ firstrun: false });
});

//anonymity
document.getElementById('anonymity_ok_button').addEventListener("click", function () {
document.getElementById('anonymity-help--overlay').classList.remove('visible');
});

//start / restart tor button
document.getElementById('start_button').addEventListener("click", function () {
if (document.getElementById('start_button_text').innerHTML == "Start Tor") {
Expand All @@ -63,6 +70,7 @@ document.getElementById('start_button').addEventListener("click", function () {
});
updateTorStatus( "Tor is running, see below for details.");
document.getElementById('start_button_text').innerHTML = "Restart Tor";
document.getElementById('anonymity').setAttribute('style', 'display:inline-block');
} else {
chrome.storage.local.set({ restarting_tor: true });
document.querySelector('body').classList.add('hide');
Expand Down Expand Up @@ -110,4 +118,13 @@ document.getElementById('help').addEventListener("click", function () {
setTimeout(function () {
window.location.assign("about.html");
}, 300);*/
});
});

//anonymity
document.getElementById('anonymity').addEventListener("click", function () {
document.getElementById("anonymity-help--overlay").classList.add("visible");
/*document.querySelector('body').classList.add('hide');
setTimeout(function () {
window.location.assign("about.html");
}, 300);*/
});
49 changes: 43 additions & 6 deletions gui/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ var error_count = 0;

//settings key value pair
var default_settings = {
theme: "light",
theme: "dark",
proxy_type: "none",
proxy_address: "none",
proxy_port: "none",
autostart_tor: false,
accessible_ports: "all",
tor_port: 9999
tor_port: 9999,
adv_opt:"none"
};

document.addEventListener('DOMContentLoaded', function () {
Expand Down Expand Up @@ -49,6 +50,12 @@ function populate_gui(items) {
to_be_saved["accessible_ports"] = true;
document.getElementById('acsport__port').value = items.accessible_ports;
}
// advance options
if (items.adv_opt != "none") {
document.getElementById("adv_opt").click();
to_be_saved["adv_opt"] = true;
document.getElementById("adv_opt_text").value = items.adv_opt;
}
//set tor port
document.getElementById('cport__port').value = items.tor_port;
}
Expand Down Expand Up @@ -98,7 +105,7 @@ document.getElementById('select_proxy').addEventListener("click", function (e) {
//set text of drop down
document.getElementById('proxy_text').innerHTML = e.target.getAttribute("data-text");
});
//accessible port
//accessible port
document.getElementById('acsport').addEventListener("click", function () {
var chk = this.checked;
if (chk) {
Expand All @@ -112,6 +119,21 @@ document.getElementById('acsport').addEventListener("click", function () {
to_be_saved["accessible_ports"] = false;
}
});

//advance options
document.getElementById('adv_opt').addEventListener("click", function () {
var chk = this.checked;
if (chk) {
document.getElementById('adv_opt_card').classList.add('expand');
document.getElementById('adv_opt_card').classList.add('advoptcard');
to_be_saved["adv_opt"] = true;
}
else {
document.getElementById('adv_opt_card').classList.remove('expand');
document.getElementById('adv_opt_card').classList.remove('advoptcard');
to_be_saved["adv_opt"] = false;
}
});
//autostart_tor
document.getElementById('autostart_tor').addEventListener("click", function () {
if (this.checked) {
Expand Down Expand Up @@ -278,13 +300,28 @@ function save_settings() {
settings["reachable_addresses"] = "all";
settings["accessible_ports"] = "all";
}

// ---------- advance options -----------
if (to_be_saved["adv_opt"]) {
var adv_opt = document.getElementById('adv_opt_text').value;
var error = false;
if (adv_opt == "") {
raise_error("advance option cannot be empty, please disable it or give the options", "adv_opt_text");
error = true;
}
if (!error) {
settings["adv_opt"] = adv_opt;
}
} else {
settings["adv_opt"] = "none";
}
//---------------saving settings----------
if (error_count == 0) {
chrome.storage.local.set(settings, function () {
console.log(to_be_saved);
console.log(settings);
//console.log(to_be_saved);
//console.log(settings);
});
}
}
//save settings
document.getElementById('save').addEventListener("click", save_settings);
document.getElementById('save').addEventListener("click", save_settings);
131 changes: 117 additions & 14 deletions gui/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ <h6 class="h6padding--fix">
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent advanced-button">
<span id="start_button_text">Start Tor</span>
</button>
<button id="anonymity"
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent advanced-button">
Are you browsing anonymously ?
</button>
<label id="autostart_checkbox_cover" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect autostart_fix"
for="autostart_checkbox">
<input type="checkbox" id="autostart_checkbox" class="mdl-checkbox__input"/>
Expand All @@ -72,54 +76,153 @@ <h2 class="mdl-card__title-text">
Thanks for installing KroTor, with this app you can access internet via Tor. [visit any blocked
websites, browse anonymously etc]<br/>
Once started, tor socks proxy will be available <em>on your system</em> which can be accessed at
127.0.0.1:9999
127.0.0.1:9999<br/>
This app is open sourced, for details click <a href="https://deepankar.io/krotor"
target="_blank">here</a>.
</p>
<hr/>
<p>
<strong>Usage Instructions</strong>
<br/>Chrome Apps (such as this one) cannot set the proxy settings in the Chrome browser,
<em> In order to use Tor Socks proxy created by this app, please configure any extension or system
settings accordingly.</em> <br/>
<em>For example:</em> <br/>
You can use extension <a
<strong>Instructions</strong><br/>
In order to use Tor Socks proxy created by this app, please configure any extension/system
settings/apps accordingly.<br/>
<em>Following instructions are only applicable for Google Chrome.</em><br/>
Chrome Apps (such as this one) cannot set the proxy settings in the Chrome browser, only extensions can
do so.As an example, one can use extension <a
href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif"
target="_blank">ProxySwitchyOmega(open sourced)</a><br/>
<strong>Setup</strong>
<em>This is one time process.</em><br/>
Install <a
href="https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif"
target="_blank"> SwitchyOmega</a> with following settings<br/>
target="_blank">ProxySwitchyOmega</a> or any proxy extension.<br/>
Create a proxy profile named KroTor with following settings.<br/>
protocol : socks5<br/>
server : 127.0.0.1<br/>
port : 9999 (or the tor port you defined in settings)<br/>
<em>In future, there is plan to create a companion extension for this app.</em>
<strong>Using it</strong><br/>
1. Run KroTor, click on Start Tor, <em>make sure you see "Bootstrapped 100%" in terminal window(app's
middle section with black background)</em><br/>
2. Enable KroTor proxy in SwitchyOmega's dropdown menu(click its icon i.e. black O on right side of
address bar)
</p>
<hr/>
<p>
To verify that you are on Tor network, please visit : <a href="https://check.torproject.org" target="_blank">https://check.torproject.org</a>
To verify that you are on Tor network, please visit : <a href="https://check.torproject.org"
target="_blank">https://check.torproject.org</a>
</p>
<hr/>
<p>
If Tor takes too long to connect, try enabling/modifying accessible ports in settings.
</p>
<hr/>
<p>
If you face any issue, <a href="https://codebuff.net/krotor/support" target="_blank">please ask on the
support page</a>.
</p>
<hr/>
<p>
<Strong>Advance options.</Strong><br/>
If you want set exitnodes, provide username/password for (network)proxy etc, you can do so by enabling
advance options in settings and provide them in format OPTIONS values<br/>
As an example:<br/>
For exitnodes: ExitNodes node,node,…<br/>
For username/password for (network)proxy: HTTPSProxyAuthenticator username:password (this is stored in
cleartext in your browser locally.<br/>
You can give multiple options, make sure there is a space between them i.e. OPTIONS1 values1 OPTIONS2
values2 ...<br/>
For more details see <a href="https://www.torproject.org/docs/tor-manual.html.en" target="_blank">Tor
manual</a>
</p>
<hr/>
<p>
This app lacks the functionality to configure custom bridges, pluggable transports. There is plan to
implement it but I can't give ETA.
</p>
<hr/>
<p>
Please note that this Chrome App is not a substitute of <a
href="https://www.torproject.org/download/download-easy.html.en" target="_blank">Tor Browser
Bundle</a>
</p>
</div>
<div class="mdl-card__actions mdl-card--border">
<button id="ok_button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
Ok
</button>
</div>
</div>
</div>

<!--Are you browsing anonymously-->
<div id="anonymity-help--overlay" class="first-time-dialog--overlay">
<div id="anonymity_overlay" class="demo-card-square mdl-card mdl-shadow--2dp mdl-card--scrollable">
<div class="mdl-card__title">
<h5>
Instructions to check if you are accessing internet via Tor and browsing anonymously.
</h5>
</div>
<div class="mdl-card__supporting-text">
<strong>Before proceeding make sure that you have configured everything correctly, click help button to see
the instructions.</strong>
<hr/>
<p>
If you face any issue, <a href="https://codebuff.net/krotor/support" target="_blank">please ask on the
support page</a>.
To verify that you are on Tor network, please visit : <a href="https://check.torproject.org"
target="_blank">https://check.torproject.org</a>
</p>
<hr/>
<p>
This app lacks the functionality to configure custom bridges and pluggable transports. There is plan to implement it but I can't give ETA.
To check if your local ip (your unique identifier on internet) is leaking or not please visit : <a
href="https://ipleak.net" target="_blank">https://ipleak.net</a>
<br/> To avoid webrtc leaks follow instructions given at <a href="https://ipleak.net/#webrtcleak"
target="_blank">https://ipleak.net/#webrtcleak</a><br/>
Note to window users:<br/>
Window's system proxy settings are unreliable and on top of that <a href="https://ipleak.net/#dnsleak"
target="_blank">DNS queries are are
also unreliable on it</a>.<br/>
</p>
<hr/>
<p>
As a general rule:<br/>
Make sure you use KroTor only with those applications/operating systems which have support for
socks4/socks5 proxy support (remote dns resolution). Example: for Google Chrome you can use switchyomega
extension.
</p>
<hr/>
<p>
<strong>Remember anonymity and privacy are two different things.</strong>
</p>
<hr/>
<p>
<strong>Note from developer (<a href="https://deepankar.io" target="_blank"> Deepankar
Tyagi </a>):</strong><br/>
These are just my opinions and are not endorsed by anyone.<br/>
Two main factors are responsible for being anonymous :<br/>
1. The traffic coming to and from the user's system must not be traceable back to user's system.(The way
in which the user's system connects to outside world must not lead to disclosure of user's
identity)<br/>
2. The action of user must not lead to disclosure of user's identity.<br/>
KroTor(Tor Network) takes care of first part and user is responsible for second part.<br/>
IMHO, no one can guarantee a 100% anonymity or for that matter I definitely cannot(because of second
part), that being said it is highly likely that user will remain anonymous without any extra steps other
than setting KroTor correctly.<br/>
To increase the chances of being anonymous on chrome, run chrome in incognito mode with all the
extensions(except proxy extension) disabled, password auto fetching disabled and avoid using
applications/websites which do not honor proxy/privacy settings.(you can disable the JavaScript also)
For more details visit:
<a href="https://www.torproject.org/download/download#warning" target="_blank">https://www.torproject.org/download/download#warning</a>
<br/>
<strong>The developer is not responsible for any of user's actions or user's actions' consequences.
This app is provided as is without any guarantees.</strong>
</p>
</div>
<div class="mdl-card__actions mdl-card--border">
<button id="ok_button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
<button id="anonymity_ok_button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect">
Ok
</button>
</div>
</div>
</div>

<script src="js/main.js"></script>
</body>
</html>
Loading

0 comments on commit c7334c5

Please sign in to comment.