Firebase-tools: ํ”„๋ก์‹œ ๋’ค์— ๋ฐฐํฌ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2016๋…„ 05์›” 26์ผ  ยท  151์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: firebase/firebase-tools

์•ˆ๋…•ํ•˜์„ธ์š”,

firebase ์›น ํŠœํ† ๋ฆฌ์–ผ (https://codelabs.developers.google.com/codelabs/firebase-web/)์„ ๋”ฐ๋ฅด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ฒซ ๋ฒˆ์งธ 8 ๋‹จ๊ณ„์—์„œ๋Š” ๋ชจ๋“  ๊ฒƒ์ด ์ž˜ ์ž‘๋™ํ•˜์ง€๋งŒ 9 ๋‹จ๊ณ„์—์„œ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. firebase deploy ๋ช…๋ น์ด ๋ฌด๊ธฐํ•œ ์ค‘๋‹จ๋ฉ๋‹ˆ๋‹ค.
ํ”„๋ก์‹œ ๋’ค์—์žˆ๋Š” ๋™์•ˆ์ด ๋™์ž‘์ด ์žˆ์Šต๋‹ˆ๋‹ค (http_proxy ๋ฐ https_proxy๊ฐ€ env์— ์„ค์ • ๋จ).

ํ”„๋ก์‹œ ๋’ค์— ๋ฐฐํฌํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๊นŒ?
36 ๋ฒˆ ๋ฌธ์ œ์™€ ๊ด€๋ จ๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Yann


๋‹ค์Œ์€ firebase deploy --debug

Command:      node /Users/ymainier/.nvm/versions/node/v0.12.1/bin/firebase deploy --debug
CLI Version:  3.0.0
Platform:     darwin
Node Version: v0.12.1
Time:         Wed May 25 2016 16:46:59 GMT+0200 (CEST)
----------------------------------------------------------------------

> command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
>>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/friendlychat-dd6a6 
<<< HTTP RESPONSE 200 server=nginx, date=Wed, 25 May 2016 14:47:57 GMT, content-type=application/json; charset=utf-8, content-length=124, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
>>> HTTP REQUEST GET https://admin.firebase.com/v1/database/friendlychat-dd6a6/tokens 
<<< HTTP RESPONSE 200 server=nginx, date=Wed, 25 May 2016 14:47:57 GMT, content-type=application/json; charset=utf-8, content-length=433, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

Firebase ๊ฐœ๋ฐœ์ž๋Š”์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์‹ญ์‹œ์˜ค. ์‹ฌ๊ฐํ•œ ๊ฐœ๋ฐœ ์ง€์—ฐ์ž…๋‹ˆ๋‹ค.

๋ชจ๋“  151 ๋Œ“๊ธ€

์ด๊ฒƒ์€ ์•Œ๋ ค์ง„ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์ฐพ๊ณ  ์‹ถ์ง€๋งŒ ๋‹ค์†Œ ์‹œ๊ฐ„์ด ๊ฑธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ถ”์  ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋ฌธ์ œ๋ฅผ ์—ด์–ด ๋‘๊ฒ ์Šต๋‹ˆ๋‹ค.

์ €๋„ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. firebase ํŒ€์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

"ํ˜„์žฌ๋กœ์„œ๋Š” ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. https://github.com/firebase/firebase-tools/issues/155 ์—์„œ ์ถ”์  ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์ˆ˜์ • ๋œ ์ผ์ •์€ ์—†์Šต๋‹ˆ๋‹ค."

์‹ค์ œ๋กœ์ด ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐ XP

๋งŽ์€ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ง์žฅ์—์„œ์ด ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ณง ์ˆ˜์ •๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ๊ฐ€์ง€๊ณ ์žˆ๋‹ค. ๋งŽ์€ ์ž‘์—… ํ™˜๊ฒฝ์—์„œ firebase๋ฅผ ํ‰๊ฐ€ํ•˜๊ธฐ ์–ด๋ ต๊ฒŒ ๋งŒ๋“ญ๋‹ˆ๋‹ค. :( ๋˜ํ•œ ์ง‘์—์„œ ์œ„์„ฑ inet์„ ํ†ตํ•ด ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค (๋ณ„๋„์˜ ๋ฌธ์ œ ์—ด๊ธฐ) : (_

์—ฌ๊ธฐ์—๋„ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค! ๋˜ํ•œ์ด ๋ฌธ์ œ๋Š” ์ธ์ฆ์„ ์ œ์™ธํ•œ Android์˜ ๋ชจ๋“  firebase ๊ธฐ๋Šฅ์— ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚ด ์ž‘์—…์—์„œ ์ž‘๋™ํ•˜๋„๋ก ๊ด€๋ฆฌํ–ˆ์ง€๋งŒ ๋กœ๊ทธ์ธ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” ๋˜ํ•œ` firebase login --no-localhost ์‹œ๋„ํ–ˆ์ง€๋งŒ Error: Authentication Error.

๊ฐ™์€ ๋ฌธ์ œ ..

์ด ๋ฌธ์ œ์— ๋‘ ๋ฒˆ ์™”์–ด์š” ..

์‹œ๊ฐ„ ์ œํ•œ์€ Firebase ๋…ธ๋“œ ๋ชจ๋“ˆ์ด http_proxy ๋ฐ ๊ด€๋ จ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” faye-websockets๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์—ฐ๊ฒฐํ•  ๋•Œ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์œผ๋กœ faye-websockets์—์„œ ํ”„๋ก์‹œ ๊ตฌ์„ฑ์„ ํ•˜๋“œ ์ฝ”๋”ฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๋Š” StackOverflow์— ๋Œ€ํ•œ

์šฐ์•„ํ•˜์ง€๋Š” ์•Š์ง€๋งŒ ์ ์–ด๋„ ์ง€๊ธˆ ๋ฐฐํฌ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. :)

์—ฌ๊ธฐ์—๋„ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ๋ชจ๋“  firebase ๋ช…๋ น์€ ์ž˜ ์ž‘๋™ํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. "firebase deploy"๊ฐ€ ์œ ์ผํ•œ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค. ์ตœ์†Œํ•œ ์ ์ ˆํ•œ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” ์ข‹์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

```

T : ngfirebaseutil> firebase deploy --debug

๋ช…๋ น : C : Program Filesnodejsnode.exe C : UsersmyusernameAppDataRoamingnpmnode_modulesfirebase-toolsbinfirebase deploy --debug
CLI ๋ฒ„์ „ : 3.2.1
ํ”Œ๋žซํผ : win32
๋…ธ๋“œ ๋ฒ„์ „ : v7.3.0

์‹œ๊ฐ„ : 2017 ๋…„ 1 ์›” 25 ์ผ ์ˆ˜์š”์ผ 11:04:37 GMT-0500 (๋™๋ถ€ ํ‘œ์ค€์‹œ)

๋ช…๋ น์—๋Š” ๋ฒ”์œ„๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. [ "email", "openid", " https://www.googleapis.com/auth/cloudplatformprojects.readonly ", " https://www.googleapis.com/auth/firebase "]

HTTP ์š”์ฒญ ๋ฐ›๊ธฐ https://admin.firebase.com/v1/projects/myprojectname-b5558
<<< HTTP RESPONSE 200 via = IG Proxy, date = Wed, 25 Jan 2017 16:04:38 GMT, server = nginx, connection = Close, content-type = application / json; charset = utf-8, cache-control = no-cache, no-store, content-length = 103, x-content-type-options = nosniff, strict-transport-security = max-age = 31536000; includeSubdomains
HTTP ์š”์ฒญ ๋ฐ›๊ธฐ https://admin.firebase.com/v1/database/myprojectname-b5558/tokens
<<< HTTP RESPONSE 200 via = IG Proxy, date = Wed, 25 Jan 2017 16:04:38 GMT, server = nginx, connection = Close, content-type = application / json; charset = utf-8, cache-control = no-cache, no-store, content-length = 423, x-content-type-options = nosniff, strict-transport-security = max-age = 31536000; includeSubdomains```
<>

"firebase login"ํ•  ๋•Œ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ์€ "firebase login --no-localhost"๋กœ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ "firebase init"๋ฐ "firebase deploy"๋ฅผ ์ˆ˜์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ํ•ญ์ƒ "์ธ์ฆ ์˜ค๋ฅ˜"

๊ฐ™์€ ๋ฌธ์ œ ..

1 ๋…„ ํ›„์—๋„ ์—ฌ์ „ํžˆ ํ•ด๊ฒฐ๋˜์ง€ ์•Š์Šต๋‹ˆ๊นŒ?

์–ด์„œ ์‚ฌ์•…ํ•œ ๊ตฌ๊ณจ ..

์—ฌ๊ธฐ์—๋„ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ๋‚ด๊ฐ€ ๋ถ€๋ฅด๋Š” ๋ช…๋ น์ด๋ฉฐ ๋™์ผํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

firebase database:set /object_name

์—ฌ๊ธฐ์— ๊ฐ™์€ ๋ฌธ์ œ !!!!

"์˜ค๋ฅ˜ : ์ธ์ฆ ์˜ค๋ฅ˜ : ์ž๊ฒฉ ์ฆ๋ช…์ด ๋” ์ด์ƒ ์œ ํšจํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. firebase login --reauth๋ฅผ ์‹คํ–‰ํ•˜์‹ญ์‹œ์˜ค.
CI ์„œ๋ฒ„ ๋ฐ ํ—ค๋“œ๋ฆฌ์Šค ํ™˜๊ฒฝ์˜ ๊ฒฝ์šฐ firebase login : ci "๋กœ ์ƒˆ ํ† ํฐ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค

ํ”„๋ก์‹œ ๋’ค์— ๋ฐฐํฌ ํ•  ๋ฐฉ๋ฒ•์ด ์—†์Šต๋‹ˆ๊นŒ?

๊ทธ๊ฒƒ์€ ๋‚˜์˜ ๊ธฐ๋ก์ด๋‹ค

[debug] ----------------------------------------------------------------------
[debug] Command:      C:\Program Files\nodejs\node.exe C:\Users\SDS\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase deploy
[debug] CLI Version:  3.6.1
[debug] Platform:     win32
[debug] Node Version: v7.8.0
[debug] Time:         Mon Apr 17 2017 13:35:27 GMT+0900 (๋Œ€ํ•œ๋ฏผ๊ตญ ํ‘œ์ค€์‹œ)
[debug] ----------------------------------------------------------------------
[debug] 
[debug] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token { refresh_token: '1/cLqub4wdfbPJfm6Rswlzb8L2uA7zXG1SrmTLx17kZ1w',
  client_id: '563584335869-fgrhgmd47bqne........................apps.googleusercontent.com',
  client_secret: 'j9iVZfS8kkCEFU.........',
  grant_type: 'refresh_token',
  scope: 'email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' } 
 Mon Apr 17 2017 13:35:27 GMT+0900 (๋Œ€ํ•œ๋ฏผ๊ตญ ํ‘œ์ค€์‹œ)
[debug] <<< HTTP RESPONSE 200
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/sample-b36e9  
 Mon Apr 17 2017 13:35:29 GMT+0900 (๋Œ€ํ•œ๋ฏผ๊ตญ ํ‘œ์ค€์‹œ)
[debug] <<< HTTP RESPONSE 200
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/sample-b36e9/tokens  
 Mon Apr 17 2017 13:35:30 GMT+0900 (๋Œ€ํ•œ๋ฏผ๊ตญ ํ‘œ์ค€์‹œ)
[debug] <<< HTTP RESPONSE 200

@tingxins ์•ˆ๋…•ํ•˜์„ธ์š”, ์•„๋ž˜ ๋ช…๋ น ํ›„์— ์‹œ๋„ ํ–ˆ์Šต๋‹ˆ๊นŒ?

set "NODE_TLS_REJECT_UNAUTHORIZED=0"

Firebase ๊ฐœ๋ฐœ์ž๋Š”์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์‹ญ์‹œ์˜ค. ์‹ฌ๊ฐํ•œ ๊ฐœ๋ฐœ ์ง€์—ฐ์ž…๋‹ˆ๋‹ค.

์™œ ์ง€๊ธˆ๊นŒ์ง€ ํ•ด๊ฒฐ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๊นŒ?

1 ๋…„

์•„์ง๋„ ์ผ์–ด๋‚˜๊ณ  ๊ณ„์† ๊ท€์ฐฎ๊ฒŒ ... ์ค‘๊ตญ์— ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ํ™”์ด์–ด๋ฒ ์ด์Šค๋ฅผ ํฌ๊ธฐํ• ์ง€๋„ ...

๊ฐ™์€ ๋ฌธ์ œ ...

๊ฐ™์€ ๋ฌธ์ œ

๊ฐ™์€ ๋ฌธ์ œ ...

๊ฐ™์€ ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค.
3 ๊ฐœ์›” ๋™์•ˆ ์ง€์›์„ ๋ฐ›์œผ๋ฉด ๋„์›€์ด๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
๋งˆ์นจ๋‚ด ํ”„๋ก์‹œ๊ฐ€ ์žˆ์–ด์•ผํ•˜๋Š” CovenantEyes๋ฅผ ์ œ๊ฑฐํ•˜๋Š” ์•„์ด๋””์–ด๋ฅผ ์–ป์—ˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋ž˜์„œ ๋กœ๊ทธ์ธ์ด ์ž‘๋™ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.
์ด ๋ฌธ์ œ๋ฅผ ์ผ์œผํ‚ค๋Š” ์•ฑ์ด ๋งŽ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๋“œ๋””์–ด ์šฐํ›„!

capture120

Shadowsocks ํ”„๋ก์‹œ ์‚ฌ์šฉ์ž (Windows 10 Pro)๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•˜๋Š” ํ•œ ๊ฐ€์ง€ ๊ฐ€๋Šฅํ•œ ์†”๋ฃจ์…˜์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค.

1, Shadowsocks PAC ๋ชจ๋“œ์—์„œ "firebase logout"์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

2, Shadowsocks PAC ๋ชจ๋“œ์—์„œ "firebase login"์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

3, Shadowsocks Global Mode (๋ชจ๋“  ์š”์ฒญ์„ ์›๊ฒฉ ์„œ๋น„์Šค๋กœ ๋ฆฌ๋””๋ ‰์…˜)๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

4, "firebase list"๋ฅผ ์‹œ๋„ํ•˜์—ฌ ์ธ์ฆ ์˜ค๋ฅ˜๊ฐ€ ๋‚˜ํƒ€๋‚˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•˜์ง€๋งŒ ๊ทธ๊ฒƒ์ด ๋‹น์‹ ์—๊ฒŒ ๋„์›€์ด๋˜๋Š”์ง€ ์—ฌ๋ถ€๋Š” ํ™•์‹คํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์‹œ๋„ํ• ๋งŒํ•œ ๊ฐ€์น˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

#

ํ•ด๊ฒฐ์ฑ…

#
  1. ' firebase login --interactive '๋ฅผ ์‹คํ–‰ํ•˜์—ฌ @gmail ๊ณ„์ •์— ๋กœ๊ทธ์ธํ•˜์„ธ์š”.

์ด ์ž‘ํ’ˆ !!!

@WbTOne ์ด๋ฏธ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ œ ๊ฒฝ์šฐ์—๋Š” ์ž‘๋™ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

์—ฌ์ „ํžˆ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค

Firebase์˜ ์†”๋ฃจ์…˜ ์‹ ์‚ฌ๊ฐ€

์ด๋ด, ์œ—์ธต ํ˜•์ œ, ์˜์–ด ํ•  ์ค„ ์•Œ์•„?

๊ณต์‹์ ์ธ ํ•ด๊ฒฐ์ฑ…์„ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์ค‘ ...์ด ๋ฌธ์ œ์˜ ์šฐ์„  ์ˆœ์œ„๋Š” ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.

๋””๋ฒ„๊น…์„ ํ•  ๋•Œ ํ–‰์šด์„ ๋น•๋‹ˆ๋‹ค. ๋กœ๊ทธ์ธ ์žฌ ์‹œ๋„์— ์ง€์ณค์Šต๋‹ˆ๋‹ค. ์ด๋กœ ์ธํ•ด ํ”„๋กœ์ ํŠธ๊ฐ€ ์‹ฌ๊ฐํ•˜๊ฒŒ ์ง€์—ฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ ๋‚ด ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

๋‚˜์—๊ฒŒ๋Š” Chrome์„ ์™„์ „ํžˆ ์ข…๋ฃŒํ•˜๊ณ  ๋‹ค์‹œ ์—ด๋ฉด ๋‹ค์‹œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” ์ด๊ฒƒ์ด ๊ฑฐ์˜ 1 ๋…„ ๋ฐ˜ ๋™์•ˆ ๊ณ ์ณ์ง€์ง€ ์•Š์•˜๋‹ค๋Š” ๊ฒƒ์„ ์ง„์ง€ํ•˜๊ฒŒ ๋ฏฟ์„ ์ˆ˜ ์—†๋‹ค.

์ค‘๊ตญ์— ์‚ด๊ณ ์žˆ๋Š” ์•ˆ๋“œ๋กœ์ด๋“œ ๊ฐœ๋ฐœ์ž๋ผ๋ฉด ์–ธ์ œ๋‚˜ ๊ทธ๋ ‡์Šต๋‹ˆ๋‹ค.

Google Play๊ฐ€ ์–ธ์  ๊ฐ€ ๋‹ค์‹œ ๋Œ์•„ ์˜ค๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๋‚˜๋„ ๋ฌธ์ œ๊ฐ€ ์žˆ๋‹ค๊ณ  ๋งํ•˜๊ณ  ์‹ถ์—ˆ์–ด
๊ทธ๋ฆฌ๊ณ  ์ด๊ฒƒ์€ firebase-debug์ž…๋‹ˆ๋‹ค.

[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.778Z] ----------------------------------- -----------------------------------
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.780Z] ๋ช…๋ น : C : \ Program Files \ nodejs \ node.exe C : \ Users \ Hamidreza \ AppData \ Roaming \ npm \ node_modules \ firebase-tools \ bin \ firebase ๋ช…๋ถ€
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.781Z] CLI ๋ฒ„์ „ : 3.13.1
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.781Z] ํ”Œ๋žซํผ : win32
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.781Z] ๋…ธ๋“œ ๋ฒ„์ „ : v6.11.4
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.781Z] ์‹œ๊ฐ„ : 2017 ๋…„ 10 ์›” 9 ์ผ ์›”์š”์ผ 21:16:10 GMT + 0330 (์ด๋ž€ ํ‘œ์ค€์‹œ)
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.781Z] ----------------------------------- -----------------------------------
[๋””๋ฒ„๊ทธ]
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.794Z]> ๋ช…๋ น์—๋Š” ๋ฒ”์œ„๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค : [ "email", "openid", "https://www.googleapis.com/auth/cloudplatformprojects.readonly", "https : //www.googleapis.com/auth/firebase "]
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.795Z]> ๋กœ๊ทธ์ธ ํ•œ ์‚ฌ์šฉ์ž๋ฅผ ํ†ตํ•ด ์ธ์ฆ
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.797Z]> ๋ฒ”์œ„๊ฐ€์žˆ๋Š” ์•ก์„ธ์Šค ํ† ํฐ ์ƒˆ๋กœ ๊ณ ์นจ : [ "email", "https://www.googleapis.com/auth/cloudplatformprojects.readonly", "https : // www.googleapis.com/auth/firebase","openid "]
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 10.797Z] >>> HTTP ์š”์ฒญ ๊ฒŒ์‹œ๋ฌผ https://www.googleapis.com/oauth2/v3/token {refresh_token : '1 / OU1dLTZhJUpNdtDzicGy1xtthchW9wu84awgkUkEmGU',
client_id : '563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
client_secret : 'j9iVZfS8kkCEFUPaAeJV0sAi',
grant_type : 'refresh_token',
๋ฒ”์œ„ : 'email https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid'}
2017 ๋…„ 10 ์›” 9 ์ผ ์›”์š”์ผ 21:16:10 GMT + 0330 (์ด๋ž€ ํ‘œ์ค€์‹œ)
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 11.815Z] <<< HTTP RESPONSE 200
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 11.829Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
2017 ๋…„ 10 ์›” 9 ์ผ ์›”์š”์ผ 21:16:11 GMT + 0330 (์ด๋ž€ ํ‘œ์ค€์‹œ)
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 33.060Z] ์˜ค๋ฅ˜ : ETIMEDOUT 104.197.85.31:443 ์—ฐ๊ฒฐ
Object.exports._errnoException์—์„œ (util.js : 1020 : 11)
exports._exceptionWithHostPort (util.js : 1043 : 20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js : 1090 : 14)
[์˜ค๋ฅ˜]
[์˜ค๋ฅ˜] ์˜ค๋ฅ˜ : ์„œ๋ฒ„ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค. ETIMEDOUT 104.197.85.31:443 ์—ฐ๊ฒฐ
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.934Z] ----------------------------------- -----------------------------------
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.937Z] ๋ช…๋ น : C : \ Program Files \ nodejs \ node.exe C : \ Users \ Hamidreza \ AppData \ Roaming \ npm \ node_modules \ firebase-tools \ bin \ firebase ๋ช…๋ถ€
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.937Z] CLI ๋ฒ„์ „ : 3.13.1
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.937Z] ํ”Œ๋žซํผ : win32
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.937Z] ๋…ธ๋“œ ๋ฒ„์ „ : v6.11.4
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.938Z] ์‹œ๊ฐ„ : 2017 ๋…„ 10 ์›” 9 ์ผ ์›”์š”์ผ 21:16:47 GMT + 0330 (์ด๋ž€ ํ‘œ์ค€์‹œ)
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.938Z] ----------------------------------- -----------------------------------
[๋””๋ฒ„๊ทธ]
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.951Z]> ๋ช…๋ น์—๋Š” ๋ฒ”์œ„๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค : [ "email", "openid", "https://www.googleapis.com/auth/cloudplatformprojects.readonly", "https : //www.googleapis.com/auth/firebase "]
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.951Z]> ๋กœ๊ทธ์ธ ํ•œ ์‚ฌ์šฉ์ž๋ฅผ ํ†ตํ•ด ์ธ์ฆ
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 46 : 47.955Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
2017 ๋…„ 10 ์›” 9 ์ผ ์›”์š”์ผ 21:16:47 GMT + 0330 (์ด๋ž€ ํ‘œ์ค€์‹œ)
[๋””๋ฒ„๊ทธ] [2017-10-09T17 : 47 : 09.030Z] ์˜ค๋ฅ˜ : ETIMEDOUT ์—ฐ๊ฒฐ 104.197.85.31:443
Object.exports._errnoException์—์„œ (util.js : 1020 : 11)
exports._exceptionWithHostPort (util.js : 1043 : 20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js : 1090 : 14)
[์˜ค๋ฅ˜]
[์˜ค๋ฅ˜] ์˜ค๋ฅ˜ : ์„œ๋ฒ„ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค. ETIMEDOUT 104.197.85.31:443 ์—ฐ๊ฒฐ

๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๊ฒฐํ•ด์ฃผ์„ธ์š”!

๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์‹ญ์‹œ์˜ค. ํ”„๋ก์‹œ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ firebase์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์—ฌ๊ธฐ์—๋„ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
์ง‘์— ๋ฐฐ์น˜ํ•ด์•ผํ•˜๋Š”๋ฐ ... : D

๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๊ฒฐํ•ด์ฃผ์„ธ์š”!

๋ผ์šฐํ„ฐ์—์„œ ํ”„๋ก์‹œ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. (Shadowsocks)
๋‚ด ์ปดํ“จํ„ฐ๊ฐ€์ด ๋ผ์šฐํ„ฐ์— ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

image

Android Studio ๋กœ๊ทธ์ธ Google ๊ณ„์ •๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

image

์ด P2 ๋ฒ„๊ทธ๋Š” 1 ๋…„ ๋ฐ˜ ๋™์•ˆ ์ง€์†๋ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” ์—ฌ๊ธฐ์— ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค :(

์—ฌ๊ธฐ์—์„œ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค!

"NODE_TLS_REJECT_UNAUTHORIZED = 0"์„ค์ •

๋„ˆ๋ฌด ๋ฐฐํฌ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค

[debug] [2017-10-31T15:00:41.884Z] ----------------------------------------------------------------------
[debug] [2017-10-31T15:00:41.884Z] Command:       C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\firebase-tools\bin\firebase deploy
[debug] [2017-10-31T15:00:41.884Z] CLI Version:   3.14.0
[debug] [2017-10-31T15:00:41.884Z] Platform:      win32
[debug] [2017-10-31T15:00:41.884Z] Node Version:  v6.11.4
[debug] [2017-10-31T15:00:41.884Z] Time:          Tue Oct 31 2017 13:00:41 GMT-0200 (Horรกrio brasileiro de verรฃo)
[debug] [2017-10-31T15:00:41.884Z] ----------------------------------------------------------------------
[debug] 
[debug] [2017-10-31T15:00:41.904Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2017-10-31T15:00:41.904Z] > authorizing via signed-in user
[debug] [2017-10-31T15:00:41.904Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2017-10-31T15:00:41.904Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token { refresh_token: '1/*************************************************************************************',
  client_id: '*************************************************************.com',
  client_secret: '*******************************',
  grant_type: 'refresh_token',
  scope: 'email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' } 
 Tue Oct 31 2017 13:00:41 GMT-0200 (Horรกrio brasileiro de verรฃo)
[debug] [2017-10-31T15:00:42.285Z] <<< HTTP RESPONSE 200
[debug] [2017-10-31T15:00:42.315Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/where2party-51f6a  
 Tue Oct 31 2017 13:00:42 GMT-0200 (Horรกrio brasileiro de verรฃo)
[debug] [2017-10-31T15:00:43.194Z] <<< HTTP RESPONSE 200
[debug] [2017-10-31T15:00:43.194Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/where2party-51f6a/tokens  
 Tue Oct 31 2017 13:00:43 GMT-0200 (Horรกrio brasileiro de verรฃo)
[debug] [2017-10-31T15:00:44.238Z] <<< HTTP RESPONSE 200

์ด๊ฒƒ์ด ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธ

ํ™•์ธ ๋œ ์ž‘์—… ์†”๋ฃจ์…˜ :

  1. request ์˜ํ•ด ์—ฌ์ „ํžˆ ํ•„์š”ํ•˜๊ณ  ์กด์ค‘๋˜๊ณ  ์žˆ์œผ๋ฏ€๋กœ env var http_proxy request
  2. ํ•ดํ‚น faye-websocket/lib/faye/websocket/client.js :
...
var Client = function(_url, protocols, options) {
  options = options || {};

  options.proxy = {
    origin:  'http://localhost:1087',
  }
...
  1. NODE_TLS_REJECT_UNAUTHORIZED=0
  2. p2 ์™€ ๊ฐ™์€ ๋ฌธ์ œ ๋ ˆ์ด๋ธ”์„ ์‹ ๋ขฐํ•˜์ง€ ๋งˆ์‹ญ์‹œ์˜ค.

@namiwang ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค :(

๊ฐ€์žฅ ํฐ ์ฐจ์ด์ ์€ ์‚ฌ์šฉ์ž / ์•”ํ˜ธ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

var Client = function(_url, protocols, options) {
  options = options || {};

  options.proxy = {
    origin:  'http://user:[email protected]:port',
  }

๊ทธ๋ฆฌ๊ณ  set NODE_TLS_REJECT_UNAUTHORIZED=0 ์ด๋ผ๊ณ  ๋งํ•˜๋ฉด Linux์˜ ๋ช…๋ น์€ export NODE_TLS_REJECT_UNAUTHORIZED=0 .

์ด๊ฒƒ์€ ๊ณ ์น˜๊ธฐ ์‰ฌ์šด ์ผ์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํฐ ์‹œ๊ฐ„์„ ๋Š๋ฆฌ๊ฒŒ ....

  1. Firebase ๋กœ๊ทธ์ธ์€ ํšŒ์‚ฌ ๋…ธํŠธ๋ถ์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š์œผ๋ฉฐ Windows์—์„œ๋งŒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.
    Firebase : 3.16.0
    Npm : 5.3.0
    Windows : 7, x64
    ํ”„๋ก์‹œ : http://proxy.XXXXXXX.com : 80

  2. ๋‚ด ์ง‘ ๋…ธํŠธ๋ถ์—์„œ ์„ค์น˜ํ•˜๊ณ  ๋กœ๊ทธ์ธํ•˜๋ ค๊ณ  ์‹œ๋„ํ–ˆ์ง€๋งŒ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค.
    Windows : 10, x64

  3. ์šฐ๋ฆฌ๋Š” ํšŒ์‚ฌ ํ”„๋ก์‹œ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์ง€๋งŒ ์–ด๋–ค ์ด์œ ๋กœ Windows๊ฐ€ ์„ค์น˜๋œ ๋žฉํ†ฑ์—์„œ๋งŒ ๋ฌธ์ œ๊ฐ€๋˜๊ณ  MacOS๊ฐ€์žˆ๋Š” ํšŒ์‚ฌ ๋žฉํ†ฑ์„ ์‚ฌ์šฉํ•ด ๋ณด์•˜๊ณ  "firebase ๋กœ๊ทธ์ธ"์ด ์ œ๋Œ€๋กœ ์ž‘๋™ ํ•ฉ๋‹ˆ๋‹ค.

  4. ๋ธŒ๋ผ์šฐ์ € ์•„๋ž˜ ํŒŒ์ผ์˜ ์ผ๋ถ€ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ๊ธฐ๋ฅผ ๋น„ํ™œ์„ฑํ™”ํ•˜๋ฉด URL http : // localhost : 9005๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค๊ณ  ํ‘œ์‹œ๋˜๋ฏ€๋กœ ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ํ”„๋ก์‹œ๊ฐ€ ์•„๋‹ˆ๋ผ ์ผ๋ถ€ ํฌํŠธ๊ฐ€ Windows ๋ฐฉํ™”๋ฒฝ์— ์˜ํ•ด ๋‹ซํž™๋‹ˆ๋‹ค .
    C : ์‚ฌ์šฉ์žAppDataRoamingnpmnode_modulesfirebase-toolslibapi.js

  5. ๋””๋ฒ„๊ทธ ์ •๋ณด
    https://i.imgur.com/lslydoN.png

์ตœ์‹  ์ •๋ณด. ๋กœ๊ทธ์ธ์ด ์ž‘๋™ํ•˜๋„๋กํ–ˆ์Šต๋‹ˆ๋‹ค.

1) Git Bash ๋˜๋Š” Linux์™€ ์œ ์‚ฌํ•œ ๋ช…๋ น ์ค„ ๋„๊ตฌ ์‹คํ–‰
2)์ด ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๊ณ  ๋Œ€์‹  ํ”„๋ก์‹œ๋กœ ๋Œ€์ฒดํ•˜์‹ญ์‹œ์˜ค.

export HTTP_PROXY = " http://proxy.XXXXXXXX.com : 80 /"
export HTTPS_PROXY = " http://proxy.XXXXXXXX.com : 80 /"

3)์ด ํ›„ ๋‚˜๋Š” ๋‹ค์Œ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋กœ๊ทธ์ธ ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.

firebase ๋กœ๊ทธ์ธ-๋Œ€ํ™” ํ˜•

4) ์œ ์šฉํ•œ ๋งํฌ

https://github.com/firebase/firebase-tools/issues/36#issuecomment -66696746
https://www.npmjs.com/package/request#controlling -proxy-behaviour-using-environment-variables

"firebase ๋ฐฐํฌ"์— ๊ด€ํ•ด์„œ๋Š” ์—ฌ์ „ํžˆ์ด ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ค๋ฅ˜๊ฐ€ ์—†์œผ๋ฉฐ ์ค‘๋‹จ๋ฉ๋‹ˆ๋‹ค.

ํ”„๋ก์‹œ ๋’ค์—์„œ ์‹คํ–‰ํ•˜๊ณ  ์žˆ์ง€ ์•Š์ง€๋งŒ์ด ๋ฌธ์ œ๊ฐ€ ๋‚˜ํƒ€๋‚ฉ๋‹ˆ๋‹ค. ์ฝ”๋“œ๋ฅผ ๋ฐฐํฌํ•˜๋Š” ๋™์•ˆ ๋‹ค์Œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
** ์˜ค๋ฅ˜ : ์„œ๋ฒ„ ์˜ค๋ฅ˜. ETIMEDOUT 172.217.31.202:443 ์—ฐ๊ฒฐ

๊ทธ๋ž˜์„œ "firebase login --reauth"๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ณ  ์˜ฌ๋ฐ”๋ฅธ ์ž๊ฒฉ ์ฆ๋ช…์„ ์ œ๊ณตํ–ˆ์ง€๋งŒ "firebase list"๋ฅผ ์‹คํ–‰ํ–ˆ์„ ๋•Œ ์„ฑ๊ณต์ ์œผ๋กœ ๋กœ๊ทธ์ธํ–ˆ์ง€๋งŒ ๋‹ค์Œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.
** ์˜ค๋ฅ˜ : ์ธ์ฆ ์˜ค๋ฅ˜ : ์ž๊ฒฉ ์ฆ๋ช…์ด ๋” ์ด์ƒ ์œ ํšจํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. firebase login --reauth๋ฅผ ์‹คํ–‰ํ•˜์„ธ์š”.

๊ทธ๋Ÿฐ ๋‹ค์Œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ž์Šต๋‹ˆ๋‹ค.
firebase ๋กœ๊ทธ ์•„์›ƒ
firebase ๋กœ๊ทธ์ธ-> ์„ฑ๊ณต์ ์ธ ๋กœ๊ทธ์ธ
firebase ๋ชฉ๋ก-> ๋‚ด ์•ฑ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
firebase deploy-> ์ฝ”๋“œ๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ๋ฐฐํฌ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ˜ธํ…” ์ธํ„ฐ๋„ท์—์„œ ์ผํ•  ๋•Œ ๋‚˜๋ฅผ ์œ„ํ•ด ์™”์Šต๋‹ˆ๋‹ค ...

๋‚ด ๋…ธํŠธ๋ถ โ€‹โ€‹์•ž์— ์•‰์•„ ๊ฐ™์€ ์˜ค๋ฅ˜์— ์ง๋ฉดํ•˜๊ณ  ๊ณ„์† ๋ฐ˜๋ณต๋ฉ๋‹ˆ๋‹ค.

์ €๋„ ๋งˆ์ฐฌ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค. ๊ฝค ์Šฌํ”ˆ ๋ฐฐํฌ๊ฐ€ ํ”„๋ก์‹œ ๋’ค์—์„œ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
Firebase ๋„๊ตฌ๋Š” ์—ฌ์ „ํžˆ ํ›Œ๋ฅญํ•ฉ๋‹ˆ๋‹ค.

SSH๋ฅผ ํ†ตํ•ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค.

VPS๊ฐ€ ์žˆ์œผ๋ฏ€๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ๋ณต์ œํ•˜๊ณ  Firebase์— ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค.
์ƒˆ ๊ธฐ๋Šฅ์„ ๋ฐฐํฌํ•ด์•ผํ•˜๋ฉด SSH๋ฅผ ํ†ตํ•ด ์›๊ฒฉ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ํ˜ธ์ถœํ•˜๋ฉด๋ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ๋ช‡ ๊ฐ€์ง€ ์Šคํฌ๋ฆฝํŠธ์ž…๋‹ˆ๋‹ค.

  • ๋กœ์ปฌ์—์„œ deployFunctionsRemote.sh

    #!/usr/bin/env bash
    
    # funDir point to your functions directory
    funDir=${PROJECT}/functions
    
    # Using rsync cmd to upload local changes to the remote project
    # Excluding node_modules directory is recommend
    cmdLine="rsync -avzPr --rsh='ssh -p ${REMOTE_PORT}' --exclude=node_modules ${funDir} ${REMOTE_USR}@${REMOTE_IP}:${REMOTE_PROJECT}"
    eval ${cmdLine}
    
    # Invoke remote deploy script
    remoteDeployScript=${REMOTE_PROJECT}/deployFunctions.sh
    ssh -p ${REMOTE_PORT} ${REMOTE_USR}@${REMOTE_IP} "${remoteDeployScript}"
    
  • ์›๊ฒฉ์˜ deployFunctions.sh

    #!/usr/bin/env bash
    firebase deploy --only functions
    

๊ฐ™์€ ๋ฌธ์ œ :(

์—ฌ๊ธฐ๋„ ๋งˆ์ฐฌ๊ฐ€์ง€
๋‚ด ๋ชจ๋ฐ”์ผ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ณต์œ ํ•˜์—ฌ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค ...

LOL, 2 ๋…„ ๋กœ๊ทธ์ธ์ด ์ž‘๋™ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

firebase login ๋•Œ firebase ๋„๊ตฌ์— ํ”„๋ก์‹œ ์˜ต์…˜์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

https://github.com/firebase/firebase-tools/issues/155#issuecomment -349345985

๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.
์ฝ˜์†”์„ ์—ด๊ณ  ํšŒ์‚ฌ์˜ ํ”„๋ก์‹œ ์˜ต์…˜์ด์žˆ๋Š” export ๋ณ€์ˆ˜๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
firebase login --no-localhost
๋ธŒ๋ผ์šฐ์ €๋ฅผ ์—ด๊ณ  Google์„ ํ†ตํ•ด ๋กœ๊ทธ์ธํ•˜๊ณ  ํ† ํฐ์„ ๋ณต์‚ฌํ•˜์—ฌ ์ฝ˜์†”์— ๋„ฃ์Šต๋‹ˆ๋‹ค.
๊ทธ๋ฆฌ๊ณ  ์ผ!)

ํ˜ธ์ŠคํŒ…์— ๋ฐฐํฌํ•˜๋Š” ๊ฒƒ์„ ์ œ์™ธํ•œ ๋ชจ๋“  ๊ฒƒ์€ ๋‹ค์Œ์„ ํ†ตํ•ด ํ”„๋ก์‹œ ๋’ค์—์„œ ์ž‘๋™ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •. ๊ทธ๋ ‡์ง€ ์•Š์€ ๊ฒฝ์šฐ
์ž์„ธํ•œ ๋ณด๊ณ ์„œ.

2018 ๋…„ 1 ์›” 28 ์ผ ์ผ์š”์ผ ์˜คํ›„ 12:54 Sergey S. Volkov [email protected]
์ผ๋‹ค :

155 (์ฝ”๋ฉ˜ํŠธ)

https://github.com/firebase/firebase-tools/issues/155#issuecomment-349345985

๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.
์ฝ˜์†”์„ ์—ด๊ณ  ๋‚ด ํšŒ์‚ฌ์˜ ํ”„๋ก์‹œ ์˜ต์…˜๊ณผ ํ•จ๊ป˜ ๋‚ด๋ณด๋‚ด๊ธฐ ๋ณ€์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์‹ญ์‹œ์˜ค.
๊ทธ๋ฆฌ๊ณ  firebase login --no-localhost๋ฅผ ์ž…๋ ฅํ•˜์‹ญ์‹œ์˜ค.
๋ธŒ๋ผ์šฐ์ €๋ฅผ ์—ด๊ณ  Google์„ ํ†ตํ•ด ๋กœ๊ทธ์ธํ•˜๊ณ  ํ† ํฐ์„ ๋ณต์‚ฌํ•˜์—ฌ ์ฝ˜์†”์— ๋„ฃ์Šต๋‹ˆ๋‹ค.
๊ทธ๋ฆฌ๊ณ  ์ผ!)

โ€”
๋‹น์‹ ์ด ์–ธ๊ธ‰ ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด๊ฒƒ์„ ๋ฐ›๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ด ์ด๋ฉ”์ผ์— ์ง์ ‘ ๋‹ต์žฅํ•˜๊ณ  GitHub์—์„œ ํ™•์ธํ•˜์„ธ์š”.
https://github.com/firebase/firebase-tools/issues/155#issuecomment-361095081 ,
๋˜๋Š” ์Šค๋ ˆ๋“œ ์Œ์†Œ๊ฑฐ
https://github.com/notifications/unsubscribe-auth/AAAD_kJ7g2hTyHtLlfnTUK3VCUxY046Iks5tPN6OgaJpZM4InPdh
.

HTTP_PROXY๋ฅผ ์„ค์ •ํ•˜๊ณ  ํ”„๋ก์‹œ URL์— ์ธ์ฆ์„ ์ œ๊ณตํ•˜๋ฉด ์„œ๋ฒ„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐ˜ํ™˜๋ฉ๋‹ˆ๋‹ค. ํ„ฐ๋„๋ง ์†Œ์ผ“์„ ์„ค์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. statusCode = 407 ์˜ค๋ฅ˜

์ข‹์•„, ๋‚ด๊ฐ€ ์ „์— ์„ค๋ช…ํ•œ @namiwang ๊ณผ ๊ฐ™์€ ๊ฒƒ์„ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ๋‚ด๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” ๋ฒ„์ „์— ๋Œ€ํ•œ ์ •๋ณด์ž…๋‹ˆ๋‹ค.
๋…ธ๋“œ : 7.5.0
npm : 4.1.2
firebase : 3.13.1

firebase-tools๋Š” ์ „์—ญ ์ ์œผ๋กœ ์„ค์น˜๋˜๋ฏ€๋กœ firebase-tools๊ฐ€ ์„ค์น˜๋œ ํ”„๋ก์‹œ ์„ค์ •์„ ์ˆ˜์ •ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
์ œ ๊ฒฝ์šฐ์—๋Š” ~ / .nvm / versions / node / v7.5.0 / lib / node_modules / firebase-tools

1) ~ / .nvm / versions / node / v7.5.0 / lib / node_modules / firebase-tools / node_modules / firebase / node_modules / faye-websocket / lib / faye / websocket / client.js ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค.

2) ๋ผ์ธ ์ˆ˜์ •

  options = options || {};
  this.url     = _url;

...์—

  options = options || {};
  options.proxy = {
    origin: 'http://user:[email protected]:3128',
    headers: {'User-Agent': 'node'},
  };
  this.url     = _url;

3) ํ”„๋กœ์ ํŠธ๋กœ ์ด๋™ ํ•œ ๋‹ค์Œ firebase ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ๋ฐฐํฌํ•ฉ๋‹ˆ๋‹ค.

cd ~/workspace/myProject/functions
firebase deploy --only functions

๋ฉ‹์žˆ๋Š”. ๊ทธ๋ž˜๋„ ์ด๋ ‡๊ฒŒ ํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”?

if (process.env.HTTP_SERVER) {
   options.proxy = {
      origin: process.env.HTTP_SERVER,
      headers: { 'User-Agent': 'node' }
   };
}

@namiwang ์—๊ฒŒ ๋„์›€์„ ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค ...

"๋ฐฐํฌ ์ค‘๋‹จ"์€ ์—ฌ์ „ํžˆ โ€‹โ€‹๋ฌธ์ œ์ด๋ฉฐ ํ”„๋ก์‹œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •์„ ์ˆ˜์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์ด์— ๋Œ€ํ•œ ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

๋ฐ›์•„ ๋“ค์ผ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. 2 ๋…„ ํ›„์—๋„์ด ๋ฌธ์ œ๋Š” ์—ฌ์ „ํžˆ ํ•ด๊ฒฐ๋˜์ง€ ์•Š์Šต๋‹ˆ๊นŒ? wth?

@LastStranger https://github.com/firebase/firebase-tools/issues/155#issuecomment -349345985

ํ•˜์ง€๋งŒ firebase login --no-localhost no-localhost ํ”Œ๋ž˜๊ทธ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

@ js2me export HTTPS_PROXY = " http://proxy.XXXXXXXX.com : 80 /"๏ผŸ๏ผŸ๏ผŸ powershell๊ณผ cmd์—์„œ ์ด๊ฒƒ์„ ์‹คํ–‰ํ•˜๋ ค๊ณ ํ–ˆ์ง€๋งŒ "export"๋ฅผ ๋‹ค์‹œ ์‚ฌ์šฉํ•  ์ˆ˜์—†๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

@LastStranger ํ , ์ด์ƒํ•ฉ๋‹ˆ๋‹ค. git bash์—์„œ ์ด๊ฒƒ์„ ์‹œ๋„ํ•ฉ๋‹ˆ๊นŒ?

Windows์—์„œ NODE_TLS_REJECT_UNAUTHORIZED=0 ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

๋‚ด๋ถ€์—์„œ ์ผํ•˜๊ณ  GFW ์™ธ๋ถ€์—์„œ ์‚ด๊ณ  ์‹ถ์€ ์‚ฌ๋žŒ์„ ์œ„ํ•ด ๋‚ด ์†”๋ฃจ์…˜์„ ๊ณต์œ ํ•˜์‹ญ์‹œ์˜ค.

ํ™˜๊ฒฝ : shadowsocks-ng๊ฐ€์žˆ๋Š” MacOS

~ / .bash_profile

alias cbrew="ALL_PROXY=socks5://127.0.0.1:1086 brew"

# using polipo
alias cfirebase="http_proxy=http://127.0.0.1:8123 firebase"

# your shadowsocks may already have http proxy feature
alias cfirebase="http_proxy=http://127.0.0.1:1087 firebase"

polipo http ํ”„๋ก์‹œ ์„ค์ • (์„ ํƒ ์‚ฌํ•ญ)

cbrew install polipo
polipo socksParentProxy=localhost:1086 &

๋กœ๊ทธ์ธ

cfirebase login --debug

ํด๋ฆฌ ํ•„ ํŽ˜์ด ์›น ์†Œ์ผ“

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค @namiwang ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

firebase sdk 2.xx๊ฐ€ ์ถ•์†Œ ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— polyfill faye-websocket์ด sdk๋ฅผ ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ์‰ฝ์Šต๋‹ˆ๋‹ค.

// if you installed node by brew, the path would be /usr/local/lib/node_modules/firebase-tools/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/client.js
...
var proxy_uri = process.env.http_proxy
if (proxy_uri) {
  options.proxy = { origin: proxy_uri }
}
...

์ „๊ฐœ

cfirebase deploy --only functions --debug

์‹ค์ œ๋กœ ์ตœ์‹  firebase sdk๋Š” ์ด๋ฏธ ๋ฒ„๊ทธ๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. firebase-tools๊ฐ€ ํ˜„์žฌ๊นŒ์ง€ deps๋ฅผ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์ค‘ ...

2018 ๋…„์ด์ง€๋งŒ ์•„์ง ๊ณ ์ณ์ง€์ง€ ์•Š๊ณ  ์œ ์ง€ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ž…๋‹ˆ๋‹ค.

์ž‘๋™ํ•˜์ง€

๋ถˆํŽธํ•˜๊ณ  ์•„์ง ํ•ด๊ฒฐ๋˜์ง€ ์•Š์•˜๋Š”๋ฐ-?

์•ˆ๋…•ํ•˜์„ธ์š”.

๋‚ด ๋ชจ๋ฐ”์ผ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ณต์œ ํ•˜์—ฌ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค ...

์ด๊ฒƒ์€ ๋˜ํ•œ "๋ฐฐํฌ ๊ธฐ๋Šฅ"๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

Google์€ Google์ž…๋‹ˆ๋‹ค. ํ•ด๊ฒฐ๋˜์ง€ ์•Š์„ ๋˜ ๋‹ค๋ฅธ ์ค‘์š”ํ•œ ๋ฒ„๊ทธ์ž…๋‹ˆ๋‹ค.

์ค‘๊ตญ์–ด๋กœ Google์— ์•ก์„ธ์Šคํ•ด์•ผํ•˜๋Š” ๊ฒฝ์šฐ ํ”„๋ก์‹œ๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค !!! GWF๋กœ ์ธํ•ด

ํ•œ ๊ฐ€์ง€ ํ•ด๊ฒฐ์ฑ…์€ ๋‹ค๋ฅธ ๊ตญ๊ฐ€๋กœ ์ด๋™ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค ๐Ÿ’ƒ

์ด๊ฒƒ์€ CI ๋ฐฐํฌ์—๋„ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.

๊ทธ๋ž˜์„œ ํŒŒ์ด์–ด๋ฒ ์ด์Šค ์‚ฌ์šฉ์„ ํฌ๊ธฐํ•ด์•ผํ•˜๋‚˜์š”? ์ค‘๊ตญ์—์„œ๋Š” ํ”„๋ก์‹œ๊ฐ€ ์—†์œผ๋ฉด Google์—์„œ๋„ ๊ฒ€์ƒ‰ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ํฌ๋ฆฌ์Šคํƒˆ ์ผ€์ดํฌ๋ฅผ ๋ณธ ๊ฒƒ์ฒ˜๋Ÿผ ๋จน์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์ผ๋ถ€ ์ธํ”„๋ผ๊ฐ€ ์ž‘๋™ ํ•  ๋•Œ์ด ๋ฌธ์ œ์— ๋Œ€ํ•ด ์ข‹์€ ์†Œ์‹์„ ์ „ํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค
์šฐ๋ฆฌ๋Š” ์ง€๊ธˆํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ œ๊ณต ํ•  ๊ตฌ์ฒด์ ์ธ ์ผ์ •์ด ์—†์Šต๋‹ˆ๋‹ค.
ํ•˜๋‚˜.

์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐ ์˜ค๋žœ ์‹œ๊ฐ„์ด ์ง€์—ฐ๋˜์–ด ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค.
์ƒ๊ฐ๋ณด๋‹ค ๋ณต์žกํ•ฉ๋‹ˆ๋‹ค.

2018 ๋…„ 6 ์›” 29 ์ผ ๊ธˆ์š”์ผ ์˜ค์ „ 1:12 noobhui [email protected] ์ž‘์„ฑ :

๊ทธ๋ž˜์„œ ํŒŒ์ด์–ด๋ฒ ์ด์Šค ์‚ฌ์šฉ์„ ํฌ๊ธฐํ•ด์•ผํ•˜๋‚˜์š”? ์ค‘๊ตญ์—์„œ๋Š” ํ”„๋ก์‹œ ์—†์ด๋Š” ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค
Google์—์„œ๋„ ๊ฒ€์ƒ‰ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํฌ๋ฆฌ์Šคํƒˆ ์ผ€์ดํฌ๋ฅผ ๋ณธ ๊ฒƒ์ฒ˜๋Ÿผ ๋จน์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

โ€”
๋‹น์‹ ์ด ์–ธ๊ธ‰ ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด๊ฒƒ์„ ๋ฐ›๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ด ์ด๋ฉ”์ผ์— ์ง์ ‘ ๋‹ต์žฅํ•˜๊ณ  GitHub์—์„œ ํ™•์ธํ•˜์„ธ์š”.
https://github.com/firebase/firebase-tools/issues/155#issuecomment-401282471 ,
๋˜๋Š” ์Šค๋ ˆ๋“œ ์Œ์†Œ๊ฑฐ
https://github.com/notifications/unsubscribe-auth/AAAD_hDs8s1zUkv3-8QFYSxcvCFrNFs2ks5uBeFagaJpZM4InPdh
.

๋‚ด๊ฐ€ ์•„๋Š” ํ•œ, a patched firebase sdk v2 ๋งŒ ํ•„์š”ํ•˜๋ฉฐ env.http_proxy๋ฅผ ๋ชจ๋“ˆ faye-websocket ๋˜๋Š” up sdk to date (v4) ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์šฐ๋ฆฌ๊ฐ€ ์ƒ๊ฐํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ํ›จ์”ฌ ๋” ๋ณต์žกํ•œ ์ด์œ ๋ฅผ ์•Œ๋ ค์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?
์šฐ๋ฆฌ๊ฐ€ ๋„์šธ ์ˆ˜์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๊ฐ์‚ฌ.

Windows์—์„œ ๋ฌธ์ œ๊ฐ€์žˆ๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•ด : ์ด ์ฃผ์„์€ Linux์—์„œ ์ž‘๋™ํ•˜์ง€๋งŒ ( export ์€ Linux ๋ช…๋ น์ž…๋‹ˆ๋‹ค) Windows์—์„œ ์ž‘๋™ํ•˜๋„๋ก ๊ด€๋ฆฌ ํ•  ์ˆ˜ โ€‹โ€‹์žˆ์Šต๋‹ˆ๋‹ค.

๊ฐ„๋‹จํ•œ ์ฝ˜์†” ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์ธ Cmder ๋ฅผ ์„ค์น˜ํ•˜์—ฌ ์‹œ์ž‘ํ•˜์‹ญ์‹œ์˜ค. ๋‹ค์Œ์œผ๋กœ bash ์…ธ์„ ์‹คํ–‰ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค (powershell์ด โ€‹โ€‹์•„๋‹ˆ๋ผ cmd ์…ธ, bash ์…ธ).

bash ์…ธ์ด ๋งŒ๋“ค์–ด์ง€๋ฉด ์‹ค์ œ๋กœ ๋‹ค์Œ ๋‘ ๋ช…๋ น์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

export HTTP_PROXY="your proxy"
export HTTPS_PROXY="your proxy"

Windows ํ”„๋ก์‹œ๋ฅผ ์„ค์ •ํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค (์–ด๋–ป๊ฒŒํ–ˆ๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ๋˜๋Š” ์ธํ„ฐ๋„ท ์˜ต์…˜์—์„œ ๋ฌด์—‡์„ํ–ˆ๋Š”์ง€ ์ฐพ์ง€ ๋ชปํ•œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค). ์ด๋กœ๋ถ€ํ„ฐ ๋” ์ด์ƒ ๋ฌธ์ œ์—†์ด firebase login firebase๋ฅผ ๊ฐ„๋‹จํžˆ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š”์ด ๋ฌธ์ œ์˜ ๋ชจ๋“  ์†”๋ฃจ์…˜์„ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค (๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ˆ˜์ •์„ ์ œ์™ธํ•˜๊ณ  ๋‚˜๋Š” ์•ผ๋งŒ์ธ์ด ์•„๋‹™๋‹ˆ๋‹ค : D). ์ด๊ฒƒ์ด ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ•œ ์œ ์ผํ•œ ์†”๋ฃจ์…˜์ž…๋‹ˆ๋‹ค. ์ด๊ฒŒ ๋„์›€์ด ๋˜๊ธธ ๋ฐ”๋ž€๋‹ค !

๊ฐ™์€ ๋ฌธ์ œ์— ์ง๋ฉด ... Google์€ ์–ธ์ œ ์ด๊ฒƒ์„ ํ•ด๊ฒฐํ•  ๊ฒƒ์ž…๋‹ˆ๊นŒ?

๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. firebase login ๋กœ Firebase -CLI์— ๋กœ๊ทธ์ธ ํ•œ ๋‹ค์Œ ์ ์ ˆํ•œ ํ”„๋กœ์ ํŠธ๋ฅผ ์„ ํƒํ•˜๊ธฐ ์œ„ํ•ด ๋ช…๋ น ์ค„์—์„œ firebase use --add ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๊ณ ํ•˜๋Š”๋ฐ์ด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

์˜ค๋ฅ˜ : ์„œ๋ฒ„ ์˜ค๋ฅ˜์ž…๋‹ˆ๋‹ค. ETIMEDOUT 104.197.85.31:443 ์—ฐ๊ฒฐ

์ด ์˜ค๋ฅ˜๋กœ ํ™”๋ฅผ๋ƒ…๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ ์ข€ ๊ณ ์น  ์ˆ˜์žˆ์„ ๋•Œ. firebase๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ์™„๋ฃŒ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋‚˜์—๊ฒŒ๋„ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋งŽ์€ ์†”๋ฃจ์…˜์„ ์‹œ๋„ํ–ˆ์ง€๋งŒ firebase๊ฐ€ ํ”„๋ก์‹œ๋ฅผ ์ฒ˜๋ฆฌ ํ•  ์ˆ˜ โ€‹โ€‹์—†๋‹ค๋Š” ๊ฒƒ์„ ๋ฏฟ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

1 ๋…„ ํ›„์—๋„ ์—ฌ์ „ํžˆ ๋™์ผํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ๋ˆ„๊ฐ€ ์ค‘๊ตญ ๋ฐฉํ™”๋ฒฝ์ด๋‚˜ Google Firebase๋ฅผ ๋น„๋‚œํ• ๊นŒ์š” ..,

`? Firebase๊ฐ€ ์ต๋ช…์˜ CLI ์‚ฌ์šฉ ๋ฐ ์˜ค๋ฅ˜๋ณด๊ณ  ์ •๋ณด๋ฅผ ์ˆ˜์ง‘ํ•˜๋„๋ก ํ—ˆ์šฉ ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? (์˜ˆ / ์•„๋‹ˆ์š”)

PS C : Usersmurugan_nagarajan> firebase ๋กœ๊ทธ์ธ --debug
[2018-08-10T07 : 22 : 00.621Z] -------------------------------------- --------------------------------
[2018-08-10T07 : 22 : 00.626Z] ๋ช…๋ น : C : Program Filesnodejsnode.exe C : Usersmurugan_nagarajanAppDataRoamingnpmnode_modulesfirebase-toolsbinfirebase login --debug
[2018-08-10T07 : 22 : 00.627Z] CLI ๋ฒ„์ „ : 4.0.3
[2018-08-10T07 : 22 : 00.627Z] ํ”Œ๋žซํผ : win32
[2018-08-10T07 : 22 : 00.627Z] ๋…ธ๋“œ ๋ฒ„์ „ : v10.8.0
[2018-08-10T07 : 22 : 00.629Z] ์‹œ๊ฐ„ : 2018 ๋…„ 8 ์›” 10 ์ผ ๊ธˆ์š”์ผ 15:22:00 GMT + 0800 (์ค‘๊ตญ ํ‘œ์ค€์‹œ)
[2018-08-10T07 : 22 : 00.630Z] -------------------------------------- --------------------------------

? Firebase๊ฐ€ ์ต๋ช…์˜ CLI ์‚ฌ์šฉ ๋ฐ ์˜ค๋ฅ˜๋ณด๊ณ  ์ •๋ณด๋ฅผ ์ˆ˜์ง‘ํ•˜๋„๋ก ํ—ˆ์šฉ ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ์•„๋‹ˆ

๋กœ๊ทธ์ธํ•˜๋ ค๋ฉด ๊ธฐ๊ธฐ์—์„œ ๋‹ค์Œ URL์„ ๋ฐฉ๋ฌธํ•˜์„ธ์š”.
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcl
oudplatformprojects.readonly % 20https % 3A % 2F % 2F www.googleapis.com % 2Fauth % 2Ffirebase % 20https % 3A % 2F % 2Fwww.googleapis.com % 2Fauth % 2Fcloud-platform & response_type = code & state = 452226808 & redirect_uri = htt
p % 3A % 2F % 2Flocalhost % 3A9005

์ธ์ฆ ๋Œ€๊ธฐ ์ค‘ ...
[2018-08-10T07 : 22 : 48.312Z] >>> HTTP ์š”์ฒญ ๊ฒŒ์‹œ https://accounts.google.com/o/oauth2/token
{์ฝ”๋“œ :
'4 / NwD80jRUIDzAwBxmuqqIQxaOPyLfiOUL1Yx5eKGKzqtnfk88q4anmyxTozeLKQEE9DOxPuMklrrc42teX491Kuw',
client_id :
'563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
client_secret : 'j9iVZfS8kkCEFUPaAeJV0sAi',
redirect_uri : ' http : // localhost : 9005',
grant_type : '์ธ์ฆ ์ฝ”๋“œ'}
2018 ๋…„ 8 ์›” 10 ์ผ ๊ธˆ์š”์ผ 15:22:48 GMT + 0800 (์ค‘๊ตญ ํ‘œ์ค€์‹œ)
[2018-08-10T07 : 22 : 48.455Z] ํ† ํฐ ๊ฐ€์ ธ ์˜ค๊ธฐ ์˜ค๋ฅ˜ : ์˜ค๋ฅ˜
์ƒˆ๋กœ์šด FirebaseError (C : Usersmurugan_nagarajanAppDataRoamingnpmnode_modulesfirebase-toolsliberror.js : 11 : 16)
Request._callback์—์„œ (C : Usersmurugan_nagarajanAppDataRoamingnpmnode_modulesfirebase-toolslibapi.js : 35 : 11)
self.callback (C : Usersmurugan_nagarajanAppDataRoamingnpmnode_modulesfirebase-toolsnode_modulesrequestrequest.js : 185 : 22)
Request.emit (events.js : 182 : 13)
Request.EventEmitter.emit (domain.js : 442 : 20)
Request.onRequestError (C : Usersmurugan_nagarajanAppDataRoamingnpmnode_modulesfirebase-toolsnode_modulesrequestrequest.js : 877 : 8)
ClientRequest.emit (events.js : 182 : 13)
ClientRequest.EventEmitter.emit (domain.js : 442 : 20)
TLSSocket.socketErrorListener (_http_client.js : 382 : 9)
TLSSocket.emit (events.js : 182 : 13)
^ C ๋ฐฐ์น˜ ์ž‘์—…์„ ์ข…๋ฃŒ ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ (Y / N)?`

์—ฌ๋Ÿฌ๋ถ„, ์ด์ œ์ด ๋ฒ„๊ทธ๋ฅผ ์™„์ „ํžˆ ๊ณ ์น  ์‹œ๊ฐ„์ž…๋‹ˆ๋‹ค! v4.1.0 ์˜ ์ถœ์‹œ๋กœ Firebase CLI๋Š” ๋” ์ด์ƒ ํ˜ธ์ŠคํŒ… ๋ฐฐํฌ๋ฅผ์œ„ํ•œ ์›น ์†Œ์ผ“ ์—ฐ๊ฒฐ์— ์˜์กดํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ๊ฒƒ์„ ์‰ฝ๊ฒŒ ํ”„๋ก์‹œ์™€ ํ•จ๊ป˜ ์ž‘๋™ํ•˜๋„๋ก ํ•  ์ˆ˜์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค ํ‘œ์ค€ HTTP ์š”์ฒญ์„ ํ†ตํ•ด ์ˆ˜ํ–‰๋˜๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•œ๋‹ค.

์ด ์ž‘์—…์„ ์ง์ ‘ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ๋กœ์ปฌ์—์„œ ํ…Œ์ŠคํŠธ ํ”„๋ก์‹œ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๊ณ ํ•˜์ง€๋งŒ ์˜ํ–ฅ์„๋ฐ›๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•ด :

  1. v4.1.0 "๊ทธ๋ƒฅ ์ž‘๋™"ํ•˜๊ฑฐ๋‚˜ ์—ฌ์ „ํžˆ ์˜ค๋ฅ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ?
  2. HTTPS_PROXY ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •์ด ํšจ๊ณผ๊ฐ€ ์žˆ์Šต๋‹ˆ๊นŒ?

๊ธด ์—ฌ์ •์ด์—ˆ๋˜ ๊ฑด ์•Œ์ง€๋งŒ (๋‚˜๋Š”) ๊ณง ๋๋‚  ๊ฒƒ์ž…๋‹ˆ๋‹ค. 4.1.0์— ๋Œ€ํ•œ ๊ท€ํ•˜์˜ ๊ฒฝํ—˜์„๋ณด๊ณ  ํ•ด ์ฃผ์‹œ๋ฉด ๋‚˜๋จธ์ง€ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•ด ๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค!

@mbleigh ๋‚˜๋Š” ๊ทธ๊ฒƒ์ด ํ•จ๊ป˜ ์ž˜ ์ž‘๋™ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค HTTPS_PROXY ์„ค์ • 4.1.0 . ๐Ÿ‘

์—…๋ฐ์ดํŠธ : ์–ด์ œ ๋‚˜๋„ ๋ฉˆ์ท„๋‹ค. --debug ํ™œ์„ฑํ™” ๋œ ์ƒํƒœ์—์„œ ์—ฌ๊ธฐ์— ๊ณ ์ • ๋œ ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

[2018-08-17T15:50:53.061Z] <<< HTTP RESPONSE 200 server=nginx, date=Fri, 17 Aug 2018 15:50:52 GMT, content-type=application/json; charset=utf-8, content-length=255, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store

4.1.2 ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ์ด์ œ ๋ชจ๋“  ๊ฒƒ์ด ๊ดœ์ฐฎ์•„ ๋ณด์ž…๋‹ˆ๋‹ค.

v4.1.0์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๊ณ  HTTPS_PROXY๋„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
firebase ๋กœ๊ทธ์ธ, ๋กœ๊ทธ ์•„์›ƒ, ๋ชฉ๋ก์€ ์ž˜ ์ž‘๋™ํ•˜์ง€๋งŒ ํ† ํฐ์„ ๊ฐ€์ ธ์˜จ ํ›„์—๋„ ๋ฐฐํฌ๊ฐ€ ๊ณ„์† ์ค‘๋‹จ๋ฉ๋‹ˆ๋‹ค.

v4.1.0์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๊ณ  HTTP_PROXY ๋กœ๊ทธ์ธ์„ ์„ค์ •ํ•˜๋ฉด ์ž‘๋™ํ•˜์ง€๋งŒ firebase ๋ฐฐํฌ์—์„œ ๋ฉˆ์ถค

๋ณด๊ณ ์„œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์€ --debug ๋กœ ์‹คํ–‰๋˜๋Š” ๋””๋ฒ„๊ทธ ๋กœ๊ทธ์˜ ๋งˆ์ง€๋ง‰ ๋ช‡ ์ค„ ( ์ธ์ฆ ํ† ํฐ ์ƒ๋žต )๊ณผ ์‹คํ–‰์ค‘์ธ ํ”„๋ก์‹œ ์œ ํ˜• (์•Œ๊ณ ์žˆ๋Š” ๊ฒฝ์šฐ)์„ ํฌํ•จ ํ•ด ์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ).

firebase deploy ํ”„๋ก์‹œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜์žˆ๋Š” ๋ช‡ ๊ฐ€์ง€ ์ถ”๊ฐ€ ์—…๋ฐ์ดํŠธ๊ฐ€ v4.1.2 ์— ์ ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์‹œ๋„ํ•ด๋ณด๊ณ  ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ์•Œ๋ ค์ฃผ์„ธ์š”!

@mbleigh firebase ๋ช…๋ น์€ ์–ด๋–ค ํ”„๋ก์‹œ ์œ ํ˜•์„ ์ง€์›ํ•ฉ๋‹ˆ๊นŒ? ์˜ˆ๋ฅผ ๋“ค์–ด gcloud ๋ช…๋ น์€ http, http_no_tunnel, socks4, socks5 ํ”„๋ก์‹œ ์œ ํ˜•์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ๋‚ด ํ…Œ์ŠคํŠธ์—์„œ ์ตœ์‹  ๋ฒ„์ „์˜ firebase๋Š” ์—ฌ์ „ํžˆ socks5๋ฅผ ์ง€์›ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

Firebase๋Š” request ๋ฅผ http ํด๋ผ์ด์–ธํŠธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋กœ ์‚ฌ์šฉํ•˜๋‚˜์š”? http / https ํ”„๋ก์‹œ ์œ ํ˜•์„ ์ง€์›ํ•˜์ง€๋งŒ socks5์™€ ๊ฐ™์€ ๋‹ค๋ฅธ ์œ ํ˜•์„ ์ง€์›ํ•˜๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค.

Firebase v4.2.0 ์—์„œ connent ์„œ๋ฒ„์— ํ”„๋ก์‹œ ์„œ๋ฒ„๋ฅผ ์ถ”๊ฐ€ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŽธ์ง‘ request.js ์—์„œ ์ฐพ์„ ์ˆ˜์žˆ๋Š” $NODE_PATH/node_modules/request/request.js:290

// line 290 to 298
 // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = 'http://127.0.0.1:1087'    // add proxy server
  self.tunnel = self._tunnel.isEnabled()

  if (self.proxy) {
    self._tunnel.setup(options)
  }

๋”ฐ๋ผ์„œ ๋กœ๊ทธ์ธ์ด ์„ฑ๊ณตํ–ˆ์Šต๋‹ˆ๋‹ค! ๐Ÿ˜ƒ


๋กœ๊ทธ์ธ ์„ฑ๊ณต ํ›„ ํ”„๋ก์‹œ ์„œ๋ฒ„ ์„ค์ •์„ ์‚ญ์ œํ•˜๋Š” ๊ฒƒ์„ ์žŠ์ง€ ๋งˆ์‹ญ์‹œ์˜ค.

@ chen86860 ์•„๋‹ˆ์š”, ์ง€๊ธˆ์€ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์ง€ ์•Š๊ณ  ํ™˜๊ฒฝ์—์„œ ํ”„๋ก์‹œ๋ฅผ ๋‚ด ๋ณด๋ƒ…๋‹ˆ๋‹ค.

$ export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;

@hanguokai๋Š” ํ˜„์žฌ http_proxy ๋ฐ https_proxy ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค (๋‹ค๋ฅธ ๊ฒƒ์€ ์—†์Œ). socks4 socks5 ์€ ์•„๋งˆ๋„ ๋‹ค๋ฅธ ๊ธฐ๋Šฅ ์š”์ฒญ์œผ๋กœ ์ง„ํ–‰๋˜์–ด์•ผํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ๋ถ€๋‹ด์—†์ด ์‹ ์ฒญํ•˜์‹ญ์‹œ์˜ค!

์ข‹์Šต๋‹ˆ๋‹ค. socks ํ”„๋ก์‹œ ์ง€์›์— ๋Œ€ํ•œ ๋˜ ๋‹ค๋ฅธ ๋ฌธ์ œ # 883์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

์ผ๋ถ€ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ socks ํ”„๋ก์‹œ์— ๋Œ€ํ•œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋„ ์ง€์›ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
export http_proxy=socks5://127.0.0.1:1080 https_proxy=socks5://127.0.0.1:1080

firebase ๋ช…๋ น๋„ ์ง€์›ํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š”,
๋‚ด ํ™˜๊ฒฝ์—์„œ์ด ๋ฒ„๊ทธ๊ฐ€ v4.1.2 ์ˆ˜์ •๋˜์—ˆ์Œ์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

์ข‹์•„์š” ์—ฌ๋Ÿฌ๋ถ„, ์—ฌ๊ธฐ ์šฐ๋ฆฌ๊ฐ€์žˆ๋Š” ๊ณณ์ž…๋‹ˆ๋‹ค :

์ด์ œ ์˜ฌ๋ฐ”๋ฅธ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•˜์—ฌ HTTP ๋ฐ HTTPS ํ”„๋ก์‹œ๋ฅผ ์ง€์› ํ•œ๋‹ค๊ณ  ์ƒ๊ฐ ํ•ฉ๋‹ˆ๋‹ค. ์ตœ๊ทผ ๋ฆด๋ฆฌ์Šค์—์„œ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ๋‹ค๋Š” ํ”ผ๋“œ๋ฐฑ์„ ๋ฐ”ํƒ•์œผ๋กœ์ด ๋ฌธ์ œ๋ฅผ ์ข…๋ฃŒํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

์–‘๋ง ํ”„๋ก์‹œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ # 883์— ๋Œ€ํ•œ ์ฐฌ์„ฑ ํˆฌํ‘œ๋ฅผ ๋‚จ๊ฒจ์ฃผ์„ธ์š”. HTTP / S ํ”„๋ก์‹œ์—์„œ ์—ฌ์ „ํžˆ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  HTTP_PROXY ๋ฐ HTTPS_PROXY ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ • ํ•œ ๊ฒฝ์šฐ ์ œ๊ณต ํ•  ์ˆ˜์žˆ๋Š” ํ•œ ์ž์„ธํžˆ์ด ์Šค๋ ˆ๋“œ์— ์ฃผ์„์„ ๋‹ฌ์•„์ฃผ์„ธ์š”.

@chenxsan ์˜ค,

firebase ๋กœ๊ทธ์ธ --no-localhost

์ด ๋ช…๋ น์€ ํ”„๋ก์‹œ ๋’ค์—์„œ ๋‚˜๋ฅผ ์œ„ํ•ด ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

Firebase v4.2.0 ์—์„œ connent ์„œ๋ฒ„์— ํ”„๋ก์‹œ ์„œ๋ฒ„๋ฅผ ์ถ”๊ฐ€ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŽธ์ง‘ request.js ์—์„œ ์ฐพ์„ ์ˆ˜์žˆ๋Š” $NODE_PATH/node_modules/request/request.js:290

// line 290 to 298
 // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = 'http://127.0.0.1:1087'    // add proxy server
  self.tunnel = self._tunnel.isEnabled()

  if (self.proxy) {
    self._tunnel.setup(options)
  }

๋”ฐ๋ผ์„œ ๋กœ๊ทธ์ธ์ด ์„ฑ๊ณตํ–ˆ์Šต๋‹ˆ๋‹ค! ๐Ÿ˜ƒ

๋กœ๊ทธ์ธ ์„ฑ๊ณต ํ›„ ํ”„๋ก์‹œ ์„œ๋ฒ„ ์„ค์ •์„ ์‚ญ์ œํ•˜๋Š” ๊ฒƒ์„ ์žŠ์ง€ ๋งˆ์‹ญ์‹œ์˜ค.

ํฐ!!!

@ chen86860 ์•„๋‹ˆ์š”, ์ง€๊ธˆ์€ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์ง€ ์•Š๊ณ  ํ™˜๊ฒฝ์—์„œ ํ”„๋ก์‹œ๋ฅผ ๋‚ด ๋ณด๋ƒ…๋‹ˆ๋‹ค.

$ export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;

ํ„ฐ๋ฏธ๋„์—์„œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ๋™์ผํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
yongjiamingdeMacBook- Pro : firebase yongjiaming $ firebase ๋กœ๊ทธ์ธ --debug
[2018-09-18T03 : 33 : 08.860Z] -------------------------------------- --------------------------------
[2018-09-18T03 : 33 : 08.863Z] ๋ช…๋ น : /usr/local/Cellar/node/9.6.1/bin/node / usr / local / bin / firebase login --debug
[2018-09-18T03 : 33 : 08.864Z] CLI ๋ฒ„์ „ : 4.2.1
[2018-09-18T03 : 33 : 08.864Z] ํ”Œ๋žซํผ : darwin
[2018-09-18T03 : 33 : 08.864Z] ๋…ธ๋“œ ๋ฒ„์ „ : v9.6.1
[2018-09-18T03 : 33 : 08.864Z] ์‹œ๊ฐ„ : 2018 ๋…„ 9 ์›” 18 ์ผ ํ™”์š”์ผ 11:33:08 GMT + 0800 (CST)
[2018-09-18T03 : 33 : 08.864Z] -------------------------------------- --------------------------------

? Firebase๊ฐ€ ์ต๋ช…์˜ CLI ์‚ฌ์šฉ ๋ฐ ์˜ค๋ฅ˜๋ณด๊ณ  ์ •๋ณด๋ฅผ ์ˆ˜์ง‘ํ•˜๋„๋ก ํ—ˆ์šฉ ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ์˜ˆ

๋กœ๊ทธ์ธํ•˜๋ ค๋ฉด ๊ธฐ๊ธฐ์—์„œ ๋‹ค์Œ URL์„ ๋ฐฉ๋ฌธํ•˜์„ธ์š”.
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%2Fcloudplatformprojects.readonly 20https % 3A % 2F % 2Fwww.googleapis.com % 2Fauth % 2Ffirebase % 20https % 3A % 2F % 2Fwww.googleapis.com % 2Fauth % 2Fcloud-platform & response_type = code & state = 971322293 & redirect_uri = http % 3A % 2F % 2Flocalhost % 3A9005

์ธ์ฆ ๋Œ€๊ธฐ ์ค‘ ...
[2018-09-18T03 : 33 : 16.437Z] >>> HTTP ์š”์ฒญ ๊ฒŒ์‹œ https://accounts.google.com/o/oauth2/token
์ฝ”๋“œ = 4 / XgBxvL5SXC-Wg5vT8CCTdfLIoTPKVkCOFcmVku25RwRlkLUc-inqxg6mPRNX7JKRA8fWufJEm-7e5BKTbfFCmsk, CLIENT_ID = 563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com, client_secret = j9iVZfS8kkCEFUPaAeJV0sAi, redirect_uri๋กœ = ์— http : // localhost๋ฅผ : 9005, grant_type = authorization_code
[2018-09-18T03 : 33 : 16.454Z] ํ† ํฐ ๊ฐ€์ ธ ์˜ค๊ธฐ ์˜ค๋ฅ˜ : ์˜ค๋ฅ˜
์ƒˆ๋กœ์šด FirebaseError (/usr/local/lib/node_modules/firebase-tools/lib/error.js:11:16)
Request._callback (/usr/local/lib/node_modules/firebase-tools/lib/api.js:34:11)
self.callback์—์„œ (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
Request.emit (events.js : 127 : 13)
Request.emit (domain.js : 421 : 20)
Request.onRequestError (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:881:8)
ClientRequest.emit (events.js : 127 : 13)
ClientRequest.emit (domain.js : 421 : 20)
ClientRequest.onError (/usr/local/lib/node_modules/firebase-tools/node_modules/tunnel-agent/index.js:179:21)
Object.onceWrapper (events.js : 219 : 13)
^ Z
[1] + firebase ๋กœ๊ทธ์ธ ์ค‘์ง€ --debug

ํ”„๋ก์‹œ ๋’ค์—์„œ ๋‚ด ํ”„๋กœ์ ํŠธ๋ฅผ firebase์— ๋ฐฐํฌํ•˜๋Š” ๋ฐ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
๋กœ๊ทธ์ธ์€ ๋ฌธ์ œ์—†์ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

http_proxy ๋ฐ https_proxy๊ฐ€ cntlm์œผ๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.
๋‚ด๊ฐ€ ์‹œ๋„ํ•œ ๋ช…๋ น์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

firebase deploy -P <projectname> --token <token> --debug
firebase deploy -P <projectname> --debug

๋‹ค์Œ์€ ์ถœ๋ ฅ์ž…๋‹ˆ๋‹ค.

firebase deploy -P prod --debug
[2018-09-20T09:42:15.911Z] ----------------------------------------------------------------------
[2018-09-20T09:42:15.926Z] Command:       C:\Program Files\nodejs\node.exe C:\Users\<user>\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase deploy -P prod --debug
[2018-09-20T09:42:15.942Z] CLI Version:   4.2.1
[2018-09-20T09:42:15.942Z] Platform:      win32
[2018-09-20T09:42:15.942Z] Node Version:  v8.11.3
[2018-09-20T09:42:15.942Z] Time:          Thu Sep 20 2018 11:42:15 GMT+0200 (Mitteleuropรคische Sommerzeit)
[2018-09-20T09:42:15.942Z] ----------------------------------------------------------------------

[2018-09-20T09:42:15.973Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2018-09-20T09:42:15.975Z] > authorizing via signed-in user
[2018-09-20T09:42:15.978Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[2018-09-20T09:42:15.979Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
 refresh_token=<token>, client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com, client_secret=j9iVZfS8kkCEFUPaAeJV0sAi, grant_type=refresh_token, scope=email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid
[2018-09-20T09:42:16.321Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=utf-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Thu, 20 Sep 2018 09:42:16 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="44,43,39,35", accept-ranges=none, connection=close
[2018-09-20T09:42:16.332Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/<project>


!  Your CLI authentication needs to be updated to take advantage of new features.
!  Please run firebase login --reauth

[2018-09-20T09:42:16.485Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
[2018-09-20T09:42:16.485Z] > authorizing via signed-in user
[2018-09-20T09:42:16.485Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[2018-09-20T09:42:16.485Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
 refresh_token=<token>, client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com, client_secret=j9iVZfS8kkCEFUPaAeJV0sAi, grant_type=refresh_token, scope=email https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid
[2018-09-20T09:42:16.740Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=utf-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Thu, 20 Sep 2018 09:42:16 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="44,43,39,35", accept-ranges=none, connection=close
[2018-09-20T09:42:16.769Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/<project>

[2018-09-20T09:42:16.861Z] Error: tunneling socket could not be established, statusCode=407
    at ClientRequest.onConnect (C:\Users\<user>\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\tunnel-agent\index.js:166:19)
    at Object.onceWrapper (events.js:319:30)
    at emitThree (events.js:136:13)
    at ClientRequest.emit (events.js:217:7)
    at Socket.socketOnData (_http_client.js:474:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)

Error: Server Error. tunneling socket could not be established, statusCode=407

@ chen86860 ์•„๋‹ˆ์š”, ์ง€๊ธˆ์€ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์ง€ ์•Š๊ณ  ํ™˜๊ฒฝ์—์„œ ํ”„๋ก์‹œ๋ฅผ ๋‚ด ๋ณด๋ƒ…๋‹ˆ๋‹ค.

$ export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;

ํ„ฐ๋ฏธ๋„์—์„œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ๋™์ผํ•œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
yongjiamingdeMacBook- Pro : firebase yongjiaming $ firebase ๋กœ๊ทธ์ธ --debug
[2018-09-18T03 : 33 : 08.860Z] -------------------------------------- --------------------------------
[2018-09-18T03 : 33 : 08.863Z] ๋ช…๋ น : /usr/local/Cellar/node/9.6.1/bin/node / usr / local / bin / firebase login --debug
[2018-09-18T03 : 33 : 08.864Z] CLI ๋ฒ„์ „ : 4.2.1
[2018-09-18T03 : 33 : 08.864Z] ํ”Œ๋žซํผ : darwin
[2018-09-18T03 : 33 : 08.864Z] ๋…ธ๋“œ ๋ฒ„์ „ : v9.6.1
[2018-09-18T03 : 33 : 08.864Z] ์‹œ๊ฐ„ : 2018 ๋…„ 9 ์›” 18 ์ผ ํ™”์š”์ผ 11:33:08 GMT + 0800 (CST)
[2018-09-18T03 : 33 : 08.864Z] -------------------------------------- --------------------------------

? Firebase๊ฐ€ ์ต๋ช…์˜ CLI ์‚ฌ์šฉ ๋ฐ ์˜ค๋ฅ˜๋ณด๊ณ  ์ •๋ณด๋ฅผ ์ˆ˜์ง‘ํ•˜๋„๋ก ํ—ˆ์šฉ ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ? ์˜ˆ

๋กœ๊ทธ์ธํ•˜๋ ค๋ฉด ๊ธฐ๊ธฐ์—์„œ ๋‹ค์Œ URL์„ ๋ฐฉ๋ฌธํ•˜์„ธ์š”.
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%2Fcloudplatformprojects.readonly 20https % 3A % 2F % 2Fwww.googleapis.com % 2Fauth % 2Ffirebase % 20https % 3A % 2F % 2Fwww.googleapis.com % 2Fauth % 2Fcloud-platform & response_type = code & state = 971322293 & redirect_uri = http % 3A % 2F % 2Flocalhost % 3A9005

์ธ์ฆ ๋Œ€๊ธฐ ์ค‘ ...
[2018-09-18T03 : 33 : 16.437Z] >>> HTTP ์š”์ฒญ ๊ฒŒ์‹œ https://accounts.google.com/o/oauth2/token
์ฝ”๋“œ = 4 / XgBxvL5SXC-Wg5vT8CCTdfLIoTPKVkCOFcmVku25RwRlkLUc-inqxg6mPRNX7JKRA8fWufJEm-7e5BKTbfFCmsk, CLIENT_ID = 563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com, client_secret = j9iVZfS8kkCEFUPaAeJV0sAi, redirect_uri๋กœ = ์— http : // localhost๋ฅผ : 9005, grant_type = authorization_code
[2018-09-18T03 : 33 : 16.454Z] ํ† ํฐ ๊ฐ€์ ธ ์˜ค๊ธฐ ์˜ค๋ฅ˜ : ์˜ค๋ฅ˜
์ƒˆ๋กœ์šด FirebaseError (/usr/local/lib/node_modules/firebase-tools/lib/error.js:11:16)
Request._callback (/usr/local/lib/node_modules/firebase-tools/lib/api.js:34:11)
self.callback์—์„œ (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
Request.emit (events.js : 127 : 13)
Request.emit (domain.js : 421 : 20)
Request.onRequestError (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:881:8)
ClientRequest.emit (events.js : 127 : 13)
ClientRequest.emit (domain.js : 421 : 20)
ClientRequest.onError (/usr/local/lib/node_modules/firebase-tools/node_modules/tunnel-agent/index.js:179:21)
Object.onceWrapper (events.js : 219 : 13)
^ Z
[1] + firebase ๋กœ๊ทธ์ธ ์ค‘์ง€ --debug

์ตœ์‹  shadowscoks๋กœ ์—…๋ฐ์ดํŠธํ•˜๋ฉด ๋ชจ๋“  ๊ฒƒ์ด ์ž˜๋ฉ๋‹ˆ๋‹ค ~

์ €๋Š” ์ค‘๊ตญ์— ์‚ด๊ณ ์žˆ์–ด์„œ GFW ๋•๋ถ„์— ๊ตฌ๊ธ€ ์ œํ’ˆ์„ ์‚ฌ์šฉํ•˜๊ธฐ๊ฐ€ ์ •๋ง ์–ด๋ ต์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ์ €๋Š” Google ์„œ๋น„์Šค์— ์•ก์„ธ์Šคํ•˜๊ธฐ ์œ„ํ•ด 1080 ํฌํŠธ์—์„œ ์ˆ˜์‹ ํ•˜๋Š” Shadowsocks๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

์—ฌ๊ธฐ์— ๋˜ ๋‹ค๋ฅธ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. firebase serve ์„ (๋ฅผ) ์‹คํ–‰ํ•˜์—ฌ ๋™์  ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋ ค๋Š” ๊ฒฝ์šฐ localhost ์š”์ฒญ๋„ ์ด๋Ÿฌํ•œ ๋ฐฉ์‹์œผ๋กœ ํ”„๋ก์‹œ๋˜๋ฏ€๋กœ http_proxy=socks5://127.0.0.1:1080 ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” https_proxy=socks5://127.0.0.1:1080 ๋งŒ ์‚ฌ์šฉํ•˜์—ฌ ์ด๊ฒƒ์„ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

์š”์•ฝ

๋กœ๊ทธ์ธ

firebase login --no-localhost

์„œ๋ธŒ

export https_proxy=socks5://127.0.0.1:1080
firebase serve

๋ฐฐํฌ

์‚ฌ์ด์˜ follwowing ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ BEGIN_PROXY ๋ฐ AFTER_PROXY ๋‹น์‹ ์— functions/node_modules/faye-websocket/lib/faye/websocket/client.js

// ...
var Client = function(_url, protocols, options) {
  options = options || {};

  // BEGIN_PROXY
  options.proxy = {
    origin:  'http://localhost:8888',
    headers: {'User-Agent': 'node'},
  }
  // AFTER_PROXY

// ...
firebase deploy


๋‚ด ๋กœ๊ทธ๋ฅผ ๋ณด๋ ค๋ฉด ํด๋ฆญ

upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ firebase login --no-localhost
? Allow Firebase to collect anonymous CLI usage and error reporting
 information? No

Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=928286882&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob

? Paste authorization code here: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

+  Success! Logged in as [email protected]

upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ firebase serve

=== Serving from 'E:\github\firebase-test'...

i  functions: Preparing to emulate functions.
i  hosting: Serving hosting files from: public
+  hosting: Local server: http://localhost:5000
Warning: You're using Node.js v8.11.3 but Google Cloud Functions only supports v6.11.5.
+  functions: app: http://localhost:5001/learning-13a18/us-central1/app
127.0.0.1 - - [08/Nov/2018:04:40:35 +0000] "GET / HTTP/1.1" 200 3505 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:37 +0000] "GET /__/firebase/init.js HTTP/1.1" 200 - "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:37 +0000] "GET /__/firebase/5.5.7/firebase-app.js HTTP/1.1" 200 - "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:38 +0000] "GET /__/firebase/5.5.7/firebase-auth.js HTTP/1.1" 200 - "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:38 +0000] "GET /__/firebase/5.5.7/firebase-messaging.js HTTP/1.1" 200 - "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:38 +0000] "GET /__/firebase/5.5.7/firebase-database.js HTTP/1.1" 200 - "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:39 +0000] "GET /__/firebase/5.5.7/firebase-storage.js HTTP/1.1" 200 - "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
127.0.0.1 - - [08/Nov/2018:04:40:40 +0000] "GET /favicon.ico HTTP/1.1" 404 1808 "http://localhost:5000/" "Mozilla/5.0 (Windows NT 10.0;
Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
[hosting] Rewriting /timestamp to local function app
info: User function triggered, starting execution
info: Execution took 23 ms, user function completed successfully
127.0.0.1 - - [08/Nov/2018:04:40:41 +0000] "GET /timestamp HTTP/1.1" 200 13 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
[hosting] Rewriting /timestamp to local function app
info: User function triggered, starting execution
info: Execution took 2 ms, user function completed successfully
127.0.0.1 - - [08/Nov/2018:04:40:43 +0000] "GET /timestamp HTTP/1.1" 200 13 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
Shutting down...


upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ export http_proxy=socks5://127.0.0.1:1080

upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ firebase serve

Error: Server Error. socket hang up

upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ export http_proxy=

upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ firebase serve

=== Serving from 'E:\github\firebase-test'...

i  functions: Preparing to emulate functions.
i  hosting: Serving hosting files from: public
+  hosting: Local server: http://localhost:5000
Warning: You're using Node.js v8.11.3 but Google Cloud Functions only supports v6.11.5.
+  functions: app: http://localhost:5001/learning-13a18/us-central1/app
Shutting down...


upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ firebase deploy

Error: Server Error. socket hang up

upupming@DESKTOP-6EB87T6 MINGW64 /e/github/firebase-test
$ firebase deploy

=== Deploying to 'learning-13a18'...

i  deploying functions, hosting
Running command: npm --prefix "%RESOURCE_DIR%" run lint

> functions@ lint E:\github\firebase-test\functions
> eslint .

+  functions: Finished running predeploy script.
i  functions: ensuring necessary APIs are enabled...
+  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (52.46 KB) for uploading
+  functions: functions folder uploaded successfully
i  hosting[learning-13a18]: beginning deploy...
i  hosting[learning-13a18]: found 2 files in public
+  hosting[learning-13a18]: file upload complete
i  functions: updating Node.js 6 function app(us-central1)...
+  functions[app(us-central1)]: Successful update operation.
i  hosting[learning-13a18]: finalizing version...
+  hosting[learning-13a18]: version finalized
i  hosting[learning-13a18]: releasing new version...
+  hosting[learning-13a18]: release complete

+  Deploy complete!

Project Console: https://console.firebase.google.com/project/learning-13a18/overviewHosting URL: https://learning-13a18.firebaseapp.com

๋Œ€์ฒด ์†”๋ฃจ์…˜

ํ•ญ์ƒ ํ™ˆ WiFi ๋„คํŠธ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋ผ์šฐํ„ฐ์—์„œ Shadowsocks ํ”„๋ก์‹œ๋ฅผ ๊ตฌ์„ฑ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์ •๋ณด๋Š” ์ด ์ €์žฅ์†Œ ๋ฅผ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.

์ €๋Š” ์ค‘๊ตญ์— ์‚ด๊ณ ์žˆ์–ด์„œ GFW ๋•๋ถ„์— ๊ตฌ๊ธ€ ์ œํ’ˆ์„ ์‚ฌ์šฉํ•˜๊ธฐ๊ฐ€ ์ •๋ง ์–ด๋ ต์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ์ €๋Š” Google ์„œ๋น„์Šค์— ์•ก์„ธ์Šคํ•˜๊ธฐ ์œ„ํ•ด 1080 ํฌํŠธ์—์„œ ์ˆ˜์‹ ํ•˜๋Š” Shadowsocks๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

์—ฌ๊ธฐ์— ๋˜ ๋‹ค๋ฅธ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. firebase serve ์„ (๋ฅผ) ์‹คํ–‰ํ•˜์—ฌ ๋™์  ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋ ค๋Š” ๊ฒฝ์šฐ localhost ์š”์ฒญ๋„ ์ด๋Ÿฌํ•œ ๋ฐฉ์‹์œผ๋กœ ํ”„๋ก์‹œ๋˜๋ฏ€๋กœ http_proxy=socks5://127.0.0.1:1080 ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” https_proxy=socks5://127.0.0.1:1080 ๋งŒ ์‚ฌ์šฉํ•˜์—ฌ ์ด๊ฒƒ์„ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.

์š”์•ฝ

๋กœ๊ทธ์ธ

firebase login --no-localhost

์„œ๋ธŒ

export https_proxy=socks5://127.0.0.1:1080
firebase serve

๋ฐฐํฌ

์‚ฌ์ด์˜ follwowing ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ BEGIN_PROXY ๋ฐ AFTER_PROXY ๋‹น์‹ ์— functions/node_modules/faye-websocket/lib/faye/websocket/client.js

// ...
var Client = function(_url, protocols, options) {
  options = options || {};

  // BEGIN_PROXY
  options.proxy = {
    origin:  'http://localhost:8888',
    headers: {'User-Agent': 'node'},
  }
  // AFTER_PROXY

// ...
firebase deploy

๋‚ด ๋กœ๊ทธ๋ฅผ ๋ณด๋ ค๋ฉด ํด๋ฆญ

๋Œ€์ฒด ์†”๋ฃจ์…˜

ํ•ญ์ƒ ํ™ˆ WiFi ๋„คํŠธ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋ผ์šฐํ„ฐ์—์„œ Shadowsocks ํ”„๋ก์‹œ๋ฅผ ๊ตฌ์„ฑ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์ •๋ณด๋Š” ์ด ์ €์žฅ์†Œ ๋ฅผ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.

export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;export NO_PROXY=localhost,127.0.0.1

2019 ์—ฌ์ „ํžˆ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค! ํ–‰์šด์€?

๋‚˜๋Š” ํ”„๋ก์‹œ ๋’ค์— ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋กœ๊ทธ์ธ์— ์„ฑ๊ณตํ–ˆ์œผ๋ฉฐ ๋ฐฐํฌ์‹œ ์ด์™€ ๋™์ผํ•œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

HTTP_PROXY = ์ˆ˜์ถœ http://127.0.0.1 ์ˆ˜์ถœํ•˜๊ณ  https_proxy =; 1087 : http://127.0.0.1์„ : 1087์„, ์ˆ˜์ถœ NO_PROXY = localhost๋ฅผ 127.0.0.1

์ค‘๊ตญ์˜ shadowsocks ๋’ค์—์„œ ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ!

๊ฐ™์€ ๋ฌธ์ œ ..

์•ˆ๋…•ํ•˜์„ธ์š” ์—ฌ๋Ÿฌ๋ถ„! ๋‹ค์Œ์€ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๊ณ  ํŒŒ์ผ์„ ํŽธ์ง‘ ํ•  ํ•„์š”๊ฐ€์—†๋Š” ๋˜ ๋‹ค๋ฅธ ์†”๋ฃจ์…˜์ž…๋‹ˆ๋‹ค. Shadowsocks / ShadowsocksR์„ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€์‹  SSTap์„ ์‚ฌ์šฉํ•ด๋ณด์‹ญ์‹œ์˜ค. SSTap์€ ๊ฐ€์ƒ ๋„คํŠธ์›Œํฌ ์นด๋“œ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์„ค๋ช…ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ ๋ผ์šฐํ„ฐ์—์„œ Shadowsocks (R)๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค.

export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;export NO_PROXY=localhost,127.0.0.1

์ค‘๊ตญ์˜ ์„€๋„์šฐ ์‚ญ์ด์žˆ๋Š” Mac์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

Windows 10์˜ Powershell์—์„œ shadowsock์œผ๋กœ ๊ตฌ๋™๋ฉ๋‹ˆ๋‹ค.

PS> $env:http_proxy = 'http://127.0.0.1:1080'
PS> $env:https_proxy = 'http://127.0.0.1:1080'
PS> $env:NO_PROXY = 'localhost,127.0.0.1'
PS> firebase login

2019/03/24, ์—ฌ์ „ํžˆ Mac Air์—์„œ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š” ์—ฌ๋Ÿฌ๋ถ„! ๋‹ค์Œ์€ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๊ณ  ํŒŒ์ผ์„ ํŽธ์ง‘ ํ•  ํ•„์š”๊ฐ€์—†๋Š” ๋˜ ๋‹ค๋ฅธ ์†”๋ฃจ์…˜์ž…๋‹ˆ๋‹ค. Shadowsocks / ShadowsocksR์„ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€์‹  SSTap์„ ์‚ฌ์šฉํ•ด๋ณด์‹ญ์‹œ์˜ค. SSTap์€ ๊ฐ€์ƒ ๋„คํŠธ์›Œํฌ ์นด๋“œ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์„ค๋ช…ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ ๋ผ์šฐํ„ฐ์—์„œ Shadowsocks (R)๋ฅผ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ–ˆ์Šต๋‹ˆ๋‹ค.

@ yqx1110 ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์ œ๊ฐ€ ๋ณธ ๊ฒƒ ์ค‘ ๊ฐ€์žฅ ๊ฐ•๋ ฅํ•œ ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

์‹คํŒจ, ์ž‘๋™ํ•˜์ง€ ์•Š์Œ

์•ˆ๋…•ํ•˜์„ธ์š”, ๋ฐฉ๊ธˆ ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค. ๋งํฌ https://qiita.com/tanoc/items/ac92464de473ae483d50์„ ๋”ฐ๋ฅด์‹ญ์‹œ์˜ค

์•ˆ๋…•ํ•˜์„ธ์š”, ๋ฐฉ๊ธˆ ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค. ๋งํฌ https://qiita.com/tanoc/items/ac92464de473ae483d50์„ ๋”ฐ๋ฅด์‹ญ์‹œ์˜ค

์œ„์˜ ๋‚ด์šฉ์€ Clasp์—์„œ๋„ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

Windows 10์˜ Powershell์—์„œ shadowsock์œผ๋กœ ๊ตฌ๋™๋ฉ๋‹ˆ๋‹ค.

PS> $env:http_proxy = 'http://127.0.0.1:1080'
PS> $env:https_proxy = 'http://127.0.0.1:1080'
PS> $env:NO_PROXY = 'localhost,127.0.0.1'
PS> firebase login

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. win10์—์„œ ์ €์—๊ฒŒ ํšจ๊ณผ์ ์ž…๋‹ˆ๋‹ค.

์ด ํŠธ๋ฆญ์„ ์‚ฌ์šฉํ•˜์—ฌ Mac์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

Screen Shot 2019-07-19 at 12 45 14

  1. Mac์—์„œ ๋„คํŠธ์›Œํฌ ํ”„๋ก์‹œ ์„ค์ •์œผ๋กœ ์ด๋™ํ•˜์—ฌ ํ”„๋ก์‹œ ์„œ๋ฒ„ ๋ฐ ํฌํŠธ๋ฅผ CNTL ๋กœ์ปฌ ํ˜ธ์ŠคํŠธ์—์„œ ์‹ค์ œ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์„œ๋ฒ„ ๋ฐ ํฌํŠธ๋กœ ๋ณ€๊ฒฝํ•˜์‹ญ์‹œ์˜ค.
    Screen Shot 2019-07-19 at 13 06 34

    1. ํ„ฐ๋ฏธ๋„ ์ž„์‹œ ์ธ์ฆ ํ”„๋ก์‹œ์—์„œ ์•„๋‹ˆ์š”

ProxyPass ๋ฐ ProxyUserName : CNTLM์— ์ €์žฅ๋œ ๋กœ๊ทธ์ธ ์ž๊ฒฉ ์ฆ๋ช…๊ณผ ๋™์ผ
ProxyServer ๋ฐ ProxyPort : ๋„คํŠธ์›Œํฌ ์„ค์ •์—์„œ ์„ค์ • ํ•œ ๊ฒƒ๊ณผ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

export http_proxy=http://<ProxyUserName>:<ProxyPass>@<ProxyServer>:<ProxyPort>
export https_proxy=http://<ProxyUserName>:<ProxyPass>@<ProxyServer>:<ProxyPort>

์ด์ œ firebase์— ์ •์ƒ์ ์œผ๋กœ ๋กœ๊ทธ์ธํ•˜๊ณ  ํด๋ผ์šฐ๋“œ ๊ธฐ๋Šฅ์„ ๋ฐฐํฌ ํ•  ์ˆ˜์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ž‘๋™ํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;export NO_PROXY=localhost,127.0.0.1

๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ๊ณ ๋งˆ์›Œ.

2019.8.10 ์œ„์˜ ๊ฑฐ์˜ ๋ชจ๋“  ์†”๋ฃจ์…˜์„ ์‹œ๋„ํ–ˆ์ง€๋งŒ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์Šฌํ”„๊ฒŒ๋„ ...

@starry
๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ•ด, ๊ณ ๋งˆ์›Œ

Windows 10์˜ Powershell์—์„œ shadowsock์œผ๋กœ ๊ตฌ๋™๋ฉ๋‹ˆ๋‹ค.

PS> set http_proxy = 'http://127.0.0.1:1080'
PS> set https_proxy = 'http://127.0.0.1:1080'
PS>set NO_PROXY = 'localhost,127.0.0.1'
PS> firebase login

win10์—์„œ ์ด๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•˜๋ฉฐ 1080์€ ๋‚ด ํ”„๋ก์‹œ ํฌํŠธ์ž…๋‹ˆ๋‹ค.

์ด ํŠธ๋ฆญ์„ ์‚ฌ์šฉํ•˜์—ฌ Mac์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

Screen Shot 2019-07-19 at 12 45 14

  1. Mac์—์„œ ๋„คํŠธ์›Œํฌ ํ”„๋ก์‹œ ์„ค์ •์œผ๋กœ ์ด๋™ํ•˜์—ฌ ํ”„๋ก์‹œ ์„œ๋ฒ„ ๋ฐ ํฌํŠธ๋ฅผ CNTL ๋กœ์ปฌ ํ˜ธ์ŠคํŠธ์—์„œ ์‹ค์ œ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์„œ๋ฒ„ ๋ฐ ํฌํŠธ๋กœ ๋ณ€๊ฒฝํ•˜์‹ญ์‹œ์˜ค.

Screen Shot 2019-07-19 at 13 06 34

  1. ํ„ฐ๋ฏธ๋„ ์ž„์‹œ ์ธ์ฆ ํ”„๋ก์‹œ์—์„œ ์•„๋‹ˆ์š”

ProxyPass ๋ฐ ProxyUserName : CNTLM์— ์ €์žฅ๋œ ๋กœ๊ทธ์ธ ์ž๊ฒฉ ์ฆ๋ช…๊ณผ ๋™์ผ
ProxyServer ๋ฐ ProxyPort : ๋„คํŠธ์›Œํฌ ์„ค์ •์—์„œ ์„ค์ • ํ•œ ๊ฒƒ๊ณผ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

export http_proxy=http://<ProxyUserName>:<ProxyPass>@<ProxyServer>:<ProxyPort>
export https_proxy=http://<ProxyUserName>:<ProxyPass>@<ProxyServer>:<ProxyPort>

์ด์ œ firebase์— ์ •์ƒ์ ์œผ๋กœ ๋กœ๊ทธ์ธํ•˜๊ณ  ํด๋ผ์šฐ๋“œ ๊ธฐ๋Šฅ์„ ๋ฐฐํฌ ํ•  ์ˆ˜์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ž‘๋™ํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ๊ฐ์‚ฌ. ๐Ÿ˜‡

์—ฌ์ „ํžˆ์ด ๋ฌธ์ œ๋ฅผ ๊ฒช๊ณ  ์žˆ์ง€๋งŒ 2020 ๋…„์—๋„ ์—ฌ์ „ํžˆ ์กด์žฌํ•œ๋‹ค๋Š” ๊ฒƒ์„ ๋ฏฟ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค ...

๊ฐ™์€ ๋ฌธ์ œ.

Mac์—์„œ ํ”„๋ก์‹œ ์šฉ v2ray๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์‚ฌ์šฉ์ž :

  1. ์„ค์ •์—์„œ ํ”„๋ก์‹œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
    image
  2. ํ„ฐ๋ฏธ๋„์—์„œ ํ”„๋ก์‹œ๋ฅผ ๋‚ด ๋ณด๋ƒ…๋‹ˆ๋‹ค.
    export http_proxy = http : // localhost : 1087 (์ด๊ฒƒ์€ ๋‚ด ํ”„๋ก์‹œ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค)
  3. ์ „์—ญ nodejs ํด๋”์˜ firebase ๋„๊ตฌ ํด๋”์—์„œ faye lib๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค. ๊ฒฝ๋กœ ์˜ˆ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Mac์—์„œ "faye"๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    /node_modules/firebase-tools/node_modules/firebase/node_modules/faye-websocket/lib/faye/websocket/client.js
  4. faye์— ๋Œ€ํ•œ ํ”„๋ก์‹œ๋ฅผ ๊ตฌ์„ฑ์œผ๋กœ ์ถ”๊ฐ€ํ•˜์‹ญ์‹œ์˜ค. faye์˜ client.js ํŒŒ์ผ์„ ํŽธ์ง‘ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
    var Client = function (_url, ํ”„๋กœํ† ์ฝœ, ์˜ต์…˜) {
    ์˜ต์…˜ = ์˜ต์…˜ || {};
    // ์—ฌ๊ธฐ์— firebase๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” faye ์šฉ ํ”„๋ก์‹œ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
    options.proxy = {
    ์ถœ์ฒ˜ : ' http : // localhost : 1087',
    };
    โ€ฆ
    }
    5. ํ„ฐ๋ฏธ๋„์„ ํ†ตํ•ด NODE_TLS_REJECT_UNAUTHORIZED = 0 ๋‚ด๋ณด๋‚ด๊ธฐ
    6. firebase login --no-localhost through the terminal

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
์—ฌ๊ธฐ์„œ ์ฃผ์š” ๋…ผ๋ฆฌ๋Š” ๋‚ด ๋กœ์ปฌ ์ปดํ“จํ„ฐ์— ํ”„๋ก์‹œ๊ฐ€ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ํŽ˜์ด์—๊ฒŒ ์•Œ๋ฆฌ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ
    WeChatd29e8b5b594f8cff963da7441b84fbc9

  2. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.

  3. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.

  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ

WeChatd29e8b5b594f8cff963da7441b84fbc9

  1. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.
  2. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ์ •๋ง ๋‚ด ์—‰๋ฉ์ด๋ฅผ ๊ตฌํ•ด์ค˜! ๊ฐ์‚ฌ!

์ตœ์‹  ๋ฒ„์ „์—์„œ์ด ๋ฌธ์ œ์— ๋Œ€ํ•œ ํ•ด๊ฒฐ์ฑ…์ด ์žˆ์Šต๋‹ˆ๊นŒ?

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๋‹จ๊ณ„๋Š” ์ด์ „๊ณผ ๋™์ผํ•ฉ๋‹ˆ๋‹ค. ์ƒˆ ํŒŒ์ผ ์œ„์น˜ : ... / firebase-tools / lib / api.js

์•„๋ž˜ ์ฝ”๋“œ๋ฅผ 297 ํ–‰์—์„œ ์ฐพ์œผ์‹ญ์‹œ์˜ค.

reqOptions.headers = options.headers; reqOptions.timeout = options.timeout;

reqOptions.proxy = "http://127.0.0.1:10818";

firebase login --no-localhost

@jplyue ๊ฐ€ ํšŒ์‚ฌ ํ”„๋ก์‹œ์™€ ๋” ์ด์ƒ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ์ƒˆ๋กœ์šด Firebase ๋„๊ตฌ ๋ฒ„์ „์— ๊ฑฐ์˜

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ

WeChatd29e8b5b594f8cff963da7441b84fbc9

  1. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.
  2. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ

๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค !!!!!!!!!

ํ”„๋ก์‹œ์—์„œ firebase๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ์ •๋ง ๊ณ ํ†ต ์Šค๋Ÿฝ์Šต๋‹ˆ๋‹ค.

์ด ํŠธ๋ฆญ์„ ์‚ฌ์šฉํ•˜์—ฌ Mac์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.
Screen Shot 2019-07-19 at 12 45 14

  1. Mac์—์„œ ๋„คํŠธ์›Œํฌ ํ”„๋ก์‹œ ์„ค์ •์œผ๋กœ ์ด๋™ํ•˜์—ฌ ํ”„๋ก์‹œ ์„œ๋ฒ„ ๋ฐ ํฌํŠธ๋ฅผ CNTL ๋กœ์ปฌ ํ˜ธ์ŠคํŠธ์—์„œ ์‹ค์ œ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ ์„œ๋ฒ„ ๋ฐ ํฌํŠธ๋กœ ๋ณ€๊ฒฝํ•˜์‹ญ์‹œ์˜ค.

Screen Shot 2019-07-19 at 13 06 34

  1. ํ„ฐ๋ฏธ๋„ ์ž„์‹œ ์ธ์ฆ ํ”„๋ก์‹œ์—์„œ ์•„๋‹ˆ์š”

ProxyPass ๋ฐ ProxyUserName : CNTLM์— ์ €์žฅ๋œ ๋กœ๊ทธ์ธ ์ž๊ฒฉ ์ฆ๋ช…๊ณผ ๋™์ผ
ProxyServer ๋ฐ ProxyPort : ๋„คํŠธ์›Œํฌ ์„ค์ •์—์„œ ์„ค์ • ํ•œ ๊ฒƒ๊ณผ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

export http_proxy=http://<ProxyUserName>:<ProxyPass>@<ProxyServer>:<ProxyPort>
export https_proxy=http://<ProxyUserName>:<ProxyPass>@<ProxyServer>:<ProxyPort>

์ด์ œ firebase์— ์ •์ƒ์ ์œผ๋กœ ๋กœ๊ทธ์ธํ•˜๊ณ  ํด๋ผ์šฐ๋“œ ๊ธฐ๋Šฅ์„ ๋ฐฐํฌ ํ•  ์ˆ˜์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ž‘๋™ํ•˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ๊ฐ์‚ฌ. ๐Ÿ˜‡

๋‚˜๋ฅผ ์œ„ํ•ด ์ผํ•˜์‹ญ์‹œ์˜ค! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

๊ฐ™์€ ๋ฌธ์ œ์— ์ง๋ฉดํ•˜๋‹ค

HTTP_PROXY = ์ˆ˜์ถœ http://127.0.0.1 ์ˆ˜์ถœํ•˜๊ณ  https_proxy =; 1087 : http://127.0.0.1์„ : 1087์„, ์ˆ˜์ถœ NO_PROXY = localhost๋ฅผ 127.0.0.1

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ

WeChatd29e8b5b594f8cff963da7441b84fbc9

  1. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.
  2. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ
    ์ž‘๋™ ํ•จ

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ

WeChatd29e8b5b594f8cff963da7441b84fbc9

  1. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.
  2. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ
    ์ž‘๋™ ํ•จ

์šฐ๋ถ„ํˆฌ 20.04์—์„œ ํ…Œ์ŠคํŠธ ํ•œ ๊ฒฐ๊ณผ ๋งค๋ ฅ์ฒ˜๋Ÿผ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๊ณต์œ  ํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ

WeChatd29e8b5b594f8cff963da7441b84fbc9

  1. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.
  2. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ
    ์ž‘๋™ ํ•จ

ํ”„๋ก์‹œ๋ฅผ ํŽธ์ง‘ํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์—ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ž๋™ ํ•ดํ‚นํ•ฉ๋‹ˆ๋‹ค.
sed -i '/self.tunnel*/i self.proxy = " http://192.168.219.7 : 9090";' /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js

์ด๊ฒƒ์ด ๋„์›€์ด๋˜๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.
[email protected]
๊ทธ๊ฒƒ์€ ssr๋กœ win๊ณผ mac ๋ชจ๋‘์—์„œ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ”„๋ก์‹œ ์ฃผ์†Œ ์ฐพ๊ธฐ

WeChatd29e8b5b594f8cff963da7441b84fbc9

  1. firebase ๋„๊ตฌ ํด๋”์—์„œ "request.js"ํŒŒ์ผ์„ ์—ฝ๋‹ˆ ๋‹ค. ๋‚˜๋ฅผ ์œ„ํ•ด ๊ฒฝ๋กœ๋Š”
    /usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js
    "npm root -g"๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ „์—ญ npm ๊ฒฝ๋กœ๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค.
  2. 276 ํ–‰์— ๋Œ€ํ•œ ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ฐพ์œผ์‹ญ์‹œ์˜ค.
  if (!self.hasOwnProperty('proxy')) {
    self.proxy = getProxyFromURI(self.uri)
  }

๊ทธ๊ฒƒ์„ ๋ณ€๊ฒฝ

  // if (!self.hasOwnProperty('proxy')) {
  //   self.proxy = getProxyFromURI(self.uri)
  // }
  self.proxy = "http://127.0.0.1:1087";  // this is your proxy address
  1. firebase login --no-localhost ์‚ฌ์šฉ

๋“œ๋””์–ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค !!! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค !!!! ๐ŸŒท๐ŸŒท๐ŸŒท

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰