parent
f8a76a93c2
commit
570e37cd3c
@ -63,6 +63,16 @@ return baseclass.extend({
|
|||||||
'1.3'
|
'1.3'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
CBIStaticList: form.DynamicList.extend({
|
||||||
|
__name__: 'CBI.StaticList',
|
||||||
|
|
||||||
|
renderWidget: function(/* ... */) {
|
||||||
|
var dl = form.DynamicList.prototype.renderWidget.apply(this, arguments);
|
||||||
|
dl.querySelector('.add-item ul > li[data-value="-"]').remove();
|
||||||
|
return dl;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
calcStringMD5: function(e) {
|
calcStringMD5: function(e) {
|
||||||
/* Thanks to https://stackoverflow.com/a/41602636 */
|
/* Thanks to https://stackoverflow.com/a/41602636 */
|
||||||
function h(a, b) {
|
function h(a, b) {
|
||||||
|
@ -1004,7 +1004,7 @@ function renderNodeSettings(section, data, features, main_node, routing_mode) {
|
|||||||
o.depends('tls', '1');
|
o.depends('tls', '1');
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.option(form.MultiValue, 'tls_cipher_suites', _('Cipher suites'),
|
o = s.option(hp.CBIStaticList, 'tls_cipher_suites', _('Cipher suites'),
|
||||||
_('The elliptic curves that will be used in an ECDHE handshake, in preference order. If empty, the default will be used.'));
|
_('The elliptic curves that will be used in an ECDHE handshake, in preference order. If empty, the default will be used.'));
|
||||||
for (var i of hp.tls_cipher_suites)
|
for (var i of hp.tls_cipher_suites)
|
||||||
o.value(i);
|
o.value(i);
|
||||||
|
@ -568,7 +568,7 @@ return view.extend({
|
|||||||
o.depends('tls', '1');
|
o.depends('tls', '1');
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.option(form.MultiValue, 'tls_cipher_suites', _('Cipher suites'),
|
o = s.option(hp.CBIStaticList, 'tls_cipher_suites', _('Cipher suites'),
|
||||||
_('The elliptic curves that will be used in an ECDHE handshake, in preference order. If empty, the default will be used.'));
|
_('The elliptic curves that will be used in an ECDHE handshake, in preference order. If empty, the default will be used.'));
|
||||||
for (var i of hp.tls_cipher_suites)
|
for (var i of hp.tls_cipher_suites)
|
||||||
o.value(i);
|
o.value(i);
|
||||||
|
@ -14,7 +14,14 @@ PROG="/usr/bin/sing-box"
|
|||||||
HP_DIR="/etc/homeproxy"
|
HP_DIR="/etc/homeproxy"
|
||||||
RUN_DIR="/var/run/homeproxy"
|
RUN_DIR="/var/run/homeproxy"
|
||||||
LOG_PATH="$RUN_DIR/homeproxy.log"
|
LOG_PATH="$RUN_DIR/homeproxy.log"
|
||||||
|
|
||||||
|
# we don't know which is the default server, just take the first one
|
||||||
|
DNSMASQ_UCI_CONFIG="$(uci -q show "dhcp.@dnsmasq[0]" | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')"
|
||||||
|
if [ -f "/tmp/etc/dnsmasq.conf.$DNSMASQ_UCI_CONFIG" ]; then
|
||||||
|
DNSMASQ_DIR="$(awk -F '=' '/^conf-dir=/ {print $2}' "/tmp/etc/dnsmasq.conf.$DNSMASQ_UCI_CONFIG")/dnsmasq-homeproxy.d"
|
||||||
|
else
|
||||||
DNSMASQ_DIR="/tmp/dnsmasq.d/dnsmasq-homeproxy.d"
|
DNSMASQ_DIR="/tmp/dnsmasq.d/dnsmasq-homeproxy.d"
|
||||||
|
fi
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
echo -e "$(date "+%Y-%m-%d %H:%M:%S") [DAEMON] $*" >> "$LOG_PATH"
|
echo -e "$(date "+%Y-%m-%d %H:%M:%S") [DAEMON] $*" >> "$LOG_PATH"
|
||||||
|
Loading…
Reference in New Issue
Block a user