Skip to content

Commit

Permalink
fix(stun): Add self hosted stun
Browse files Browse the repository at this point in the history
  • Loading branch information
Prash committed May 14, 2018
1 parent ff1862f commit 073f6dd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
17 changes: 17 additions & 0 deletions bin/build-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')

if [ -z "$APP_ENV" ]; then
APP_ENV="development"
fi

if [ -z "$APP_VERSION"]; then
APP_VERSION=$PACKAGE_VERSION
fi

echo "APP_VERSION=$APP_VERSION APP_ENV=$APP_ENV yarn build"
APP_VERSION=$APP_VERSION APP_ENV=$APP_ENV yarn build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"release": "standard-version",
"update-config": "./bin/update-config.sh",
"takeoff": "echo 'Taking off...' && yarn build-prod && yarn ship-prod && yarn copy-config-prod",
"build-prod": "cp ./config/secrets/src/client/config/index.js ./src/client/config/ && yarn && NODE_ENV=production react-scripts build && git checkout .",
"build-prod": "cp ./config/secrets/src/client/config/index.js ./src/client/config/ && yarn && APP_ENV=production bin/client.sh && git checkout .",
"ship-prod": "yarn ship-prod-client && yarn ship-prod-server",
"ship-prod-client": "scp -i ~/.ssh/do -r build/* root@45.55.194.231:/var/www/current/build/",
"ship-prod-server": "pm2 deploy ecosystem.json production",
Expand Down
13 changes: 7 additions & 6 deletions src/client/config/stun.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,23 +274,24 @@ const stunServers = [
const googleStunServers = [
'stun:stun.l.google.com:19302',
'stun:stun1.l.google.com:19302',
'stun:stun2.l.google.com:19302',
'stun:stun3.l.google.com:19302',
'stun:stun4.l.google.com:19302'
'stun:104.131.31.167',
'stun:stun2.l.google.com:19302'
]

export const primaryStunServers = [
...googleStunServers
]

export const secondaryStunServers = [
'stun:stun3.l.google.com:19302',
'stun:stun4.l.google.com:19302',
'stun:stun.barracuda.com:3478',
'stun:stun.2talk.com:3478',
'stun:numb.viagenie.ca:3478',
'stun:stun.budgetphone.nl:3478'
'stun:stun.2talk.com:3478'
]

export const ternaryStunServers = [
'stun:numb.viagenie.ca:3478',
'stun:stun.budgetphone.nl:3478',
'stun:stun.2talk.co.nz:3478',
'stun:stun.freecall.com:3478'
]
Expand Down
2 changes: 1 addition & 1 deletion src/client/views/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Home extends Component {
<InviteWrapper />
</div>
<footer className='footer'>
Copyright © Prashanth R. {`${new Date().getFullYear()}`}
Copyright © PR. {`${new Date().getFullYear()}`}
{`${APP_VERSION ? `v${APP_VERSION}` : ''}`}
</footer>
</div>
Expand Down

0 comments on commit 073f6dd

Please sign in to comment.