Skip to content

Commit 6bab1e4

Browse files
author
Luka Gulin
committed
Remove listenhost fom client interface completely
1 parent f551b4f commit 6bab1e4

3 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎api/src/setLocalhostConfig.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export function setLocalhostConfig(configFile: string): string {
22
return configFile
33
.split("\n")
4-
.filter((row) => !row.includes("ListenPort"))
54
.map((row) =>
65
row.match(/^Endpoint\s*=/) ? "Endpoint = localhost:51820" : row,
76
)

‎api/test/setLocalhostConfig.test.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import { expect } from "chai";
33
import { setLocalhostConfig } from "../src/setLocalhostConfig";
44

55
describe("setLocalhostConfig", function () {
6-
it("removes ListenPort and sets localhost endpoint", function () {
6+
it("sets localhost endpoint", function () {
77
const remoteConfig = `[Interface]
88
Address = AX032NVGI2RIB4
99
PrivateKey = HIgo9xNzJMWLKASShiTqIybxZ0U3wGLiUeJ1PKf8ykw=
10-
ListenPort = 51820
1110
DNS = 172.33.1.2
1211
1312
[Peer]

‎root/defaults/peer.conf‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[Interface]
22
Address = ${CLIENT_IP}
33
PrivateKey = $(cat /config/${PEER_ID}/privatekey-${PEER_ID})
4-
ListenPort = 51820
54
DNS = ${PEERDNS}
65

76
[Peer]

0 commit comments

Comments
 (0)