SurgeïŒsurge.shïŒ
Web ãµãŒãã¹ SurgeïŒãµãŒãžïŒsurge.shïŒã«ã€ããŠãŸãšããŠããŸãã
Surge ã¯ãã°ããç®ç«ã£ãåãããªããäžå
·åä¿®æ£ãããã®ã¿ã®ç¶æ
ã§ãããã
æè¿éçºãé²ããŠãããŠããŠããäºãããŒãžéå¶è
ãææ¡ããŠããŸãã
è¿ããã¡ã«ã Surge å
¬åŒãµã€ãããã®ããŒãžã®äžéšæ
å ±ã¯å€æŽã®å¯èœæ§ããããŸãã
ð Surge (surge.sh) | ð BALLOON | FU-SEN - English information
ç®æ¬¡
å ¬åŒã»é¢é£ãµã€ã
2021幎4æãGitHub Discussions ãå
¬éãããŸããã
åæ皿㯠1 æãªã®ã§ã以åããèšçœ®ã®æ€èšã¯ããŠããããã«èŠããŸãã
ã€ã³ã¹ããŒã«
Node.js ãã€ã³ã¹ããŒã«ããç¶æ
ã§ã
ã·ã§ã«ã»ã¿ãŒããã«ãã次ã®ã³ãã³ãã§ã€ã³ã¹ããŒã«ã§ããŸãã
npm i -g surge
Surge ã¯å®å šã«ã·ã§ã«ã»ã¿ãŒããã«ããã®æäœã§ããWeb äžããã®æäœã¯ã§ããŸããã
æŽæ°ãããæãåãæé ã§ãã
èŠãç®ã¯å€åããŠãŸããããæŽæ°ã¯å®æçã«è¡ãããŠããŸãã
éçºç
è¿ã Surge ã¯å€§ããä»æ§ãå€ããäºå®ããããŸãã
éçºçã§ãããç¥ãäºãã§ããŸããã
äžéšæ©èœããµãŒãã¯éçºäžã§ãŸãšãã«äœ¿çšã§ããªãå¯èœæ§ããããŸãã
ãããŠããŒãžéå¶è
ã¯ããã«è§ŠããŠããªãå
容ãããäºããæ¿ç¥äžããã
npm i -g surge@edge
ãµããã¡ã€ã³.surge.sh ãš ç¬èªãã¡ã€ã³ ã®å¶é
Surge ã§ã¯ç¬èªãã¡ã€ã³ä»¥å€ã« ãµããã¡ã€ã³.surge.sh ã䜿çšã§ããŸããã
次ã®ç¹ã«æ³šæãèŠããŸãã
é ç® | ãµããã¡ã€ã³.surge.sh | ç¬èªãã¡ã€ã³ |
---|---|---|
robots.txt | å šããŒãžã¯ããŒã«æåŠ â» | èªç±ã«èšå®å¯èœ |
https åç § | æå¹ | ç¡æãã©ã³ã§ã¯ç¡å¹ |
â» ãµããã¡ã€ã³.surge.sh
ã§ã¯ robots.txt
ã次ã§åºå®ãããŠããŸãã
User-agent: *
Disallow: /
ãã®ãããGoogle ãªã©ã§ã€ã³ããã¯ã¹ãããªãç¶æ
ã«ãªã£ãŠããŸãã
ç¬èªãã¡ã€ã³ã§ã¯ãããçºçãããèªç±ã«èšå®ã§ããŸãã
ç¬èªãã¡ã€ã³ã§ SSL ãæå¹ã«ããå Žåã¯ææãã©ã³ã«ããå¿
èŠããããŸããã
代ããã«å€éšãµãŒãã¹ãçµç±ã㊠SSL åããæ¹æ³ããããŸãã
ãã®ãµãŒãã¹ãšã㊠Cloudflare ã¯ããŒãžéå¶è
ãé·ã䜿çšããŠããæ¹æ³ã§ãã
詳现㯠SurgeïŒCloudflare ã§éçšãã ãåç
§ããŠäžããã
ç¬èªãã¡ã€ã³ã®ããŒã ãµãŒãèšå®
ç¬èªãã¡ã€ã³ã䜿çšããå ŽåãããŒã ãµãŒãã®ãŸãŒã³ã¯æ¬¡ã§èšå®ããŸãã
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
ãªãã»@ã»ãã¡ã€ã³å â» | A | 45.55.110.124 |
www | CNAME | na-west1.surge.sh |
surge
ã³ãã³ãã§ã¯ããã¡ãã§å
¬éãããŠããŸãã
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
ãªãã»@ã»ãã¡ã€ã³å â» | CNAME | geo.surge.world |
www | CNAME | geo.surge.world |
ãŸãã¯ãã¡ã€ã³ã®ããŒã ãµãŒããšããŠæ¬¡ãèšå®ããŸãã
ããŒã ãµãŒã |
---|
ns1.surge.world |
ns2.surge.world |
ns3.surge.world |
ns4.surge.world |
â» ã¯ãµããã¡ã€ã³ãªãã®èšå®ã§ãã
ããŒã ãµãŒãã·ã¹ãã ã«ãã£ãŠã¯ CNAME ã®ä»£ããã«
ALIAS ã ANAME ã§èšå®ã§ããå ŽåããããŸãã
CNAME ã䜿çšã§ããªãå Žå㯠A ã§èšå®ããäºãå¯èœã§ããã
ããŒã ãµãŒãã®ä»çµã¿äžãã¬ã¹ãã³ã¹ãæªããªããããna-west1.surge.sh
ã§èšå®å¯èœãªå Žåã¯na-west1.surge.sh
ãçšããŠäžããã
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
ãªãã»@ã»ãã¡ã€ã³å | A | 45.55.110.124 |
ä»»æã®ãµããã¡ã€ã³ã䜿çšããå Žåãåãããã« CNAME ãèšå®ããŸãã
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
ãµããã¡ã€ã³å | CNAME | na-west1.surge.sh |
ãµããã¡ã€ã³ | çš®é¡ | å€ |
---|---|---|
ãµããã¡ã€ã³å | CNAME | geo.surge.world |
surge
ã®ã³ãã³ãã§ã¯ æ¥æ¬ã»æ±äº¬ ã®ãµãŒããŒnrt.surge.sh 172.104.96.133 ã衚瀺ãããŠããŸããã
æè¿è¿œå ããããµãŒããŒã§ã¬ã¹ãã³ã¹ããããããŸããã
2024幎11æçŸåšãgeo.surge.world ã na-west1.surge.sh ã§ã
æ¥æ¬ã»æ±äº¬ãµãŒããŒã¯åç §ããããã·ã³ã¬ããŒã«ã®ãµãŒããŒãéžæããŸãã
ãµã€ãã®å ¬é
ç°¡åãªäœ¿ãæ¹ã¯ Web ãµã€ããå
¬éãããã£ã¬ã¯ããªã«ç§»åããsurge
ãå®è¡ããŸãã
ç¹ã«ãã¡ã€ã«æ§æãå°ãªãå Žåããããã€æéããšãŠãéãã
æ°ç§ïœæ°åç§ã§çµãããŸãã
ããããæ¯åãã¡ã€ã«ããã¹ãŠã¢ããããŒãããä»æ§ã®ããã
ãã¡ã€ã«æ°ãå€ããªããšããã«å¿ããŠã¢ããããŒãæéãé·ããªã£ãŠããŸãã
ç¹ã«åç·ãæ··ãã§ããå Žåã¯å
¬éã«æ°åèŠããå Žåãããã
å·®åã¢ããããŒããèæ
®ãããŠããããGit ãçšããæ段ã®æ¹ã
çŽ æ©ããããã€ã§ããå ŽåããããŸãã
cd å
¬éãã£ã¬ã¯ããª
surge
æåã¯æ¬¡ã®é åºã§å°ããããŸãã
- ã¡ãŒã«ã¢ãã¬ã¹ ãã®ã¡ãŒã«ã¢ãã¬ã¹ã¯ Surge ããã®éç¥ããããŸãã
- ãã¹ã¯ãŒã åèªèšŒã®æã«å ¥åããŸãã
- ãããžã§ã¯ã ãã¹ å ¬éãããã£ã¬ã¯ããªãçžå¯Ÿæå®å¯èœã§ãã
- ãã¡ã€ã³ ãµããã¡ã€ã³.surge.sh ãŸã㯠ç¬èªãã¡ã€ã³ ãæå®ã§ããŸãã
åã³ surge
ãããå Žå㯠ãããžã§ã¯ã ãã¹ ãš ãã¡ã€ã³ ã®ã¿ã§ãã
ãã®åäœãçç¥ãããå Žåã¯ããŸã CNAME ãã¡ã€ã«ã«å
¬éãã¡ã€ã³åãå
¥ããŸãã
ãã㯠GitHub Pages ãšåã圢åŒã§ãã
example.surge.sh
https://
ãä»å ãããš https 匷å¶ã«ãªããŸãã
http ã§åç
§ããŠããå Žåãhttps ãžè»¢éããŸãã
https://example.surge.sh
ãã¡ããç¬èªãã¡ã€ã³ã䜿çšå¯èœã§ãã
example.com
www ãªãã®å Žåã www.example.com
㯠example.com
ãžè»¢éããŸãã
www ããã®å Žåã example.com
㯠www.example.com
ãžè»¢éããŸãã
ãããã£ãŠéåžžããããèæ
®ããå¿
èŠã¯ãããŸããã
CNAME ãã¡ã€ã«ãèšå®ããäžã§ãsurge
ã®åŸã«å
¬éãã£ã¬ã¯ããªåãå ããŸãã
äŸãã° ð Hugo ã¯éåžž public/ ãã©ã«ãå
ã« index.html ãªã©ã®å
¬éãã¡ã€ã«ãå
¥ããã®ã§ã
次ã®ããã«ã³ãã³ããå®è¡ããŸãã
hugo
surge public
çŸåšããã«ã¬ã³ããã£ã¬ã¯ããªãå
¬éããå Žåã¯å
¬éãã£ã¬ã¯ã㪠.
ã䜿çšã§ããŸãã
surge .
ããŒã¯ã³ã®çºè¡ã»äœ¿çš
å€éšãµãŒãã¹ãçšããŠãã«ãããSurge ãžãããã€ãããå Žåã
èªèšŒãè¡ã代ããã«ããŒã¯ã³ãçºè¡ããŠäœ¿çšããäºãã§ããŸãã
ãŸããã°ã€ã³ããŠããç°å¢ã§ surge token
ã§ããŒã¯ã³ãçºè¡ããŸãã
PS C:\Users\balloon> surge token
ããŒã¯ã³ã®æååã衚瀺
PS C:\Users\balloon> â
ãã®ããŒã¯ã³ã¯ã¡ãŒã«ã¢ãã¬ã¹ã»ãã¹ã¯ãŒãã®ä»£ããã§ãã
絶察ã«èª°ããèŠããå Žæãžå
¬éããªãã§äžããã
Web ãµãŒãã¹ã䜿çšããå Žåã¯éå
¬éã«ãªãããã«
ç°å¢å€æ°ãèšå®ã§ããããã«ãªã£ãŠããã§ãããã
surge
ã³ãã³ãã§ã®ãããã€ã§ã¯ --token ããŒã¯ã³
ãšããŸãã
surge å
¬éãã£ã¬ã¯ã㪠--token ããŒã¯ã³
管çãã¡ã€ã³äžèŠ§
surge list
ã§ã¡ãŒã«ã¢ãã¬ã¹ã§ç®¡çããŠãããã¡ã€ã³ãäžèŠ§è¡šç€ºããŸãã
surge list
ãã¡ã€ã³ã®åé€
surge teardown
ã§åé€ã§ããŸãã
surge teardown ãã¡ã€ã³å
ç»é²ããŠããã¡ãŒã«ã¢ãã¬ã¹ã«éç¥ãå±ããŸãã
誀ã£ãŠåé€ããŠããŸã£ãå Žåã§ã surge
ããªããã°å®¹æã«åŸ©æ§ã§ããŸãã
SurgeïŒCloudflare ã§éçšãã
Surge ã Cloudflare ããµã€ãæ°ã»ã¹ãã¬ãŒãžã»è»¢ééã«å¶éããããŸããã
ããã SurgeïŒCloudflare ã§éçšããæ倧ã®ã¡ãªãããšãªãããŸãã
Cloudflare ã¯æ±äº¬ã»å€§éªã«ãµãŒãããããã¬ã¹ãã³ã¹ãã¯ããã®ã§ã
ã§ããã ã Cloudflare ã®ãã£ãã·ã¥ã§è¿ãããã«ããã®ãçæ³çãšãªããŸãã
 Use Surge via Cloudflare #445 | sintaxi/surge Discussions
ãã®æ¹æ³ã¯ Surge åŽããããŠæšå¥šãããªã䜿çšæ¹æ³ã§ãã
ä»åŸã® Surge ä»æ§å€æŽã«ãã£ãŠããã®é
ç®ã¯åé€ããå¯èœæ§ããããŸãã
æ¬åœã«ä»å¿
èŠã§èšå®ãèŠãã人ã ãè¡ã£ãŠãã ããã
Surge ã® Cache-control
 Using Surgeâs automatic Lucid Caching | Surge
Surge ã§ã¯ HTTP ãããã® Cache-Control
ã¯æ¬¡ã«ãªã£ãŠããŸãã
çŸåšãããã¥ã¡ã³ãã®ããããŒãšã¯ç°ãªãããããè¿ããŸãã
Cache-Control: public, max-age=0, must-revalidate
 Understanding Origin Cache-Control | Cloudflare
ãããã£ãŠ Cloudflare 㯠max-age=0
ã®ãããšããžãµãŒãã«ã¯ãã£ãã·ã¥ããã
æ¯å Surge CDN ãåç
§ããäºã«ãªããŸãããããæšå¥šãããªãæ確ãªçç±ã§ãã
åã« Cloudflare çµç±ã«èšå®ããŠãã»ãšãã©å¹æããªãã®ã§ãã
ãã®ãŸãŸã ãšæµ·å€ã«ãã Surge ã®ãµãŒããžæ¯ååç
§ãã«ããäºã«ãªã£ãŠããŸãã
ãã£ããæ¥æ¬ã«ãã Cloudflare ãµãŒãã®ã¡ãªããã掻ããäºãã§ããŸãããã
é
ä¿¡ãµãŒããå¿
ã確èªãããããCloudflare ã®ãã£ãã·ã¥ãæèããã«
æŽæ°ãããææ°ãã¡ã€ã«ãå¿
ãé©çšãããç¹ã§ã¯ã¡ãªããããããŸãã
æŽæ°ãããŠããªãå Žå㯠Cloudflare ã®ãã£ãã·ã¥ããé
ä¿¡ããã
SurgeâCloudflare ã®ãã¡ã€ã«è»¢éããªãåãCloudflare ã§ã®å§çž®ãªã©ã§
ããã§ãããçšåºŠéãã¬ã¹ãã³ã¹ã«ãªã£ãŠããŸãã
ããããããã§ã Cloudflare ã®ãã£ãã·ã¥ãåªå ãããæ¹æ³ããããŸãã
CloudflareâSurge ã®æ€èšŒãç¡å¹ã«ãã
ãã® Cloudflare ã®ããŒãž  Interaction with other Cloudflare features å
ã®
ãEdge Cache TTLãã«ã¯æ¬¡ã®èšèŒããããŸãã
Edge Cache TTL Page Rules override s-maxage and disable revalidation directives if present.
ããšããžãã£ãã·ã¥ TTLããèšå®ããäºã§ãæ€èšŒããªãããäºãã§ããŸãã
æé㯠2æéïœ1ã¶æ ã§ãã
ãã®æéäžã¯é
ä¿¡ãµãŒããåç
§ãããããã¡ã€ã«ãæŽæ°ãããªããªããŸãã
é©çšããå Žåã Cloudflare 㧠察象ãã¡ã€ã³ ãéžæãã
ããŒãž ã«ãŒã«ïŒPage RuleïŒ ã§æ¬¡ã®èšå®ãè¡ããŸãã
- ãã¡ã€ã³å/*
- ãšããž ãã£ãã·ã¥ TTLïŒEdge Cache TTLïŒ
2æé ïœ 1ã¶æïŒ2 hours - a monthïŒ
.html ã sitemap.xml ããã£ãã·ã¥ã®å¯Ÿè±¡ã«ãã
 Cloudflareã®CDNã«ã€ããŠç解ãã | Cloudflare
äžããŒãžå
ã® Â ããã©ã«ãã§ãã£ãã·ã¥ããããã¡ã€ã«æ¡åŒµåã«ã€ããŠç解ãã ã«ã¯
ãã£ãã·ã¥ããæ¡åŒµåã決ãŸã£ãŠããŠã.html ã sitemap.xml ãå«ã .xml ã¯
ãã£ãã·ã¥ã®å¯Ÿè±¡ã«ãªã£ãŠããªãäºãèšèŒãããŠããŸãã
ãããã®ãã¡ã€ã«ããã£ãã·ã¥ã®å¯Ÿè±¡ãšãããå Žåã
ãCache Everythingããæå¹ã«ããŸãã
ãããé©çšããå Žåã Cloudflare 㧠察象ãã¡ã€ã³ ãéžæãã
ããŒãž ããŒã«ïŒPage RuleïŒ ã§æ¬¡ã®èšå®ãè¡ããŸãã
- ãã¡ã€ã³å/*
- ãã£ãã·ã¥ã¬ãã«ïŒCache LebelïŒ
Cache Everything
ãCache Everythingãã®æå¹ã¯
ãã¡ã€ã«ã®æŽæ°ã§ããã«åæ ãããªããªãäºã«ã泚æäžããã
ãã£ãã·ã¥ãæ¶å»ããå¿
èŠããããŸããïŒPurge CacheïŒ
ãããŠãããé©çšãããªãäºã§ã.html .xml ã¯å¿
ãé
ä¿¡ãµãŒããåç
§ãã
æŽæ°ãããããããã«åæ ãããããã«ããã®ãè¯ãã§ãããã
ãã©ãŠã¶ãã£ãã·ã¥
Cloudflare ã®ãã£ãã·ã¥ãæå¹ã«ããŠããå Žåããã©ãŠã¶ãã£ãã·ã¥ãå¹ããŸãã
Caching - æ§æ / Configuration å
ãã©ãŠã¶ ãã£ãã·ã¥ TTL / Browser Cache TTL ããã®èšå®ã§ãã
å
·äœçãªæéãèšå®ããå Žåããã®éã¯ãã©ãŠã¶ã®ãã£ãã·ã¥ãåªå
ãããŸãã
ãçŸåãã£ãã·ã¥ãåªå
ãã«ããå ŽåãSurge ã®ããããæå¹ã«ãªããŸãã
Cache-Control: public, max-age=31536000, no-cache
ããã«ããããœã³ã³ã§ã¯ Cloudflare ãŸã㯠Surge ãµãŒãã®åç
§ã
å¿
ãè¡ãããã«ãªããææ°ã®ãã¡ã€ã«ã衚瀺ãããäºãã§ããŸãã
HTML ãªã©æŽæ°ãå€ããã¡ã€ã³ã§ã¯ãçŸåãã£ãã·ã¥ãåªå
ããç¡é£ã§ã
ç»åå°çšã«å°çšã®ãã¡ã€ã³ãèšå®ããŠããå Žåã¯
ãã©ãŠã¶ãã£ãã·ã¥ã®æéãèšå®ããŠæå¹ã«ããã®ãå¹æçã§ãã
SSL/TLS ã®èšå®
Surge ã䜿çšããå ŽåãCloudflare ã® SSL/TLS å
ãã客æ§ã® SSL/TLS æå·åã¢ãŒããïŒour SSL/TLS encryption modeïŒã¯
ãã¬ã·ããã«ïŒFlexibleïŒä»¥å€ã« ãã«ïŒFullïŒ ãéžæã§ããŸãã
Surge ã§ã¯éåžžã§ã surge.sh
ãã¡ã€ã³åãã®èšŒææžãæäŸãããŠããããã
ããã䜿çšã㊠CloudflareïŒSurge éã® SSL ãçšããéä¿¡ãå¯èœã§ãã
SSL 蚌ææžã®çºè¡ã»ã¢ããããŒã㯠Surge ææãã©ã³ã®æ©èœãªã®ã§
ãã¡ã€ã³ã®èšŒææžã䜿çšããããã« (å³å¯)ãïŒFull (strict)ïŒã¯äœ¿çšã§ããŸããã
ïŒCloudflare ã§ãä»»æã® SSL 蚌ææžã䜿çšããã®ã¯ææãã©ã³ã®æ©èœã§ãïŒ
http: ã®åç
§ã https: ãžè»¢éããæ¹æ³ã¯
Cloudflare åŽã»Surge åŽäž¡æ¹ã§èšå®å¯èœã§ããã©ã¡ããäžæ¹ã䜿çšããŠäžããã
- Cloudflare 㧠SSL/TLS - ãšããžèšŒææžã»Edge Certificates å
ãåžžã« HTTPS ã䜿çšã»Always Use HTTPSãã ãªã³ã»On ã«ãã
Cloudflare åŽã§åŠçãããã®ã§ãé«éã¬ã¹ãã³ã¹ãæåŸ ã§ããŸãã - Surge ã®
surge
ã³ãã³ãã«æå®ãããŸãã¯CNAME
ã«å ¥ãããã¡ã€ã³åãhttps://ãã¡ã€ã³å
ã«ãããããã¯ç¡æãã©ã³ã§ãèšå®ã»äœ¿çšã§ããŸãã
ãµããã¡ã€ã³ã«ãã£ãŠ http éä¿¡ãå¿ èŠãšããå Žåã«æå¹ã§ãã
ãã®ä»ãã³ã
Surge 㧠301ã»302 転éã¯ææãã©ã³ã®ã¿ã§æäŸãããŠããŸããã
ãã㯠Cloudflare åŽã§ ããŒãž ã«ãŒã« ãŸã㯠Cloudflare Workers ãçšããŠå®çŸã§ããŸãã
ããŒãž ã«ãŒã« ã¯ç¡æ㧠3 ã€ãŸã§ã§ããããªã¯ãšã¹ãåæ°ã¯å¶éãªãã
Cloudflare Workers 㯠1 æ¥ 10 äžãªã¯ãšã¹ãã§ã
JavaScript ãçšããŠã®å¶åŸ¡ãªã®ã§ã现ããã¬ã¹ãã³ã¹ãèšå®ã§ããŸãã
äŸãã° ããŒãž ã«ãŒã« 㧠example.com
å
ãã¹ãŠãexample.net
å
ãž 301 転éããã®ã¯æ¬¡ã®èšå®ã«ãªããŸãã
example.com/*
- URL ã®è»¢é
301 - æ°žä¹ ãªãã€ã¬ã¯ã ãŸã㯠302 - äžæçãªãã€ã¬ã¯ã https://example.net/$1
*
éšåã $1
ã«å¯Ÿå¿ããŸãã
è€æ° *
ãããå Žåã$1
$2
$3
âŠâŠã§æå®å¯èœã§ãã
ïŒæ°åæå®ãªã®ã§é çªãå
¥ãæ¿ããäºãã§ããŸãïŒ
GitHub Actions ã§ãããã€ãã
GitHub Actions 㧠Surge ã䜿çšããå Žåã
Settings å
ã«ãã Secrets-Actions 㧠SURGE_LOGIN
ãš SURGE_TOKEN
ãèšå®ããŸããSURGE_LOGIN
㯠Surge ã®ãã°ã€ã³ã§äœ¿çšããã¡ãŒã«ã¢ãã¬ã¹ãSURGE_TOKEN
㯠surge token
ã³ãã³ãã§åŸãããŸãã
.github/workflows/deploy.yaml
ãšããŠã次ã®ãã¡ã€ã«ãè¿œå ããŸãã
å¿
èŠã«å¿ããŠãã«ãã³ãã³ããå ããŠäžãããsurge
å³ã® .
ã¯ã«ã¬ã³ããã£ã¬ã¯ããªã§ãã
name: Deploy Website
on: [push]
jobs:
deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: 18
- run: npm i -g surge
- run: surge . --token ${{ secrets.SURGE_TOKEN }}
以äžãããŒãžéå¶è
ã GitHub ãžå
¬éããŠãã
ð MkDocs ããã«ãããSurge ãžãããã€ãããµã³ãã«ã§ãã
ð fu-sen/Surge-MkDocs | GitHub
MkDocs ã¯ãã«ãäœæ¥ãšã㊠site
ãã£ã¬ã¯ããªãž HTML ãªã©ãçæããã®ã§ã
ãããã€ãã surge
ã®è¡ã¯ surge site --token ããŒã¯ã³
ãšãªããŸãã
- run: surge site --token ${{ secrets.SURGE_TOKEN }}
Q&A
Surge ã®ãµãŒãã¯ã©ãã«ããã®ã§ããïŒ
10 ã¶æã® CDN ãµãŒããååšããæ¥æ¬ã»æ±äº¬ãèšçœ®ãããŠããŸããã
ãŸã æ¥æ¬ã»æ±äº¬ã¯è©Šéšéçšæ®µéã®ããã§ãã¹ããã¯ãæªãã
ã¬ã¹ãã³ã¹ãè¯ããªãã®ã確èªããŠããŸãã
2024幎11æçŸåšãéåžžåç
§ããå Žåã«æ±äº¬ã®ãµãŒããŒã¯åç
§ãããã
äž»ã«ã·ã³ã¬ããŒã«ãä»ã«ã¢ã¡ãªã«ã»ã«ããã® CDN ãµãŒããåç
§ããŸãã
Surge ã§ã¯ããŒã ãµãŒããŒã§ CDN ãæ§æããŠããŸããã
䜿çšããŠããããŒã ãµãŒããŒã«ãã£ãŠã圱é¿ãåããŸãã
Google Public DNS ãªã©ã® ð Public DNS ã䜿çšããŠããå Žåã
ã¢ã¡ãªã«çã® CDN ãµãŒããŒãåç
§ãããããªãã§ãããã
ââ.surge.sh
ãš ââ.surge.world
ã¯å
±éã§ããã
å²ãåœãŠãããŠãã IP ã¢ãã¬ã¹ãç°ãªãå ŽåããããŸãã
 sintaxi/regions.txt | GitHub Gist
 Twitter @surge_sh
ç¬èªãã¡ã€ã³ãçšã㊠SSL ãå€éšãµãŒãã¹ã§æå¹ããå Žåã
ãã®ãµãŒããçµç±ããäºã«ã泚æäžããã
ãããã®ãµãŒãã§ããã  DigitalOcean ã䜿ãããŠããŸãã
ç¡æãã©ã³ã«ãã¡ã€ã³æ°ã»è»¢éæ°ã®å¶éã¯ãããŸããïŒ
Surge ã¯ç¡æãã©ã³ã§ãç»é²ãã¡ã€ã³æ°ã»è»¢ééã«å¶éãæèšãããŠããŸããã
ããçšåºŠã®éå¶èŠæš¡ã§ã¯ãããã Surge ã䜿çšãã倧ããªã¡ãªããã«ãªãããŸãã
ä»ã® Web ãµãŒãã¹ã§ã¯è»¢ééã§ãã©ã³ãå®ããŠããŸããã
Surge ãå
¬éãããåœåã¯ç¡æã® SSL ãµãŒã蚌ææž Let’s Encrypt ãéå§ãããŠããªãã£ãããã
ææ㧠SSL ãµãŒã蚌ææžãçºè¡ããŠããŸããããã¯çŸåšãç¶æãããŠããŸãã
ãµããã¡ã€ã³.surge.sh ã¯ã¯ã€ã«ãã«ãŒã蚌ææžã§è²»çšãåæžãã
ææãã©ã³ã§ã¯ãã¡ã€ã³ã«å¯Ÿå¿ããæåã® SSL ãµãŒã蚌ææžãæäŸããäºã§
ãµãŒãã¹ã®äºæ¥åãå®çŸããŠããŸãã
ããã ç¬èªãã¡ã€ã³ã® SSL ãææãã©ã³ãšãªã£ãŠããçç±ã§ãã
 [CLI] New Certificate Management Commands #446 | sintaxi/surge Discussions
2021幎3æçŸåš ãµããã¡ã€ã³.surge.sh 㯠Sectigo ã® SSL ãµãŒã蚌ææžãæ¡çšããŠããŸããã
éçºçã§ã¯ Let’s Encrypt ã®çºè¡ã»ç¢ºèªãå¯èœã«ãªã£ãŠããŸãããã ãææãã©ã³ã®ã¿ã§ãã
æ¥æ¬èªãã¡ã€ã³ã¯äœ¿çšã§ããŸããïŒ
䜿çšã§ããäºã確èªã§ããŠããŸãã
PunycodeïŒxn--
ã§ã¯ããŸãè±æ°ïŒã§èšå®ããŠäžããã
ãµããã¡ã€ã³.surge.sh ã䜿çšã§ããŸãã
æ¥æ¬èªãã¡ã€ã«ã»ãã©ã«ãã¯äœ¿çšã§ããŸããïŒ
åé¡ãªã䜿çšã§ããäºãããŒãžéå¶è ã確èªã§ããŠããŸãã
.pdf ãã¡ã€ã«ã Not Found ã«ãªããŸãã
 pdf files return 404 #257 | sintaxi/surge Discussions
éå»æ°çŸ GB ã® PDF ãã¡ã€ã«ãçšããæªçšããã£ãããã«ã
ããã©ã«ãã§ã¯ .pdf ãã¡ã€ã«ã衚瀺ã§ããªãããã«ãªã£ãŠããŸãã
åé¿æ¹æ³ãšããŠãã«ãŒãã®ç»é² surge card
ãè¡ãäºã§
ãã¯ã€ããªã¹ãã«ç»é²ããã.pdf ãã¡ã€ã«ã衚瀺ã§ããããã«ãªããŸãã
ããã§ã«ãŒããç»é²ããŠãããã©ã³ã®å€æŽãããªãéãã¯
課éã»è«æ±ãçºçããªãã®ã§å®å¿ããŠäžããã
PS C:\Users\balloon> surge card
Enter payment method to be used
card number: çªå·16æ¡
exp (mo/yr): æ/幎
cvc: 3æ¡
Success - Credit card set.
PS C:\Users\balloon> â
ããŒãžéå¶è
ãå®éã«ã«ãŒããç»é²ããŠ
.pdf ãã¡ã€ã«ã衚瀺ã§ããããã«ãªã£ãŠããã®ã確èªã§ããŠããŸãã
ã¯ã¬ãžããã«ãŒãã®ä»£ããã«ããããã«ãŒãã䜿çšå¯èœã§ãã
åç §ã§ããªããã¡ã€ã«ã»ãã©ã«ãããããŸãã
 Ignoring files and directories
ããã©ã«ãã§ã¯ .
ã§ã¯ããŸããã¡ã€ã«ã»ãã©ã«ãã Surge ã§ç¡çããŠããŸãã.surgeignore
ã§å¯ŸåŠã§ãããã§ããã
ãããè¡ã£ãŠã 410 Gone ã§è¿ãä»æ§ã«ãªã£ãŠããŠãæ©èœããªãäºã確èªããŠããŸãã
ä»ã« .git
ã node_modules
ãç¡èŠãããããã«ãªã£ãŠããŸãã
Not Found 衚瀺ãç¬èªã«å¶äœã§ããŸããïŒ
ã§ããŸãã 404.html ã§çæããŠäžããã
ç¡æãã¡ã€ã³ EU.org ã¯äœ¿çšã§ããŸããïŒ
ã§ããŸãããµã€ãéå¶è
ãå®éã«äœ¿çšããŠãã Web ãµã€ãããããŸãã
Cloudflare çµç±ã«ã㊠SSL 蚌ææžãé©çšã§ããŸãã
robots.txt ã®å¶éããªãã®ã§ãããããã§ãã
ð EU.org | ãµãããð FU-SEN
åç §ã§ããŸãã
2024幎ã«ãªã£ãŠããµãŒããŒã 503 ãè¿ããªã©ã§ãããŠã³ããŠããäºãå¢ãããã
ããŒã ãµãŒããŒã§è¿ã£ãŠãããµãŒããŒããããŠã³ããŠãããµãŒããŒãè¿ãããããŠ
åç
§ã§ããªããªãã±ãŒã¹ãçºçããããã«ãªã£ãŠããŠããŸãã
Surge ã«ã¯ã¹ããŒã¿ã¹ããŒãžãååšããŠããŸããã
ããã§ããŒãžéå¶è
ãçŸåšã® CDN ãµãŒããŒç¶æ
ãäžèŠ§ãã
Surge Status ãäœã£ãŠã¿ãŸããã
ð GitHub fu-sen/surge-status
CDN ã®ä»çµã¿äžãäžæçãªåé¡ã§ãéåžžæéã®çµéã§åç §ã§ããããã«ãªããŸãã
ããŒã ãµãŒããŒãç¹ã«èšå®ããŠããªãå Žåã
Google Public DNS ãªã©ã® ð Public DNS ã«å€æŽããŠã¿ããš
CDN ã®åç
§å
ãå€ãã£ãŠãåç
§ã§ããããã«ãªã£ããããŸãã
ç¬èªãã¡ã€ã³ïŒå«ã ð EU.org ãªã©ïŒãèšå®ããŠçºçããŠããå Žåã
A ã CNAME ã§èšå®ããŠããå Žåã¯ãSurge Status ã確èªã®äžã
æ£åžžã«åäœããŠããŠãæ¥æ¬ã«è¿ããµãŒããŒãèšå®ããŠã¿ãã®ãè¯ãã§ãããã