-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Interop test for webrtc and webrtc-direct (#1788)
* eslint .aegir * Add browser to browser tests * Fix version definition * Copy in relay.js to image * Use branch of interop runner for fewer webrtc combinations * Skip muxer and secure channel setup * Sort by non local ip for relay * Listen on all addrs for relay * Update .github/workflows/interop-test.yml * Update webrtc dep for interop --------- Co-authored-by: Chad Nehemiah <chad.nehemiah94@gmail.com>
- Loading branch information
Showing
7 changed files
with
142 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { noise } from '@chainsafe/libp2p-noise' | ||
import { yamux } from '@chainsafe/libp2p-yamux' | ||
import { webSockets } from '@libp2p/websockets' | ||
import * as filters from '@libp2p/websockets/filters' | ||
import { createLibp2p } from 'libp2p' | ||
import { circuitRelayServer } from 'libp2p/circuit-relay' | ||
import { identifyService } from 'libp2p/identify' | ||
|
||
export async function createRelay () { | ||
const server = await createLibp2p({ | ||
addresses: { | ||
listen: ['/ip4/0.0.0.0/tcp/0/ws'] | ||
}, | ||
transports: [ | ||
webSockets({ | ||
filter: filters.all | ||
}) | ||
], | ||
connectionEncryption: [noise()], | ||
streamMuxers: [yamux()], | ||
services: { | ||
identify: identifyService(), | ||
relay: circuitRelayServer() | ||
} | ||
}) | ||
return server | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters