Loading src/network.sh +9 −7 Original line number Diff line number Diff line Loading @@ -302,6 +302,7 @@ getUserPorts() { getSlirp() { local ip="$1" local args="" local list="" Loading @@ -317,12 +318,12 @@ getSlirp() { proto="udp" num="${port%/udp}" elif [[ "$port" != *"/tcp" ]]; then args+="hostfwd=$proto::$num-$VM_NET_IP:$num," args+="hostfwd=$proto::$num-$ip:$num," proto="udp" num="${port%/udp}" fi args+="hostfwd=$proto::$num-$VM_NET_IP:$num," args+="hostfwd=$proto::$num-$ip:$num," done echo "$args" | sed 's/,*$//g' Loading @@ -349,7 +350,7 @@ configureSlirp() { NET_OPTS="-netdev user,id=hostnet0,ipv4=on,host=$gateway,net=${gateway%.*}.0/24,dhcpstart=$ip,${ipv6}hostname=$VM_NET_HOST" local forward="" forward=$(getSlirp) forward=$(getSlirp "$ip") [ -n "$forward" ] && NET_OPTS+=",$forward" if [[ "${DNSMASQ_DISABLE:-}" != [Yy1]* ]]; then Loading Loading @@ -673,21 +674,22 @@ cleanUp() { checkOS() { local kernel local os="" local if="macvlan" local kernel="" local iface="macvlan" kernel=$(uname -a) [[ "${kernel,,}" == *"darwin"* ]] && os="$ENGINE Desktop for macOS" [[ "${kernel,,}" == *"microsoft"* ]] && os="$ENGINE Desktop for Windows" if [[ "$DHCP" == [Yy1]* ]]; then if="macvtap" iface="macvtap" [[ "${kernel,,}" == *"synology"* ]] && os="Synology Container Manager" fi if [ -n "$os" ]; then warn "you are using $os which does not support $if, please revert to bridge networking!" warn "you are using $os which does not support $iface, please revert to bridge networking!" fi return 0 Loading Loading
src/network.sh +9 −7 Original line number Diff line number Diff line Loading @@ -302,6 +302,7 @@ getUserPorts() { getSlirp() { local ip="$1" local args="" local list="" Loading @@ -317,12 +318,12 @@ getSlirp() { proto="udp" num="${port%/udp}" elif [[ "$port" != *"/tcp" ]]; then args+="hostfwd=$proto::$num-$VM_NET_IP:$num," args+="hostfwd=$proto::$num-$ip:$num," proto="udp" num="${port%/udp}" fi args+="hostfwd=$proto::$num-$VM_NET_IP:$num," args+="hostfwd=$proto::$num-$ip:$num," done echo "$args" | sed 's/,*$//g' Loading @@ -349,7 +350,7 @@ configureSlirp() { NET_OPTS="-netdev user,id=hostnet0,ipv4=on,host=$gateway,net=${gateway%.*}.0/24,dhcpstart=$ip,${ipv6}hostname=$VM_NET_HOST" local forward="" forward=$(getSlirp) forward=$(getSlirp "$ip") [ -n "$forward" ] && NET_OPTS+=",$forward" if [[ "${DNSMASQ_DISABLE:-}" != [Yy1]* ]]; then Loading Loading @@ -673,21 +674,22 @@ cleanUp() { checkOS() { local kernel local os="" local if="macvlan" local kernel="" local iface="macvlan" kernel=$(uname -a) [[ "${kernel,,}" == *"darwin"* ]] && os="$ENGINE Desktop for macOS" [[ "${kernel,,}" == *"microsoft"* ]] && os="$ENGINE Desktop for Windows" if [[ "$DHCP" == [Yy1]* ]]; then if="macvtap" iface="macvtap" [[ "${kernel,,}" == *"synology"* ]] && os="Synology Container Manager" fi if [ -n "$os" ]; then warn "you are using $os which does not support $if, please revert to bridge networking!" warn "you are using $os which does not support $iface, please revert to bridge networking!" fi return 0 Loading