TODO: Fixing the naming of variables
This commit is contained in:
@@ -75,8 +75,9 @@ function wireguard_connect(ctx,args) {
|
||||
|
||||
|
||||
// Converts mullvad endpoints respecting its config to nm wireguard endpoint obj
|
||||
function mullvad_parse() {
|
||||
const conf = json(readfile("/etc/providers/config_"+provider_name+".json"));
|
||||
// TODO: Methode machen json config ließt um keys von vpn anbieter / endpoint der json response zu lesen um werte zu setzen
|
||||
function mullvad_parse(provider_name='mullvad') {
|
||||
const conf = json(readfile("config_"+provider_name+".json"));
|
||||
let raw_apiresp = readfile('/tmp/mullvad_endpoints');
|
||||
let wg_part = {};
|
||||
|
||||
@@ -110,7 +111,7 @@ function mullvad_parse() {
|
||||
e_v6 = endpoint_format(relay['ipv6_addr_in'],port);
|
||||
|
||||
// Create Mullvad tunnel, getting its internal ip address from the config files (should be set to a database later)
|
||||
tunnel = tunnel_ip_format(conf.ipv4, conf.ipv6, e_v4, e_v6);
|
||||
tunnel = tunnel_ip_format(conf.intunnel_v4, conf.intunnel_v6, e_v4, e_v6);
|
||||
|
||||
log("Created Endpoint -> "+ e_v4 + "\n" + e_v6 + "\n"+ tunnel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user