Skip to content

Commit

Permalink
Make mtu and log-level options configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Carbenium committed Dec 13, 2023
1 parent 834f8bc commit c913b90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ ocserv_routes: []
ocserv_tcp_port: 443
ocserv_tcp_is_proxy: false
ocserv_udp_port: 443

ocserv_mtu: 1500

ocserv_banner: 'Welcome to ocserv.'

ocserv_log_level: 1

ocserv_vhosts: []
# - name: vpn2.example.com
# auth: []
Expand Down
4 changes: 2 additions & 2 deletions templates/ocserv.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ pid-file = /run/ocserv.pid
# 4 http
# 8 sensitive
# 9 TLS
log-level = 1
log-level = {{ ocserv_log_level }}

# Set the protocol-defined priority (SO_PRIORITY) for packets to
# be sent. That is a number from 0 to 6 with 0 being the lowest
Expand Down Expand Up @@ -536,7 +536,7 @@ ping-leases = false
# connections. Unset to use the default MTU of the TUN device.
# Note that the MTU is negotiated using the value set and the
# value sent by the peer.
#mtu = 1420
mtu = {{ ocserv_mtu }}

# Unset to enable bandwidth restrictions (in bytes/sec). The
# setting here is global, but can also be set per user or per group.
Expand Down

0 comments on commit c913b90

Please sign in to comment.