Skip to content

Commit

Permalink
0.10.19
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiuD committed Jun 15, 2017
1 parent b57952f commit 75780bf
Show file tree
Hide file tree
Showing 68 changed files with 329 additions and 69 deletions.
Empty file modified .travis.yml
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Luminati Proxy manager - Change Log

## 0.10.19
- :star: added firewall ports tester in tools
- :bug: fix login problem for root users
- :bug: fix --iface parameter to accept ip addresses as well as interface names
- :bug: fix login for renamed customers

## 0.10.18
- :star: added "--timeout" parameter
- :bug: fix login problem with some users
Expand Down
Empty file modified Dockerfile
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion appveyor.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ build: off
notifications:
- provider: Email
to:
- lee@hola.org
- ovidiu@hola.org
Empty file modified bin/ca.crt
100644 → 100755
Empty file.
Empty file modified bin/ca.key
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion bin/check_compat.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ E.is_env_compat = ()=>{
const excluded = ['angular', 'angular-sanitize', 'bootstrap',
'bootstrap-datepicker', 'codemirror', 'notosans-fontface',
'require-css', 'flag-icon-css', 'angular-ui-bootstrap',
'swagger-ui', 'font-awesome', 'angular-google-analytics']
'swagger-ui', 'font-awesome', 'angular-google-analytics', 'ui-select']
.concat(Object.keys(pkg.optionalDependencies));
for (let dep in pkg.dependencies)
{
Expand Down
Empty file modified bin/lum_main.js
100644 → 100755
Empty file.
52 changes: 35 additions & 17 deletions bin/luminati.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ let create_child = ()=>{
child.on('exit', shutdown_on_child_exit);
};

let upgrade = cb=>{
const cmd = 'npm install -g luminati-io/luminati-proxy';
const opt = {name: 'Luminati Proxy Manager'};
sudo_prompt.exec(cmd, opt, (e, stdout, stderr)=>{
if (cb)
cb(e);
if (e)
{
console.log('Error during upgrade: '+e);
return;
}
if (stderr)
console.log('NPM stderr: '+stderr);
delete require.cache[require.resolve('./check_compat.js')];
check_compat = require('./check_compat.js');
if (!check_compat.is_env_compat())
process.exit();
});
};

let msg_handler = function(msg){
switch (msg.command)
{
Expand All @@ -71,24 +91,22 @@ let msg_handler = function(msg){
child.kill();
break;
case 'upgrade':
const cmd = 'npm install -g luminati-io/luminati-proxy';
const opt = {name: 'Luminati Proxy Manager'};
sudo_prompt.exec(cmd, opt, (e, stdout, stderr)=>{
child.send({command: 'upgrade_finished', error: e});
if (e)
{
console.log('Error during upgrade: '+e);
return;
}
if (stderr)
console.log('NPM stderr: '+stderr);
delete require.cache[require.resolve('./check_compat.js')];
check_compat = require('./check_compat.js');
if (!check_compat.is_env_compat())
process.exit();
});
upgrade(e=>child.send({command: 'upgrade_finished', error: e}));
break;
}
};

create_child();
if (args.some(arg=>arg=='--upgrade'))
{
upgrade(e=>{
if (e)
{
console.log(`Error during upgrade: ${e}`);
process.exit();
}
console.log('Upgrade completed successfully.');
create_child();
});
}
else
create_child();
Empty file modified bin/pub/app.css
100644 → 100755
Empty file.
118 changes: 106 additions & 12 deletions bin/pub/app.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
// LICENSE_CODE ZON ISC
'use strict'; /*jslint browser:true*//*global module*/
'use strict'; /*jslint browser:true*//*global module:true*/

// XXX marka: hack for electron/jquery combination
if (typeof module=='object')
{
/*jshint -W020*/
// jshint -W020
window.module = module;
module = undefined;
}

define(['angular', 'lodash', 'moment', 'codemirror/lib/codemirror',
'hutil/util/date', 'codemirror/mode/javascript/javascript', 'jquery',
'angular-sanitize', 'bootstrap', 'bootstrap-datepicker', '_css!app',
'angular-ui-bootstrap', 'es6-shim', 'angular-google-analytics'],
'angular-ui-bootstrap', 'es6-shim', 'angular-google-analytics',
'ui-select'],
function(angular, _, moment, codemirror, date){

var is_electron = window.process && window.process.versions.electron;
Expand All @@ -33,16 +34,16 @@ var is_valid_field = function(proxy, name, zone_definition){
return true;
};

var module = angular.module('app', ['ngSanitize', 'ui.bootstrap',
var module = angular.module('app', ['ngSanitize', 'ui.bootstrap', 'ui.select',
'angular-google-analytics']);

var analytics_provider;
var analytics_provider, ga_event;

module.config(['$uibTooltipProvider', 'AnalyticsProvider',
function($uibTooltipProvider, AP){
function($uibTooltipProvider, _analytics_provider){
$uibTooltipProvider.options({placement: 'bottom'});
AP.delayScriptTag(true);
analytics_provider = AP;
_analytics_provider.delayScriptTag(true);
analytics_provider = _analytics_provider;
}]);

module.run(function($rootScope, $http, $window, Analytics){
Expand Down Expand Up @@ -77,6 +78,10 @@ module.run(function($rootScope, $http, $window, Analytics){
Analytics.registerTrackers();
}
analytics_provider = null;
ga_event = function(category, action, label){
Analytics.trackEvent(category, action, label, undefined, undefined,
{transport: 'beacon'});
};
if ($window.localStorage.getItem('last_run_id')!=
$rootScope.run_config.id)
{
Expand Down Expand Up @@ -329,6 +334,9 @@ function Root($rootScope, $scope, $http, $window){
$window.localStorage.setItem('suppressed_warnings',
warnings.join('|||'));
};
$scope.zone_click = function(name){
ga_event('navbar', 'click', name);
};
}

module.controller('config', Config);
Expand Down Expand Up @@ -697,6 +705,62 @@ function Test($scope, $http, $filter, $window){
};
}

module.controller('test-ports', ['$scope', '$http', '$filter', '$window',
function($scope, $http, $filter, $window){
$window.localStorage.setItem('quickstart-zones-tools', true);
var preset = JSON.parse(decodeURIComponent(($window.location.search.match(
/[?&]test-ports=([^&]+)/)||['', 'null'])[1]));
if (preset)
$scope.proxy = ''+preset.port;
$http.get('/api/proxies').then(function(proxies){
$scope.proxies = [['0', 'All proxies']];
proxies.data.sort(function(a, b){ return a.port>b.port ? 1 : -1; });
for (var i=0; i<proxies.data.length; i++)
{
$scope.proxies.push(
[''+proxies.data[i].port, ''+proxies.data[i].port]);
}
if (!$scope.proxy)
$scope.proxy = $scope.proxies[1][0];
});
$scope.request = {};
$scope.go = function(proxy){
$scope.reset();
var req = {
method: 'GET',
url: '/api/test-ports?ports='+(+proxy==0 ? $scope.proxies.map(
function(p){ return +p[0]; }).filter(Boolean).join(',') :
proxy),
};
$scope.loading = true;
$http(req).then(function(r){
$scope.loading = false;
r = r.data;
if (!r.error)
{
for (var port in r)
$scope.request[port] = r[port];
}
$scope.request.responses = [];
for (var p in $scope.request)
{
if (!+p)
continue;
var response = $scope.request[p].response ||
$scope.request[p].error;
$scope.request.responses.push({
proxy: p,
body: response.body||{pass: false},
ts: response.ts||+new Date(),
});
}
});
};
$scope.reset = function(){
$scope.request = {};
};
}]);

module.controller('countries', Countries);
Countries.$inject = ['$scope', '$http', '$window'];
function Countries($scope, $http, $window){
Expand Down Expand Up @@ -833,8 +897,8 @@ function Countries($scope, $http, $window){
if ($scope.cur_index>country.index)
{
country.status = 1;
country.url = country.url.replace(/&\d+$/, '')
+'&'+(+date());
// XXX colin/ovidiu: why not use urlencoding?
country.url = country.url.replace(/&\d+$/, '')+'&'+(+date());
$scope.num_loading++;
country.img.src = country.url;
}
Expand Down Expand Up @@ -1045,7 +1109,16 @@ function Proxies($scope, $http, $proxies, $window, $q, $timeout){
key: 'country',
title: 'Country',
type: 'options',
options: function(){ return country_opts; },
options: function(proxy){
if (proxy&&proxy.zone=='static')
{
return country_opts.filter(function(c){
return ['', 'br', 'de', 'gb', 'au', 'us']
.includes(c.value);
});
}
return country_opts;
},
},
{
key: 'state',
Expand Down Expand Up @@ -2142,6 +2215,17 @@ function Proxy($scope, $http, $proxies, $window, $q){
};
$scope.binary_changed = function(proxy, field, value){
proxy[field] = {'yes': true, 'no': false, 'default': ''}[value]; };
var update_allowed_countries = function(){
var countries = $scope.consts.country.values;
$scope.allowed_countries = [];
if (!countries)
return;
if (form.zone!='static')
return $scope.allowed_countries = countries;
$scope.allowed_countries = countries.filter(function(c){
return ['', 'au', 'br', 'de', 'gb', 'us'].includes(c.value);
});
};
$scope.update_regions_and_cities = function(is_init){
if (!is_init)
$scope.form.region = $scope.form.city = '';
Expand Down Expand Up @@ -2200,6 +2284,7 @@ function Proxy($scope, $http, $proxies, $window, $q){
$scope.$watch('form.zone', function(val, old){
if (!$scope.consts || val==old)
return;
update_allowed_countries();
var zone;
if (zone = $scope.consts.zone.values.find(_.matches({zone: val})))
form.password = zone.password;
Expand Down Expand Up @@ -2291,7 +2376,15 @@ function Proxy($scope, $http, $proxies, $window, $q){
var warnings = [];
angular.forEach(res.data, function(item){
if (item.lvl=='err')
$scope.form_errors[item.field] = item.msg;
{
var msg = item.msg;
if (item.field=='password' && msg==
'the provided password is not valid')
{
msg = 'Wrong password';
}
$scope.form_errors[item.field] = msg;
}
if (item.lvl=='warn')
warnings.push(item.msg);
});
Expand All @@ -2316,6 +2409,7 @@ function Proxy($scope, $http, $proxies, $window, $q){
return actual.toLowerCase().startsWith(expected.toLowerCase());
};
$scope.update_regions_and_cities(true);
update_allowed_countries();
};
}

Expand Down
2 changes: 2 additions & 0 deletions bin/pub/config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var config = {
lodash: '/req/lodash/lodash.min',
codemirror: '/req/codemirror',
'angular-ui-bootstrap': '/req/angular-ui-bootstrap/dist/ui-bootstrap',
'ui-select': '/req/ui-select/dist/select.min',
'es6-shim': '/req/es6-shim/es6-shim',
hutil: '/req/hutil',
'angular-google-analytics': '/req/angular-google-analytics/dist/'
Expand All @@ -25,6 +26,7 @@ var config = {
bootstrap: {deps: ['jquery']},
'angular-sanitize': {deps: ['angular']},
'angular-ui-bootstrap': {deps: ['angular']},
'ui-select': {deps: ['angular']},
},
map: {
'*': {
Expand Down
Empty file modified bin/pub/faq.html
100644 → 100755
Empty file.
Empty file modified bin/pub/faq/links.html
100644 → 100755
Empty file.
Empty file modified bin/pub/faq/ssl.html
100644 → 100755
Empty file.
Empty file modified bin/pub/faq/upgrade.html
100644 → 100755
Empty file.
Binary file modified bin/pub/favicon.ico
100644 → 100755
Binary file not shown.
Empty file modified bin/pub/history.html
100644 → 100755
Empty file.
Empty file modified bin/pub/img/flag_any_country.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_checkmark.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_delete.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_download_mini.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_dup.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_edit.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_edit_disabled.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_history.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_history_disabled.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_off.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_plus.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_refresh.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_refresh_disabled.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_refresh_mini.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_status_details_error.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_status_details_warning.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_status_ok.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_status_ok_with_warning.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_status_red.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_status_undefined.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_table.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/ic_table_disabled.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified bin/pub/img/social_btns.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions bin/pub/index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<html>
<head>
<meta charset=utf-8>
<title>Luminati Proxy</title>
<title>Luminati Proxy Manager</title>
<meta name=viewport
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" href=/favicon.ico>
<link rel=stylesheet href=/req/ui-select/dist/select.min.css>
<link rel=stylesheet href=/req/bootstrap/dist/css/bootstrap.min.css>
<link rel=stylesheet href=/req/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css>
<link rel=stylesheet href=/req/notosans-fontface/css/notosans-fontface.min.css>
Expand Down Expand Up @@ -56,7 +57,10 @@
<div class=items>
<span ng-repeat="s in sections" ng-if=$index&gt;0>
<span ng-if="$index&gt;1" class=separator>&nbsp;|&nbsp;</span>
<a ng-if=s!=section||subsection href=/{{s.name}}>{{s.title}}</a>
<a ng-if=s!=section||subsection href=/{{s.name}}
ng-click=zone_click(s.name)>
{{s.title}}
</a>
<span ng-if=s==section&&!subsection>{{s.title}}</span>
</span>
</div>
Expand Down
Empty file modified bin/pub/pool.html
100644 → 100755
Empty file.
Empty file modified bin/pub/proxies.html
100644 → 100755
Empty file.
7 changes: 5 additions & 2 deletions bin/pub/proxy.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ <h4 class=modal-title ng-if=!port>Adding Proxy</h4>
<input type=password id=proxy-field-zone-password autocomplete=off
ng-model=form.password class=form-control>
<span ng-show=form_errors.password class="help-block">
{{form_errors.password}}</span>
{{form_errors.password}}
<a ng-href="https://luminati.io/cp/zones/{{form.zone}}?cust={{form.customer}}">
Find password here</a>
</span>
</div>
<div class=form-group>
<label class=control-label for=proxy-field-secure-proxy>
Expand Down Expand Up @@ -229,7 +232,7 @@ <h4 class=modal-title ng-if=!port>Adding Proxy</h4>
Country
</label>
<select id=proxy-field-country ng-model=form.country
ng-options="c.value as c.key for c in consts.country.values"
ng-options="c.value as c.key for c in allowed_countries"
ng-change="update_regions_and_cities()"
class=form-control>
</select>
Expand Down
Empty file modified bin/pub/proxy_cols.html
100644 → 100755
Empty file.
Empty file modified bin/pub/quickstart.html
100644 → 100755
Empty file.
17 changes: 10 additions & 7 deletions bin/pub/settings.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
</span>
</strong>
</div>
<div
ng-if="$root.mode=='root'&&$parent.ver_node&&!$parent.ver_node.satisfied" class="alert
alert-warning settings-alert">
<div ng-if="$root.mode=='root'&&$parent.ver_node&&!$parent.ver_node.is_electron&&!$parent.ver_node.satisfied"
class="alert alert-warning settings-alert">
<div>
The recommended version of node.js is
<strong>{{$parent.ver_node.recommended}}</strong>. You are using version
Expand Down Expand Up @@ -66,10 +65,14 @@ <h3>Login with your luminati.io credentials</h3>
</div>
<div class=form-group ng-if=user_customers>
<label for=user_customer>Customer</label>
<select id=user_customer ng-model=user_data.customer
class=form-control>
<option ng-repeat="c in user_customers" ng-value=c>{{c}}</option>
</select>
<ui-select id=user_customer ng-model=user_data.customer>
<ui-select-match placeholder="select customer">
{{$select.selected}}</ui-select-match>
<ui-select-choices ui-disable-choice="$index==50"
repeat="c in user_customers|filter:$select.search|limitTo:51">
<span>{{$index==50 ? 'start typing to see more...' : c}}</span>
</ui-select-choices>
</ui-select>
</div>
<button type=submit class="btn btn-flat-blue btn-block"
ng-disabled=saving_user>
Expand Down
Loading

0 comments on commit 75780bf

Please sign in to comment.