Skip to content

Commit 8900680

Browse files
committed
pass down the relay to main instance
1 parent 618bd9c commit 8900680

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class Autopass extends ReadyResource {
123123
constructor(corestore, opts = {}) {
124124
super()
125125
this.router = new Router()
126+
this.relayThrough = opts.relayThrough || null
126127
this.store = corestore
127128
this.swarm = opts.swarm || null
128129
this.base = null
@@ -293,7 +294,8 @@ class Autopass extends ReadyResource {
293294
if (this.swarm === null) {
294295
this.swarm = new Hyperswarm({
295296
keyPair: await this.store.createKeyPair('hyperswarm'),
296-
bootstrap: this.bootstrap
297+
bootstrap: this.bootstrap,
298+
relayThrough: this.relayThrough
297299
})
298300
this.swarm.on('connection', (connection, peerInfo) => {
299301
this.base.replicate(connection)

0 commit comments

Comments
 (0)