🎄 Sync 2026-04-23 03:14:31

This commit is contained in:
github-actions[bot] committed 2026-04-23 03:14:31 +08:00
1 parent 67b877b3d6
commit 7439c23f17
97 files changed
+4710 -1

No files matched your search

@@ -0,0 +1,33 @@
'use strict';
'require form';
'require view';
'require uci';
'require rpc';
'require tools.widgets as widgets';
return view.extend({
render: function() {
var m, s, o;
m = new form.Map('pptpd', _('PPTP Server'));
m.description = _('Simple, quick and convenient PPTP VPN, universal across the platform');
s = m.section(form.NamedSection, 'pptpd', 'pptpd');
o = s.option(form.Flag, 'enabled', _('Enable PPTP Server'));
o = s.option(form.Value, 'localip', _('Local IP'));
o.placeholder = '192.168.0.1';
o.datatype = 'ipaddr';
o = s.option(form.Value, 'remoteip_start', _('Remote IP Range Start'));
o.placeholder = '192.168.0.20';
o.datatype = 'ipaddr';
o = s.option(form.Value, 'remoteip_end', _('Remote IP Range End'));
o.placeholder = '192.168.0.30';
o.datatype = 'ipaddr';
return m.render();
}
});
@@ -0,0 +1,53 @@
'use strict';
'require view';
'require fs';
'require ui';
'require rpc';
return view.extend({
load: function() {
return fs.lines('/tmp/pptpd/clients');
},
updateTable: function(table, data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var client = data[i];
var info = client.split(';').map((part) => part.split(':')[1]);
rows.push([
info[0],
info[1],
info[2],
info[3]
]);
}
cbi_update_table(table, rows, E('em', _('No information available')));
},
render: function(data) {
var v = E([], [
E('h2', _('PPTP Server')),
E('div', { 'class': 'cbi-map-descr' }, _('Simple, quick and convenient PPTP VPN, universal across the platform')),
E('table', { 'class': 'table' }, [
E('tr', { 'class': 'tr table-titles' }, [
E('th', { 'class': 'th' }, _('Interface')),
E('th', { 'class': 'th' }, _('Server IP')),
E('th', { 'class': 'th' }, _('Client IP')),
E('th', { 'class': 'th' }, _('IP address'))
])
])
]);
this.updateTable(v.lastElementChild, data);
return v;
},
handleSaveApply: null,
handleSave: null,
handleReset: null
});
@@ -0,0 +1,39 @@
'use strict';
'require form';
'require view';
'require uci';
'require rpc';
'require tools.widgets as widgets';
return view.extend({
render: function() {
var m, s, o;
m = new form.Map('pptpd', _('PPTP Server'));
m.description = _('Simple, quick and convenient PPTP VPN, universal across the platform');
s = m.section(form.TableSection, 'login');
s.anonymous = true;
s.addremove = true;
o = s.option(form.Flag, 'enabled', _('Enabled'));
o.editable = true;
o = s.option(form.Value, 'username', _('User name'));
o.editable = true;
o = s.option(form.Value, 'password', _('Password'));
o.editable = true;
o = s.option(form.Value, 'remoteip', _('IP address'));
o.editable = true;
o.datatype = 'ipaddr';
o = s.option(form.Value, 'route', _('Add route'));
o.editable = true;
o.datatype = "ipaddr"
o.placeholder = "192.168.10.0/24"
return m.render();
}
});