Binance 搞事.限制API來源國家的使用
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
就如罐頭訊息般的回文,讓我對於 GCP 失效很焦慮.
GCP(Google Cloud Function)
- 我選擇亞洲的區的甚至台灣區的 server 怎麼還不行?
讓我們 deploy 一隻小程式顯示來源IP.
結果為
35.203.255.124
用網路現成的查詢IP服務,才發現這是美國的IP,難怪 Binance 會一直阻擋.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
解法.設定 VPC (Vitrual Private Cloud Network)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
使用 Google Cloud SDK 完成
按照以下步驟重新部署後,對外連線的IP就是你指定地區的固定IP.
這樣好處還不錯,還可以在其他服務中設定白名單.因為幣安搞事讓我又學到了…Orz
Create VPC
Create a Serverless VPC Access connectors
Grant Permissions
Configurate the connector
Reserve static IP
Creating the Cloud Router
Creating Cloud Nat
來源參考資料:
https://github.com/AlvarDev/functions-static-ip