링크나 환경 주소 넘겨받기
새로운 박스에서는 sandbox_wire가 링크나 커넥터를 거쳐 밖으로 나가던 이름을 그 자리에서 박스 안의 내 프로세스나 게시한 버전으로 바꿀 수 있어요. 박스의 URL은 바뀌지 않아요.
sandbox_status → health.features에 take-over가 있는 박스(2026-09-25 12:40 UTC 이후에 시작한 박스는 모두 있어요. 이미지는 box-202609251946. 박스는 시작할 때의 boxd를 계속 쓰고, 동결됐다가 풀려도 마찬가지예요)에서는, 지금 링크를 거치든 커넥터를 거치든 박스 밖으로 나가는 이름을 sandbox_wire로 박스 안의 서비스가 쓰게 할 수 있어요:
sandbox_wire { "id": "<id>", "service": "billing.acme.internal", "port": 8080, "targetPort": 8081 }
sandbox_wire { "id": "<id>", "service": "billing.acme.internal", "port": 8080, "version": "refund-a1b2c3d", "env": { "WORKERS_ENABLED": "false" } }
- 첫 번째는
targetPort에서 실행 중인 내 프로그램이고, 두 번째는 게시한 버전이에요(env와containerPort는 평소처럼 쓸 수 있어요). 그name:port가 지금 링크나 환경 주소라면 두 방식 모두 그 이름을 그 자리에서 넘겨받아요. - 이름은 박스 안에서 원래 주소를 그대로 유지하므로, DNS 결과를 캐시한 프로그램도 그대로 닿아요. 이후에는 박스 안의
targetPort에 닿아요. - 링크나 커넥터를 거쳐 열려 있던 연결은 닫혀요. 프로그램이 다시 연결하면 이번에는 박스 안의 것에 닿아요.
- 링크는 더 이상 링크가 아니에요.
sandbox_status.services에서fromBox와fromPort가 빠지고, 다른 박스의linkedFrom에도 이 박스가 더는 나오지 않아요. 박스의 URL은 바뀌지 않아요. - 넘겨받기는 이름이 밖으로 나가는 그 포트에서 해야 해요. 다른 포트로 호출하면 실패해요:
<name> is reached through the connector or a link on port [<port>]; a name cannot be a service in the box on port <n> and go out on another. 이름이 여러 포트로 밖에 나갈 때(예를 들어 환경에db.internal:5432와db.internal:6432가 있을 때)는 그중 하나만 넘겨받을 수도 없어요:<name> is also reached through the connector or a link on port [<port>]; a name cannot be a service in the box on one port and go out on another. 하나의 이름이 한 포트에서는 박스 안의 서비스이고 다른 포트에서는 밖으로 나갈 수는 없어요. 그런 이름은sandbox_start에서 선언하세요. 거기서는 모든 포트가 박스를 향해요. - 링크인 이름에서
mode를 바꾸면 항상 409예요:<name> is a link in this box, which has no box or external mode. Wire it again with fromBox or fromPort to change where it goes, or pass port (and targetPort) to run the service in the box instead.
그보다 오래된 박스(health.features에 take-over가 없음)에서는:
- 링크인 이름에
port를 넣으면 409<name> is a link in this box, and box <id> runs boxd <version>, which cannot turn a link into a service in the box. Wire it again with fromBox or fromPort to change where it goes, or start a new box that declares the service,version을 넣으면<name> is a link in this box, and box <id> runs boxd <version>, which cannot turn a link into a published version. Start a new box that declares the version, or wire the link again with fromBox or fromPort가 돼요. port나version으로 추가한 이름이 환경 주소라면 계속 커넥터를 거쳐 나가요. 그런 이름은sandbox_start에서 선언하세요.
모든 도구와 주제는 도구 레퍼런스에 정리돼 있어요.