ãªã¢ã¼ãæ¥ç¶å¯è½ãªèªå® éçºãµã¼ãã¼ãç°¡åã«å®ç¾ã§ããTailscale
ããã¾ã§æ¬ããã°ã§ã¯VScode Remote extensionsãåæã«ãã¦Hyper-VãWSL2ãªã©ã®VMã«æ¥ç¶ããæ¹æ³ããVSCode workspacesãå©ç¨ãã¦å¤é¨ãµã¼ãã¼ãèªå® ã«è¨ç½®ãããµã¼ãã¼ã«æ¥ç¶ããæ¹æ³ãç´¹ä»ãã¦ãã¾ããã
ãã®ä¸ã§ã¦ã§ããµã¼ãã¹éçºããä¸ã§æãå¹çãè¯ãéçºç°å¢ã¯Linuxå ¥ããéçºå°ç¨ãã·ã³ãèªå® ã«ããã¦ãããã«VScode Remoteã使ã£ã¦æ¥ç¶ããã¨ããæ¹æ³ã§ããããããå®ãã¼ãã¦ã§ã¢ä¸ã§åãã®ã ããéãã«æ±ºã¾ã£ã¦ã¾ããã§ãããèªå® ã«ãµã¼ãã¼ãè¨ç½®ãã¦å¤é¨ããæ¥ç¶åºæ¥ãããã«ããã®ã¯ã»ãã¥ãªãã£é¢çãèããã¨æéãããããã¨ããçç±ã§èªå® å¤ããã®æ¥ç¶ã§ã¯Codespacesã®å©ç¨ãæ¤è¨ãã¦ãããã§ããã
Tailscaleã¨ããç¦é³
ãããªä¸ãã¡ããã©VS Codespacesã®è¨äºãå ¬éãããããã§TLã«æµãã¦ãããã¤ã¼ããã以ä¸ã®è¨äºãè¦ã¤ããTailscaleã®åå¨ãç¥ãã¾ããã
Tailscaleã¯SaaSåã®VPNã¨ãã£ãã¨ããã§ãããããæ©é試ãã¦ã¿ãã¨ããã®è¨äºã®éãã«ã»ãã¨ç°¡åã«èªå® ãããã¯ã¼ã¯å¤ãããsshã§æ¥ç¶ãã§ãããããæ³å以ä¸ã«åä½ã軽快ã§ãããVScode Remote-SSHã使ã£ã¦èªå® å¤ããä½æ¥ãã¦ãã¦ãã»ã¨ãã©æ°ã«ãªããªãã¬ãã«ã§ããã¾ããèªå® ãããã¯ã¼ã¯å ã§ãTailscaleã§å²ãæ¯ãããIPããã®ã¾ã¾ä½¿ã£ã¦sshæ¥ç¶åºæ¥ãã®ã§ãVS Codespacesã®ã¨ãã«çºçãããããªåä¸ç©çãã·ã³ã ãã©æ¥ç¶ããæ¹æ³éãã®ã§å¥ã®ãã¹ãã¨è¦ãªããããã¨ããåé¡ãç¡ããªãã¾ãããããäºé±é以ä¸ãèªå® å¤ã§ãèªå® å ã§ãTailscaleçµç±ã§éçºãã·ã³ã«ã¤ãªãã§éçºãã¦ã¾ããããªãã®åé¡ãããã¾ããããããå人å©ç¨ãªãç¡æãã©ã³ã®ç¯å²ã§ååã§ãã
è¨å®ããã¾ãã«ç°¡åã§ãä¸è¨ããã°ã«ããããã«Talscaleã¯ã©ã¤ã¢ã³ããç«ã¡ä¸ããç¶æ ã§è¨å®ãããIPã«å¯¾ãã¦sshããã°ããã ããTailscaleãå©ç¨ãããã¨ã§éçºç¨ãµã¼ãã¼ã¨vscodeãã¿ã¼ããã«ãåããããã®ãã·ã³ãåé¢ãããã¨ãã§ãããããèªå® ã«éçºå°ç¨ã®ãµã¼ãã¼ãè¨ç½®ããã¨ãããã¨ãä»äºä¸åé¡ãªãå ´åã«ã¯å¤åºæå©ç¨ã®ãã¼ãPCã¹ããã¯ã«æ©ããã¨ããåé¡ã解æ¶ãããããããã¾ããã
Tailscaleã®ä»çµã¿
ã¨ãããã¨ã§ããã¾ã§ã¯ãTailscale使ã£ã¦ã¿ãããªè¨äºã§ãããå©ç¨æã«ã¯ãWireGuard使ã£ã¦ããµã¼ãã¹ããããã®èªèããæã£ã¦ãã¾ããã§ãããã使ã£ã¦ã¿ãã¨éåã¨éãã®ã§ä»çµã¿ãæ°ã«ãªããtaiscaleãå ¬éãã¦ãã "How Tailscale works" ã¨ããè¨äºãèªãã§ã¿ã¾ããã
è±èªã§æ¸ããã¦ããä¸ãããªãã®åéãããã¾ããå¾ååºã¦ããä¼æ¥åãæ©è½ã®èª¬æã¯çãã¦ã大çã«ã¤ãã¦ãã¤ã³ããã¾ã¨ããã¨ãããªæãã«ãªãã§ããããã
- éä¿¡çµè·¯ã®æå·åã¯UDPãã¼ã¹ã®VPNã§ããWireGuardãå©ç¨
- å®è£ 㯠wireguard-goãå©ç¨ãã¦ãã
- VPNã§æ§ç¯ãããä»®æ³ãããã¯ã¼ã¯ã¯Hub&Spokeåã§ã¯ãªããã¡ãã·ã¥ãããã¯ã¼ã¯ãæ¡ç¨
- ãã¼ãéã®éä¿¡ã¯ãã¼ãå士ã1ï¼1ã§è¡ã
- Tailscaleãæä¾ããCoordination Serverãåã¯ã©ã¤ã¢ã³ããçæããå ¬ééµã¨åãã¼ãéã®æ¥ç¶è¨±å¯åã³ç¦æ¢ãªã¹ãã管çãã¦ãã¦ãå ¨ãã¼ãã«é å¸ãã
- åãã¼ãã¯ä»ã®ã¯ã©ã¤ã¢ã³ãããå±ãããªã¯ã¨ã¹ããå
¬ééµã«ãã£ã¦è§£èª
- 解èªã§ããªããã°éä¿¡ã§ããªã
- Tailscaleã¦ã¼ã¶ã¼ã¯ããããå°ç¨ã®ãã¡ã¤ã³ï¼ãããã¯ã¼ã¯ç©ºéï¼ãä¸ãããã
- ææãã©ã³ã ã¨ãã¼ã ãçµãã§è¤æ°ã¦ã¼ã¶ã§å ±æå¯è½ãªæ¨¡æ§
- Tailscaleã¦ã¼ã¶ã¼ã®èªè¨¼ã¯Cordination Serverã¨ã¯å¥ã«Auth Serverãè¡ã
- Auth Serverã¯å¤é¨ãããã¤ãã§ã®ãã°ã¤ã³ã2FAã«å¯¾å¿
- åãã¼ãéã®éä¿¡ã¯NATè¶ãã«å¯¾å¿ãã¦ãã
- NATè¶ãã«é¢ããç¹å¥ãªå¯¾å¿ã¯ä¸è¦
Tailscaleçµç±ã§ã®sshéä¿¡ãé常ã«é«éãªã®ã¯ãã¼ãã¨ãã¼ããç´æ¥éä¿¡ãè¡ãããã ã£ããã§ããããã¡ãããCordination serverã¨ãã¼ãã®èªè¨¼ãè¡ãããããã§ããããªã¼ãã¼ãããã¯ä½ãããã§ãããã®ãããèªå® ãããã¯ã¼ã¯å ã§ãæ°ã«ããã«Tailscaleçµç±ã®éä¿¡ãå©ç¨ãããã¨ãã§ããèªå® å¤ããã®ã¢ã¯ã»ã¹ãå¤åºå ããèªå® ã«ã¼ã¿ã¼çãçµç±ããç´æ¥éä¿¡ã¨ãªããããç¡é§ã®ãªãéä¿¡ã¨ãªããVS Codespacesãªã©ããããªã¼ãã¼ãããã¯å°ããæããããã¨ãããã¨ã«ãªãããªã¨æãã¾ãã
ãªããTailscaleã®ä¾¡æ ¼è¨å®ãè¦ãã¨ã¡ã¤ã³ã¿ã¼ã²ããã¯ä¼æ¥ã®ããã§ãä¸ã«ãæ¸ããããã«å人å©ç¨ã§ããã°ç¡æãã©ã³ã§ååã§ããç¡æãã©ã³ã§ãAWS, Azure, GCPãªã©ä¸»è¦ã¯ã©ã¦ããµã¼ãã¹ã«å¯¾å¿ãã¦ããã®ã§ãèªå® ã«å®æ©ç½®ããããªãã£ãããè¨ç®ãªã½ã¼ã¹ã欲ããã¨ãã ã試ãã¦ã¿ããã¨ããæ¹ã¯ã¯ã©ã¦ãä¸ã§ä»®æ³ãã·ã³ã使ãã¨ããé¸æãããã§ããã
2019å¹´ã«ç«ã¡ä¸ãã£ãã¾ã è¥ãä¼ç¤¾ãªä¸ãæ¯è¼çæ°ããVPNæè¡ã®WireGuardãæ¡ç¨ã¨ãããã¨ã§ã¾ã ã¾ã VPNå©ç¨æã®æ¤è¨åè£ã«ä¸ããã¥ãããµã¼ãã¹ããããã¾ããããé å¼µã£ã¦æ¬²ããã§ããã