MCPcopy Create free account
hub / github.com/attermann/microReticulum / write_config

Function write_config

test_interop/python_packet_receiver.py:65–89  ·  view source on GitHub ↗
(config_dir: str, port: int)

Source from the content-addressed store, hash-verified

63
64
65def write_config(config_dir: str, port: int) -> None:
66 forward_port = port + 1
67 cfg = f"""
68[reticulum]
69 enable_transport = No
70 share_instance = No
71 shared_instance_port = 37428
72 instance_control_port = 37429
73 panic_on_interface_error = No
74
75[logging]
76 loglevel = 4
77
78[interfaces]
79
80 [[UDPInterop]]
81 type = UDPInterface
82 interface_enabled = True
83 listen_ip = 127.0.0.1
84 listen_port = {port}
85 forward_ip = 127.0.0.1
86 forward_port = {forward_port}
87"""
88 with open(os.path.join(config_dir, "config"), "w") as f:
89 f.write(cfg)
90
91
92def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected