mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
Minor fixes
Network/serial reworked
This commit is contained in:
commit
9adbaf1981
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -22,5 +22,5 @@ jobs:
|
|||||||
- name: Run ShellCheck
|
- name: Run ShellCheck
|
||||||
uses: ludeeus/action-shellcheck@master
|
uses: ludeeus/action-shellcheck@master
|
||||||
env:
|
env:
|
||||||
SHELLCHECK_OPTS: -e SC2001 -e SC2002 -e SC2116 -e SC2034 -e SC1091 -e SC2143 -e SC2223 -e SC2086 -e SC2145 -e SC2015 -e SC2268 -e SC2207 -e SC2064
|
SHELLCHECK_OPTS: -e SC2001 -e SC2002 -e SC2116 -e SC2034 -e SC1091 -e SC2143 -e SC2223 -e SC2086 -e SC2145 -e SC2015 -e SC2268 -e SC2207 -e SC2064 -e SC2166
|
||||||
|
|
||||||
|
@ -57,12 +57,9 @@ EXPOSE 445
|
|||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
EXPOSE 5001
|
EXPOSE 5001
|
||||||
|
|
||||||
|
ENV URL ""
|
||||||
ENV CPU_CORES 1
|
ENV CPU_CORES 1
|
||||||
ENV DISK_SIZE 16G
|
ENV DISK_SIZE 16G
|
||||||
ENV RAM_SIZE 512M
|
ENV RAM_SIZE 512M
|
||||||
|
|
||||||
#ENV URL https://global.synologydownload.com/download/DSM/beta/7.2/64216/DSM_VirtualDSM_64216.pat
|
|
||||||
#ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat
|
|
||||||
ENV URL https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat
|
|
||||||
|
|
||||||
ENTRYPOINT ["/run/run.sh"]
|
ENTRYPOINT ["/run/run.sh"]
|
||||||
|
30
disk.sh
30
disk.sh
@ -16,28 +16,32 @@ NEW_SIZE=$(numfmt --from=iec "${DISK_SIZE}")
|
|||||||
FILE="$IMG/data$DISK_SIZE.img"
|
FILE="$IMG/data$DISK_SIZE.img"
|
||||||
|
|
||||||
if [ ! -f "$FILE" ]; then
|
if [ ! -f "$FILE" ]; then
|
||||||
|
# Create an empty file
|
||||||
truncate -s "${NEW_SIZE}" "${FILE}"
|
truncate -s "${NEW_SIZE}" "${FILE}"
|
||||||
|
# Format as BTRFS filesystem
|
||||||
mkfs.btrfs -q -L data -d single -m dup "${FILE}" > /dev/null
|
mkfs.btrfs -q -L data -d single -m dup "${FILE}" > /dev/null
|
||||||
#qemu-img convert -f raw -O qcow2 -o extended_l2=on,cluster_size=128k,compression_type=zstd,preallocation=metadata "$TMP" "$FILE"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -f "$FILE" ] && echo "ERROR: Virtual DSM data-image does not exist ($FILE)" && exit 83
|
[ ! -f "$FILE" ] && echo "ERROR: Virtual DSM data-image does not exist ($FILE)" && exit 83
|
||||||
|
|
||||||
#OLD_SIZE=$(stat -c%s "${FILE}")
|
# Resizing requires mounting a loop device which in turn requires
|
||||||
|
# the container to be privileged, so we must disable it for now.
|
||||||
#
|
#
|
||||||
#if [ "$NEW_SIZE" -ne "$OLD_SIZE" ]; then
|
# OLD_SIZE=$(stat -c%s "${FILE}")
|
||||||
# echo "Resizing data disk from $OLD_SIZE to $NEW_SIZE bytes"
|
|
||||||
#
|
#
|
||||||
# if [ "$NEW_SIZE" -gt "$OLD_SIZE" ]; then
|
# if [ "$NEW_SIZE" -ne "$OLD_SIZE" ]; then
|
||||||
# truncate -s "${NEW_SIZE}" "${FILE}"
|
# echo "Resizing data disk from $OLD_SIZE to $NEW_SIZE bytes"
|
||||||
# btrfs filesystem resize "${NEW_SIZE}" "${FILE}"
|
|
||||||
# fi
|
|
||||||
#
|
#
|
||||||
# if [ "$NEW_SIZE" -lt "$OLD_SIZE" ]; then
|
# if [ "$NEW_SIZE" -gt "$OLD_SIZE" ]; then
|
||||||
# btrfs filesystem resize "${NEW_SIZE}" "${FILE}"
|
# truncate -s "${NEW_SIZE}" "${FILE}"
|
||||||
# truncate -s "${NEW_SIZE}" "${FILE}"
|
# btrfs filesystem resize "${NEW_SIZE}" "${FILE}"
|
||||||
# fi
|
# fi
|
||||||
#fi
|
#
|
||||||
|
# if [ "$NEW_SIZE" -lt "$OLD_SIZE" ]; then
|
||||||
|
# btrfs filesystem resize "${NEW_SIZE}" "${FILE}"
|
||||||
|
# truncate -s "${NEW_SIZE}" "${FILE}"
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
|
|
||||||
KVM_DISK_OPTS="\
|
KVM_DISK_OPTS="\
|
||||||
-device virtio-scsi-pci,id=hw-synoboot,bus=pcie.0,addr=0xa \
|
-device virtio-scsi-pci,id=hw-synoboot,bus=pcie.0,addr=0xa \
|
||||||
|
10
install.sh
10
install.sh
@ -1,6 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
if [ -z $URL ]; then
|
||||||
|
#URL="https://global.synologydownload.com/download/DSM/beta/7.2/64216/DSM_VirtualDSM_64216.pat"
|
||||||
|
#URL="https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
|
||||||
|
URL="https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat"
|
||||||
|
fi
|
||||||
|
|
||||||
IMG="/storage"
|
IMG="/storage"
|
||||||
BASE=$(basename "$URL" .pat)
|
BASE=$(basename "$URL" .pat)
|
||||||
|
|
||||||
@ -8,7 +14,7 @@ BASE=$(basename "$URL" .pat)
|
|||||||
[ ! -f "/run/server.sh" ] && echo "Script must run inside Docker container!" && exit 60
|
[ ! -f "/run/server.sh" ] && echo "Script must run inside Docker container!" && exit 60
|
||||||
|
|
||||||
[ ! -f "$IMG/$BASE.boot.img" ] && rm -f "$IMG"/"$BASE".system.img
|
[ ! -f "$IMG/$BASE.boot.img" ] && rm -f "$IMG"/"$BASE".system.img
|
||||||
[ -f "$IMG/$BASE.system.img" ] && exit 0
|
[ -f "$IMG/$BASE.system.img" ] && return
|
||||||
|
|
||||||
# Display wait message on port 5000
|
# Display wait message on port 5000
|
||||||
/run/server.sh 5000 > /dev/null &
|
/run/server.sh 5000 > /dev/null &
|
||||||
@ -150,5 +156,3 @@ mv -f "$BOOT" "$IMG"/"$BASE".boot.img
|
|||||||
mv -f "$SYSTEM" "$IMG"/"$BASE".system.img
|
mv -f "$SYSTEM" "$IMG"/"$BASE".system.img
|
||||||
|
|
||||||
rm -rf $TMP
|
rm -rf $TMP
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
57
network.sh
57
network.sh
@ -2,8 +2,8 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
: ${VM_NET_TAP:=''}
|
: ${VM_NET_TAP:=''}
|
||||||
: ${VM_NET_MAC:=''}
|
|
||||||
: ${VM_NET_IP:='20.20.20.21'}
|
: ${VM_NET_IP:='20.20.20.21'}
|
||||||
|
: ${VM_NET_MAC:='02:11:32:AA:BB:CC'}
|
||||||
|
|
||||||
: ${DNS_SERVERS:=''}
|
: ${DNS_SERVERS:=''}
|
||||||
: ${DNSMASQ:='/usr/sbin/dnsmasq'}
|
: ${DNSMASQ:='/usr/sbin/dnsmasq'}
|
||||||
@ -14,18 +14,6 @@ set -eu
|
|||||||
# Functions
|
# Functions
|
||||||
# ######################################
|
# ######################################
|
||||||
|
|
||||||
setupLocalDhcp () {
|
|
||||||
IP="$2"
|
|
||||||
MAC="$1"
|
|
||||||
CIDR="24"
|
|
||||||
HOSTNAME="VirtualDSM"
|
|
||||||
# dnsmasq configuration:
|
|
||||||
DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-range=$IP,$IP --dhcp-host=$MAC,,$IP,$HOSTNAME,infinite --dhcp-option=option:netmask,255.255.255.0"
|
|
||||||
# Create lease file for faster resolve
|
|
||||||
echo "0 $MAC $IP $HOSTNAME 01:${MAC}" > /var/lib/misc/dnsmasq.leases
|
|
||||||
chmod 644 /var/lib/misc/dnsmasq.leases
|
|
||||||
}
|
|
||||||
|
|
||||||
# Setup macvtap device to connect later the VM and setup a new macvlan device to connect the host machine to the network
|
# Setup macvtap device to connect later the VM and setup a new macvlan device to connect the host machine to the network
|
||||||
configureNatNetworks () {
|
configureNatNetworks () {
|
||||||
|
|
||||||
@ -46,7 +34,15 @@ configureNatNetworks () {
|
|||||||
#Enable port forwarding flag
|
#Enable port forwarding flag
|
||||||
[[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]] && sysctl -w net.ipv4.ip_forward=1
|
[[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]] && sysctl -w net.ipv4.ip_forward=1
|
||||||
|
|
||||||
setupLocalDhcp $VM_NET_MAC $VM_NET_IP
|
CIDR="24"
|
||||||
|
HOSTNAME="VirtualDSM"
|
||||||
|
|
||||||
|
# dnsmasq configuration:
|
||||||
|
DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-range=$VM_NET_IP,$VM_NET_IP --dhcp-host=$VM_NET_MAC,,$VM_NET_IP,$HOSTNAME,infinite --dhcp-option=option:netmask,255.255.255.0"
|
||||||
|
|
||||||
|
# Create lease file for faster resolve
|
||||||
|
echo "0 $VM_NET_MAC $VM_NET_IP $HOSTNAME 01:${VM_NET_MAC}" > /var/lib/misc/dnsmasq.leases
|
||||||
|
chmod 644 /var/lib/misc/dnsmasq.leases
|
||||||
}
|
}
|
||||||
|
|
||||||
# ######################################
|
# ######################################
|
||||||
@ -61,14 +57,6 @@ if [ ! -c /dev/net/tun ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -c /dev/net/tun ] && echo "Error: TUN network interface not available..." && exit 85
|
[ ! -c /dev/net/tun ] && echo "Error: TUN network interface not available..." && exit 85
|
||||||
[ ! -d "$IMG" ] && echo "Storage folder (${IMG}) not found!" && exit 86
|
|
||||||
|
|
||||||
#If environment variabele not set fall back to file
|
|
||||||
if [ -z "$VM_NET_MAC" ]; then
|
|
||||||
FILE="${IMG}/guest.mac"
|
|
||||||
[ ! -f "$FILE" ] && echo "00:11:32:2C:A7:85" > "$FILE"
|
|
||||||
VM_NET_MAC=$(cat "${FILE}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
update-alternatives --set iptables /usr/sbin/iptables-legacy > /dev/null
|
update-alternatives --set iptables /usr/sbin/iptables-legacy > /dev/null
|
||||||
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy > /dev/null
|
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy > /dev/null
|
||||||
@ -88,17 +76,28 @@ for nameserver in "${nameservers[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
DNSMASQ_OPTS="$DNSMASQ_OPTS \
|
if [ -z $DNS_SERVERS ]; then
|
||||||
--dhcp-option=option:dns-server,$DNS_SERVERS \
|
DNS_SERVERS="1.1.1.1"
|
||||||
--dhcp-option=option:router,${VM_NET_IP%.*}.1 \
|
else
|
||||||
--dhcp-option=option:domain-search,$searchdomains \
|
COMMAS=${DNS_SERVERS//[^,]/}
|
||||||
--dhcp-option=option:domain-name,$domainname"
|
COMMAS=${#COMMAS}
|
||||||
|
((COMMAS < 1)) && DNS_SERVERS="$DNS_SERVERS,1.1.1.1"
|
||||||
|
fi
|
||||||
|
|
||||||
[[ -z $(hostname -d) ]] || DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-option=option:domain-name,$(hostname -d)"
|
DNSMASQ_OPTS="$DNSMASQ_OPTS \
|
||||||
|
--dhcp-option=option:dns-server,$DNS_SERVERS \
|
||||||
|
--dhcp-option=option:router,${VM_NET_IP%.*}.1"
|
||||||
|
|
||||||
|
if [ -n "$searchdomains" -a "$searchdomains" != "." ]; then
|
||||||
|
DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-option=option:domain-search,$searchdomains"
|
||||||
|
DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-option=option:domain-name,$domainname"
|
||||||
|
else
|
||||||
|
[[ -z $(hostname -d) ]] || DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-option=option:domain-name,$(hostname -d)"
|
||||||
|
fi
|
||||||
|
|
||||||
$DNSMASQ $DNSMASQ_OPTS
|
$DNSMASQ $DNSMASQ_OPTS
|
||||||
|
|
||||||
KVM_NET_OPTS="${KVM_NET_OPTS} -device virtio-net-pci,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"
|
KVM_NET_OPTS="${KVM_NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"
|
||||||
|
|
||||||
# Hack for guest VMs complaining about "bad udp checksums in 5 packets"
|
# Hack for guest VMs complaining about "bad udp checksums in 5 packets"
|
||||||
iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill
|
iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill
|
||||||
|
19
run.sh
19
run.sh
@ -1,25 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if /run/install.sh; then
|
echo "Starting Virtual DSM..."
|
||||||
echo "Starting Virtual DSM..."
|
|
||||||
else
|
|
||||||
echo "Installation failed (code $?)" && exit 81
|
|
||||||
fi
|
|
||||||
|
|
||||||
source /run/disk.sh
|
. /run/install.sh
|
||||||
|
. /run/disk.sh
|
||||||
|
|
||||||
[ -z "${KVM_DISK_OPTS}" ] && echo "Error: Failed to setup disks..." && exit 83
|
[ -z "${KVM_DISK_OPTS}" ] && echo "Error: Failed to setup disks..." && exit 83
|
||||||
|
|
||||||
source /run/network.sh
|
. /run/network.sh
|
||||||
|
|
||||||
[ -z "${KVM_NET_OPTS}" ] && echo "Error: Failed to setup network..." && exit 84
|
[ -z "${KVM_NET_OPTS}" ] && echo "Error: Failed to setup network..." && exit 84
|
||||||
|
|
||||||
source /run/serial.sh
|
. /run/serial.sh
|
||||||
|
|
||||||
[ -z "${KVM_SERIAL_OPTS}" ] && echo "Error: Failed to setup serial..." && exit 85
|
[ -z "${KVM_SERIAL_OPTS}" ] && echo "Error: Failed to setup serial..." && exit 85
|
||||||
|
|
||||||
source /run/power.sh
|
. /run/power.sh
|
||||||
|
|
||||||
[ -z "${KVM_MON_OPTS}" ] && echo "Error: Failed to setup monitor..." && exit 87
|
[ -z "${KVM_MON_OPTS}" ] && echo "Error: Failed to setup monitor..." && exit 87
|
||||||
|
|
||||||
@ -39,7 +36,9 @@ ARGS="-m ${RAM_SIZE} -smp ${CPU_CORES} ${KVM_ACC_OPTS} ${EXTRA_OPTS} ${KVM_MON_O
|
|||||||
|
|
||||||
set -m
|
set -m
|
||||||
(
|
(
|
||||||
for _SIGNAL in {1..64}; do trap "echo Caught trap ${_SIGNAL} for the QEMU process" "${_SIGNAL}"; done
|
for _SIGNAL in {1..64}; do
|
||||||
|
trap "echo Caught trap ${_SIGNAL} for the QEMU process" "${_SIGNAL}";
|
||||||
|
done
|
||||||
qemu-system-x86_64 ${ARGS} & echo $! > ${_QEMU_PID}
|
qemu-system-x86_64 ${ARGS} & echo $! > ${_QEMU_PID}
|
||||||
)
|
)
|
||||||
set +m
|
set +m
|
||||||
|
59
serial.sh
59
serial.sh
@ -1,33 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
# Docker environment variabeles
|
# Docker environment variabeles
|
||||||
: ${HOST_SERIAL:=''}
|
|
||||||
: ${GUEST_SERIAL:=''}
|
|
||||||
|
|
||||||
permanent="DSM"
|
: ${HOST_BUILD:='42962'}
|
||||||
serialstart="2000"
|
: ${HOST_VERSION:='2.6.1-12139'}
|
||||||
|
: ${HOST_TIMESTAMP:='1679863686'}
|
||||||
[ ! -d "$IMG" ] && echo "Storage folder (${IMG}) not found!" && exit 69
|
: ${HOST_SERIAL:='0000000000000'}
|
||||||
|
: ${GUEST_SERIAL:='0000000000000'}
|
||||||
#If environment variabele not set fall back to file
|
: ${GUEST_UUID:='ba13a19a-c0c1-4fef-9346-915ed3b98341'}
|
||||||
if [ -z "$HOST_SERIAL" ]; then
|
|
||||||
FILE="${IMG}/host.serial"
|
|
||||||
if [ ! -f "$FILE" ]; then
|
|
||||||
SERIAL="$(echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1)$permanent"$(printf "%06d" $((RANDOM % 30000 + 1)))
|
|
||||||
echo $SERIAL > "$FILE"
|
|
||||||
fi
|
|
||||||
HOST_SERIAL=$(cat "${FILE}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
#If environment variabele not set fall back to file
|
|
||||||
if [ -z "$GUEST_SERIAL" ]; then
|
|
||||||
FILE="${IMG}/guest.serial"
|
|
||||||
if [ ! -f "$FILE" ]; then
|
|
||||||
SERIAL="$(echo "$serialstart" | tr ' ' '\n' | sort -R | tail -1)$permanent"$(printf "%06d" $((RANDOM % 30000 + 1)))
|
|
||||||
echo $SERIAL > "$FILE"
|
|
||||||
fi
|
|
||||||
GUEST_SERIAL=$(cat "${FILE}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
CPU=$(lscpu | sed -nr '/Model name/ s/.*:\s*(.*) @ .*/\1/p' | sed ':a;s/ / /;ta' | sed s/"(R)"//g | sed s/"-"//g | sed 's/[^[:alnum:] ]\+//g')
|
CPU=$(lscpu | sed -nr '/Model name/ s/.*:\s*(.*) @ .*/\1/p' | sed ':a;s/ / /;ta' | sed s/"(R)"//g | sed s/"-"//g | sed 's/[^[:alnum:] ]\+//g')
|
||||||
|
|
||||||
@ -38,18 +19,18 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
./run/serial.bin -cpu="${CPU_CORES}" \
|
./run/serial.bin -cpu="${CPU_CORES}" \
|
||||||
-cpu_arch="${CPU}" \
|
-cpu_arch="${CPU}" \
|
||||||
-buildnumber=42962 \
|
-hostsn="${HOST_SERIAL}" \
|
||||||
-vmmts=1679863686 \
|
-guestsn="${GUEST_SERIAL}" \
|
||||||
-hostsn="${HOST_SERIAL}" \
|
-vmmts="${HOST_TIMESTAMP}" \
|
||||||
-guestsn="${GUEST_SERIAL}" \
|
-vmmversion="${HOST_VERSION}" \
|
||||||
-vmmversion="2.6.1-12139" \
|
-buildnumber="${HOST_BUILD}" \
|
||||||
-guestuuid="ba13a19a-c0c1-4fef-9346-915ed3b98341" > /dev/null 2>&1 &
|
-guestuuid="${GUEST_UUID}" > /dev/null 2>&1 &
|
||||||
|
|
||||||
KVM_SERIAL_OPTS="\
|
KVM_SERIAL_OPTS="\
|
||||||
-serial mon:stdio \
|
-serial mon:stdio \
|
||||||
-device virtio-serial-pci,id=virtio-serial0,bus=pcie.0,addr=0x3 \
|
-device virtio-serial-pci,id=virtio-serial0,bus=pcie.0,addr=0x3 \
|
||||||
-chardev pty,id=charserial0 \
|
-chardev pty,id=charserial0 \
|
||||||
-device isa-serial,chardev=charserial0,id=serial0 \
|
-device isa-serial,chardev=charserial0,id=serial0 \
|
||||||
-chardev socket,id=charchannel0,host=127.0.0.1,port=12345,reconnect=10 \
|
-chardev socket,id=charchannel0,host=127.0.0.1,port=12345,reconnect=10 \
|
||||||
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=vchannel"
|
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=vchannel"
|
||||||
|
@ -55,7 +55,7 @@ func main() {
|
|||||||
listener, err := net.Listen("tcp", *ListenAddr)
|
listener, err := net.Listen("tcp", *ListenAddr)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error listening", err.Error())
|
log.Fatalln("Error listening", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ func main() {
|
|||||||
for {
|
for {
|
||||||
conn, err := listener.Accept()
|
conn, err := listener.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error on accept", err.Error())
|
log.Fatalln("Error on accept", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Printf("New connection from %s\n", conn.RemoteAddr().String())
|
log.Printf("New connection from %s\n", conn.RemoteAddr().String())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user