@leofcoin/peernet 0.11.25 → 0.11.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -449,10 +449,20 @@ class Peer {
449
449
  async #init() {
450
450
  try {
451
451
  const iceServers = [{
452
- urls: 'stun:stun.l.google.com:19302' // Google's public STUN server
452
+ urls: 'stun:stun.l.google.com:19302' // Google's public STUN server
453
+ }, {
454
+ urls: "stun:openrelay.metered.ca:80",
455
+ }, {
456
+ urls: "turn:openrelay.metered.ca:443",
457
+ username: "openrelayproject",
458
+ credential: "openrelayproject",
459
+ }, {
460
+ urls: "turn:openrelay.metered.ca:443?transport=tcp",
461
+ username: "openrelayproject",
462
+ credential: "openrelayproject",
453
463
  }];
454
464
 
455
- this.#connection = new wrtc.RTCPeerConnection();
465
+ this.#connection = new wrtc.RTCPeerConnection({iceServers});
456
466
 
457
467
  this.#connection.onicecandidate = ({ candidate }) => {
458
468
  if (candidate) {
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
  var PubSub__default = /*#__PURE__*/_interopDefaultLegacy(PubSub);
11
11
  var Koa__default = /*#__PURE__*/_interopDefaultLegacy(Koa);
12
12
 
13
- var version = "0.11.24";
13
+ var version = "0.11.25";
14
14
 
15
15
  var api$1 = {
16
16
  version: ({send}) => send({client: '@peernet/api/http', version}),
@@ -447,10 +447,20 @@ class Peer {
447
447
  async #init() {
448
448
  try {
449
449
  const iceServers = [{
450
- urls: 'stun:stun.l.google.com:19302' // Google's public STUN server
450
+ urls: 'stun:stun.l.google.com:19302' // Google's public STUN server
451
+ }, {
452
+ urls: "stun:openrelay.metered.ca:80",
453
+ }, {
454
+ urls: "turn:openrelay.metered.ca:443",
455
+ username: "openrelayproject",
456
+ credential: "openrelayproject",
457
+ }, {
458
+ urls: "turn:openrelay.metered.ca:443?transport=tcp",
459
+ username: "openrelayproject",
460
+ credential: "openrelayproject",
451
461
  }];
452
462
 
453
- this.#connection = new wrtc.RTCPeerConnection();
463
+ this.#connection = new wrtc.RTCPeerConnection({iceServers});
454
464
 
455
465
  this.#connection.onicecandidate = ({ candidate }) => {
456
466
  if (candidate) {
@@ -1878,7 +1888,7 @@ class Peernet {
1878
1888
  protocol: 'peernet-v0.1.0', host: '127.0.0.1', port: options.port
1879
1889
  });
1880
1890
  } else {
1881
- const http = await Promise.resolve().then(function () { return require('./http-78686629.js'); });
1891
+ const http = await Promise.resolve().then(function () { return require('./http-997ec597.js'); });
1882
1892
  if (environment !== 'browser') http.default(options);
1883
1893
  }
1884
1894
 
@@ -405,10 +405,20 @@ class Peer {
405
405
  async #init() {
406
406
  try {
407
407
  const iceServers = [{
408
- urls: 'stun:stun.l.google.com:19302' // Google's public STUN server
408
+ urls: 'stun:stun.l.google.com:19302' // Google's public STUN server
409
+ }, {
410
+ urls: "stun:openrelay.metered.ca:80",
411
+ }, {
412
+ urls: "turn:openrelay.metered.ca:443",
413
+ username: "openrelayproject",
414
+ credential: "openrelayproject",
415
+ }, {
416
+ urls: "turn:openrelay.metered.ca:443?transport=tcp",
417
+ username: "openrelayproject",
418
+ credential: "openrelayproject",
409
419
  }];
410
420
 
411
- this.#connection = new wrtc.RTCPeerConnection();
421
+ this.#connection = new wrtc.RTCPeerConnection({iceServers});
412
422
 
413
423
  this.#connection.onicecandidate = ({ candidate }) => {
414
424
  if (candidate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.11.25",
3
+ "version": "0.11.26",
4
4
  "description": "",
5
5
  "main": "dist/commonjs/peernet.js",
6
6
  "module": "dist/module/peernet.js",
@@ -26,7 +26,7 @@
26
26
  "@leofcoin/codec-format-interface": "^1.0.1",
27
27
  "@leofcoin/generate-account": "^1.0.2",
28
28
  "@leofcoin/multi-wallet": "^2.1.2",
29
- "@leofcoin/peernet-swarm": "^0.3.0",
29
+ "@leofcoin/peernet-swarm": "^0.3.1",
30
30
  "@leofcoin/storage": "^2.3.0",
31
31
  "@vandeurenglenn/base32": "^1.1.0",
32
32
  "@vandeurenglenn/base58": "^1.1.0",