1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Fix CircleCI config

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-03-19 20:38:58 +01:00
commit 126f1c84fd
9 changed files with 47 additions and 30 deletions

View file

@ -30,8 +30,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -92,8 +92,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -152,8 +152,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -212,8 +212,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -272,8 +272,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -332,8 +332,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -395,8 +395,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
@ -454,8 +454,8 @@ jobs:
- run:
name: cache
command: |
echo "cache 83 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 87 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
echo "cache 84 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target
echo "cache 88 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:

View file

@ -10,9 +10,10 @@ include $(TOPDIR)/rules.mk
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/angt/glorytun.git
PKG_SOURCE_VERSION:=a9408e799ddbb74b5476fba70a495770322cd327
#PKG_SOURCE_VERSION:=b9aaab661fb879e891d34a91b5d2e78088fd9d9d
PKG_SOURCE_VERSION:=42faaf816f8037d1fc2a5ef5fcf94e6681d613c0
PKG_NAME:=glorytun-udp
PKG_VERSION:=0.3.0-$(PKG_SOURCE_VERSION)
PKG_VERSION:=0.2.2-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=23
PKG_FIXUP:=autoreconf

View file

@ -217,6 +217,8 @@
} else if (mArray.openmptcprouter.wan_addr != "")
{
var title = String.format("%s (%s)", _('Direct output'), mArray.openmptcprouter.wan_addr);
statusMessageClass = "warning";
statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
} else if (mArray.openmptcprouter.ss_addr != "" && mArray.openmptcprouter.vps_status != "DOWN")
{
var title = String.format("%s (%s)", mArray.openmptcprouter.vps_hostname, mArray.openmptcprouter.ss_addr);

View file

@ -272,6 +272,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ]; then
_log "Tunnel up : Replace default route by $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE"
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
fi
if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "hi2" ]; then
_log "Tunnel up disable use of ShadowSocks for UDP"
@ -370,7 +371,7 @@ fi
[ -z "$download" ] && download="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.download)"
upload="$(uci -q get network.$OMR_TRACKER_INTERFACE.uploadspeed)"
[ -z "$upload" ] && upload="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.upload)"
if [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $15'})" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $18'})" = "0" ]); then
if [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $13}')" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $16}')" = "0" ]); then
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate auto tx ${upload}000 rx ${download}000 > /dev/null 2>&1

View file

@ -13,11 +13,11 @@ while true; do
rx=`vnstat -i $OMR_QUOTA_INTERFACE --json | jsonfilter -q -e '@.interfaces[0].traffic.months[-1].rx' | tr -d "\n"`
tx=`vnstat -i $OMR_QUOTA_INTERFACE --json | jsonfilter -q -e '@.interfaces[0].traffic.months[-1].tx' | tr -d "\n"`
tt=$((rx + tx))
if [ -n "$OMR_QUOTA_RX" ] && [ "$OMR_QUOTA_RX" -gt 0 ] && [ -n "$rx" ] && [ "$OMR_QUOTA_RX" -ge "$rx" ] && [ "$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.up')" = "true" ]; then
if [ -n "$OMR_QUOTA_RX" ] && [ "$OMR_QUOTA_RX" -gt 0 ] && [ -n "$rx" ] && [ "$OMR_QUOTA_RX" -le "$rx" ] && [ "$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.up')" = "true" ]; then
ifdown $OMR_QUOTA_INTERFACE
elif [ -n "$OMR_QUOTA_TX" ] && [ "$OMR_QUOTA_TX" -gt 0 ] && [ -n "$tx" ] && [ "$OMR_QUOTA_TX" -ge "$tx" ] && [ "$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.up')" = "true" ]; then
elif [ -n "$OMR_QUOTA_TX" ] && [ "$OMR_QUOTA_TX" -gt 0 ] && [ -n "$tx" ] && [ "$OMR_QUOTA_TX" -le "$tx" ] && [ "$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.up')" = "true" ]; then
ifdown $OMR_QUOTA_INTERFACE
elif [ -n "$OMR_QUOTA_TT" ] && [ "$OMR_QUOTA_TT" -gt 0 ] && [ -n "$tt" ] && [ "$OMR_QUOTA_TT" -ge "$tt" ] && [ "$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.up')" = "true" ]; then
elif [ -n "$OMR_QUOTA_TT" ] && [ "$OMR_QUOTA_TT" -gt 0 ] && [ -n "$tt" ] && [ "$OMR_QUOTA_TT" -le "$tt" ] && [ "$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.up')" = "true" ]; then
ifdown $OMR_QUOTA_INTERFACE
else
ifup $OMR_QUOTA_INTERFACE

View file

@ -79,7 +79,7 @@ MY_DEPENDS := \
!TARGET_mvebu:kmod-usb-net-huawei-cdc-ncm !TARGET_mvebu:kmod-usb-net-rndis !TARGET_mvebu:kmod-usb-net-cdc-ether !TARGET_mvebu:kmod-usb-net-ipheth !TARGET_mvebu:usbmuxd \
kmod-rt2800-usb kmod-rtl8xxxu kmod-rtl8192cu kmod-net-rtl8192su \
!TARGET_mvebu:luci-proto-qmi wpad-basic kmod-mt7601u kmod-rtl8187 \
wireguard luci-app-mlvpn mlvpn 464xlat
wireguard luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig
# softethervpn5-client softethervpn5-server
# luci-app-mlvpn ubond \

View file

@ -33,6 +33,7 @@ mptcp_over_vpn() {
set network.ovpn${interface}.defaultroute='0'
set network.ovpn${interface}.peerdns='0'
set network.ovpn${interface}.proto='none'
set network.ovpn${interface}.ip4table='wan'
set network.ovpn${interface}.multipath='${multipath}'
set network.${interface}.multipath='off'
commit network

View file

@ -513,6 +513,7 @@ _set_vpn_ip() {
vpnip_remote_current="$(echo "$vps_config" | jsonfilter -q -e '@.vpn.localip')"
vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep via | grep -v default | grep -v / | grep -v metric | awk '{print $1}' | tr -d "\n")
[ -z "$vpnip_remote" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep kernel | awk '{print $1}' | tr -d "\n")
[ -z "$vpnip_remote" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep "proto static src" | awk '{print $3}' | tr -d "\n")
if [ "$vpnip_remote" != "" ] && [ "$vpnip_local" != "" ] && ([ "$vpnip_remote" != "$vpnip_remote_current" ] || [ "$vpnip_local" != "$vpnip_local_current" ]); then
settings='{"remoteip" : "'$vpnip_local'","localip" : "'$vpnip_remote'"}'
result=$(_set_json "vpnips" "$settings")
@ -552,30 +553,36 @@ _set_client2client() {
_vps_firewall_redirect_port() {
local src proto src_dport
config_get src $1 src
config_get proto $1 proto
config_get proto $1 proto "tcp udp"
config_get src_dport $1 src_dport
config_get family $1 family "ipv4"
[ "$src" = "vpn" ] && [ -n "$proto" ] && [ -n "$src_dport" ] && {
if [ "$proto" = "tcp udp" ]; then
if [ "$family" = "ipv4" ]; then
vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR redirect router $src_dport port tcp")
vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR $username redirect router $src_dport port tcp")
[ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR redirect router $src_dport port tcp")
else
vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR redirect router $src_dport port tcp")
vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR $username redirect router $src_dport port tcp")
[ "$username" = "openmptcprouter" ] && vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR redirect router $src_dport port tcp")
fi
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "tcp","fwtype" : "DNAT","ipproto" : "'$family'"}'
_set_json "shorewallopen" "$settings"
if [ "$family" = "ipv4" ]; then
vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR redirect router $src_dport port udp")
vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR $username redirect router $src_dport port udp")
[ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR redirect router $src_dport port udp")
else
vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR redirect router $src_dport port udp")
vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR $username redirect router $src_dport port udp")
[ "$username" = "openmptcprouter" ] && vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR redirect router $src_dport port udp")
fi
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "udp","fwtype" : "DNAT","ipproto" : "'$family'"}'
_set_json "shorewallopen" "$settings"
else
if [ "$family" = "ipv4" ]; then
vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR redirect router $src_dport port $proto")
vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR $username redirect router $src_dport port $proto")
[ "$username" = "openmptcprouter" ] && vpsfwlist=$(echo "$vpsfwlist" | grep -v "$port # OMR redirect router $src_dport port $proto")
else
vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR redirect router $src_dport port $proto")
vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR $username redirect router $src_dport port $proto")
[ "$username" = "openmptcprouter" ] && vpsfw6list=$(echo "$vpsfw6list" | grep -v "$port # OMR redirect router $src_dport port $proto")
fi
settings='{"name" : "router '$src_dport'","port" : "'$src_dport'","proto" : "'$proto'","fwtype" : "DNAT","ipproto" : "'$family'"}'
_set_json "shorewallopen" "$settings"
@ -609,6 +616,7 @@ _vps_firewall_close_port() {
_set_vps_firewall() {
fwservername=$1
[ -z "$servername" ] && servername=$fwservername
[ -z "$fwservername" ] && fwservername=$servername
[ "$(uci -q get openmptcprouter.${fwservername}.nofwredirect)" = "1" ] && return
[ -z "$(uci -q get openmptcprouter.${fwservername}.username)" ] && return
[ -z "$(uci -q get openmptcprouter.${fwservername}.password)" ] && return
@ -623,6 +631,7 @@ _set_vps_firewall() {
EOF
return
}
username="$(uci -q get openmptcprouter.${fwservername}.username)"
settings='{"name" : "redirect router"}'
fw_list=$(_set_json "shorewalllist" "$settings")
vpsfwlist=$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')

View file

@ -44,6 +44,9 @@ if [ "$(uci -q get openvpn.omr.proto)" != "tcp-client" ]; then
commit openvpn
EOF
fi
uci -q delete openvpn.omr.secret
#if [ "$(uci -q get openvpn.omr.com_lzo)" = "" ]; then
# uci -q batch <<-EOF >/dev/null
# set openvpn.omr.comp_lzo=adaptive