Skip to content

Commit e9cd2c1

Browse files
committed
temporarily disabled p2p
Signed-off-by: Robert Gogete <gogeterobert@yahoo.com>
1 parent 602b628 commit e9cd2c1

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

src/registry/gun-registry.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ export class GunRegistry {
5151
namespace: options.namespace || "dig-nat-tools",
5252
forceOverride: options.forceOverride ?? true,
5353
overrideDelayMs: options.overrideDelayMs ?? 150,
54-
webrtc: options.webrtc || {
55-
iceServers: [
56-
{ urls: 'stun:stun.l.google.com:19302' },
57-
{ urls: 'stun:stun1.l.google.com:19302' },
58-
{ urls: 'stun:stun2.l.google.com:19302' }
59-
]
60-
},
61-
localStorage: options.localStorage ?? true,
54+
// webrtc: options.webrtc || {
55+
// iceServers: [
56+
// { urls: 'stun:stun.l.google.com:19302' },
57+
// { urls: 'stun:stun1.l.google.com:19302' },
58+
// { urls: 'stun:stun2.l.google.com:19302' }
59+
// ]
60+
// },
61+
// localStorage: options.localStorage ?? true,
6262
};
6363

6464
this.initializeGun();
@@ -68,8 +68,10 @@ export class GunRegistry {
6868
try {
6969
this.gun = Gun({
7070
peers: this.options.peers,
71-
rtc: this.options.webrtc, // Enable WebRTC with ICE servers
72-
localStorage: this.options.localStorage // Enable local storage for offline capabilities
71+
file: undefined, // Disable local file storage (must be string or undefined)
72+
localStorage: false, // Use option or default to false
73+
radisk: false, // Disable radisk storage
74+
axe: false,
7375
});
7476
this.isGunAvailable = true;
7577
console.log("Gun.js registry initialized with WebRTC and mesh networking");

src/relay.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,7 @@ async function startRelay(): Promise<void> {
5151
radisk: true, // persistent storage
5252
file: 'gun-data', // storage folder
5353
peers: [], // no public relays - this relay serves as the discovery point
54-
rtc: { // Enable WebRTC for direct peer connections (mesh is automatic)
55-
iceServers: [
56-
{ urls: 'stun:stun.l.google.com:19302' },
57-
{ urls: 'stun:stun1.l.google.com:19302' },
58-
{ urls: 'stun:stun2.l.google.com:19302' }
59-
]
60-
},
61-
localStorage: false // Relay doesn't need local storage
54+
axe: false
6255
});
6356

6457
// Add custom routes by intercepting requests before Gun handles them

0 commit comments

Comments
 (0)