TCP_NODELAY

Add tcp_nodelay option for proto tcp

 --tcp-nodelay
              This  macro sets the TCP_NODELAY socket flag on the server as well as pushes it to
              connecting clients.  The TCP_NODELAY flag disables  the  Nagle  algorithm  on  TCP
              sockets  causing  packets  to  be transmitted immediately with low latency, rather
              than waiting a short period of time in order to aggregate several packets  into  a
              larger  containing packet.  In VPN applications over TCP, TCP_NODELAY is generally
              a good latency optimization.
This commit is contained in:
hybtoy 2018-05-09 09:33:12 +05:00 committed by GitHub
parent 19a2e838a3
commit 0e7866cb71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -689,6 +689,8 @@ WantedBy=multi-user.target" > /etc/systemd/system/iptables.service
echo "proto udp" >> /etc/openvpn/server.conf
elif [[ "$PROTOCOL" = '2' ]]; then
echo "proto tcp" >> /etc/openvpn/server.conf
echo "socket-flags TCP_NODELAY" >> /etc/openvpn/server.conf
echo "push "socket-flags TCP_NODELAY"" >> /etc/openvpn/server.conf
fi
echo "dev tun
user nobody