Skip to content

Commit

Permalink
upd: (genwg/) genfiles.py; fix the dumped yaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
gottaeat committed Jan 4, 2024
1 parent ceaf9fe commit 7506019
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions genwg/genfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,8 @@ def _save_yaml(self):
sv_dict["udp2raw_secret"] = server.udp2raw_secret
sv_dict["udp2raw_port"] = server.udp2raw_port

try:
if server.extra_address:
sv_dict["extra_address"] = server.extra_address
except AttributeError:
pass

yaml_dict["servers"].append(sv_dict)

Expand All @@ -346,15 +344,11 @@ def _save_yaml(self):
cl_dict["wgquick_path"] = client.wgquick_path
cl_dict["udp2raw_path"] = client.udp2raw_path

try:
if client.append_extra:
cl_dict["append_extra"] = client.append_extra
except AttributeError:
pass

try:
if client.extra_allowed:
cl_dict["extra_allowed"] = client.extra_allowed
except AttributeError:
pass

yaml_dict["clients"].append(cl_dict)

Expand Down

0 comments on commit 7506019

Please sign in to comment.