Skip to content

Commit

Permalink
fix: Drop the stun.qq.com and use stun.l.google.com instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Apr 20, 2024
1 parent 7b2c563 commit 6cfcf1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions xmcl-runtime/nat/NatService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export class NatService extends StatefulService<NatState> implements INatService
async refreshNatType(): Promise<void> {
this.log('Start to sample the nat type')

const info = await getNatInfoUDP({ stun: 'stun.qq.com' })
const stun = 'stun.l.google.com'
const info = await getNatInfoUDP({ stun })
if (info.type !== 'Blocked') {
this.state.natInfoSet(info.externalIp, info.externalPort)
}
Expand All @@ -77,7 +78,7 @@ export class NatService extends StatefulService<NatState> implements INatService
const result = await sampleNatType({
sampleCount: 3,
retryInterval: 3_000,
stun: 'stun.qq.com',
stun,
})
if (result) {
this.state.natTypeSet(result)
Expand Down
3 changes: 2 additions & 1 deletion xmcl-runtime/peer/stun.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const iceServers = [
'stun:stun.qq.com',
// 'stun:stun.qq.com',
'stun.l.google.com',
// 'stun:stunserver.org',
// 'stun:stun.voxgratia.org',
// 'stun:stun.ideasip.com',
Expand Down

0 comments on commit 6cfcf1a

Please sign in to comment.