mirror of
https://github.com/house-of-vanity/Wireguard-Peer-Manager.git
synced 2025-08-21 15:37:15 +00:00
Update gen.py
This commit is contained in:
4
gen.py
4
gen.py
@@ -38,12 +38,12 @@ is_update = args.update
|
|||||||
wpm_config = configparser.ConfigParser()
|
wpm_config = configparser.ConfigParser()
|
||||||
if wpm_config.read('wpm.conf'):
|
if wpm_config.read('wpm.conf'):
|
||||||
ips = wpm_config['Interface'].get('allowed_ips', '0.0.0.0/0')
|
ips = wpm_config['Interface'].get('allowed_ips', '0.0.0.0/0')
|
||||||
dns = wpm_config['Interface'].get('dns', '8.8.8.8/32')
|
dns = wpm_config['Interface'].get('dns', '8.8.8.8')
|
||||||
hostname = wpm_config['Interface'].get('hostname', getfqdn())
|
hostname = wpm_config['Interface'].get('hostname', getfqdn())
|
||||||
config = args.config if args.config else (wpm_config['Interface'].get('config', 'wg0'))
|
config = args.config if args.config else (wpm_config['Interface'].get('config', 'wg0'))
|
||||||
else:
|
else:
|
||||||
ips = '0.0.0.0/0'
|
ips = '0.0.0.0/0'
|
||||||
dns = '8.8.8.8/32'
|
dns = '8.8.8.8'
|
||||||
hostname = getfqdn()
|
hostname = getfqdn()
|
||||||
config = args.config
|
config = args.config
|
||||||
log.info('Using %s WG config file.', config)
|
log.info('Using %s WG config file.', config)
|
||||||
|
Reference in New Issue
Block a user