mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-21 03:14:10 +02:00
chore!(amneziawg): refactor to be separate from wireguard
- amneziawg is now a VPN protocol and no longer a Wireguard implementation - Use it with VPN_TYPE=amneziawg - document AMNEZIAWG_* options in Dockerfile - document amneziawg support in readme - separate amneziawg settings and code from wireguard - re-use code from wireguard whenever possible
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants"
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
"github.com/qdm12/gluetun/internal/netlink"
|
||||
"github.com/qdm12/gluetun/internal/pmtud"
|
||||
pconstants "github.com/qdm12/gluetun/internal/pmtud/constants"
|
||||
@@ -48,6 +49,14 @@ type tunnelUpPMTUDData struct {
|
||||
}
|
||||
|
||||
func (l *Loop) onTunnelUp(ctx, loopCtx context.Context, data tunnelUpData) {
|
||||
switch vpnType := l.GetSettings().Type; vpnType {
|
||||
case vpn.Wireguard, vpn.AmneziaWg:
|
||||
l.logger.Infof("%s setup is complete. "+
|
||||
"Note %s is a silent protocol and it may or may not work, without giving any error message. "+
|
||||
"Typically i/o timeout errors indicate the %s connection is not working.",
|
||||
vpnType, vpnType, vpnType)
|
||||
}
|
||||
|
||||
l.client.CloseIdleConnections()
|
||||
|
||||
for _, vpnPort := range l.vpnInputPorts {
|
||||
|
||||
Reference in New Issue
Block a user