mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
A group's links are links in each member's state, marked as the group's (a sixth field, ,group), so the link session, the proxy's list and every connection check treat them as any link. Membership is each member's own state (group, group_as), so a VM made again is in none. - internal/vm/groups.go: Groups (Show, Join, Leave), groupLinks (pure: the user's links kept and taking precedence, a link per published port of each other member, one address per member kept across changes), sync/syncVM/change (records, names what each member gains and loses, applies to running members), clashes warned. - All or none: join refused by network policy (group_policy_on/off); devvm network on/off refused for a member (group_policy_mixed). - One group at a time (group_other); names unique in a group (group_name_taken, group_name_host); a member whose hostname is another's name gets no links to it (group_link_name_host). - CheckLink refuses a group's link once the two aren't in one group (ungrouped); leave removes the leaver's own group links first; join again works every member's links out again; link rm refuses a group's link that still applies (link_from_group). - Publish/unpublish, link add/rm and devvm rm reach the group's links. - Docs: using/links.md Groups, the Commands page, safety/network.md, internals/ports.md, the design note's Groups section and threat check; the CLI reference. - Tests: groups_test.go, testdata/script/group.txtar, JSON shape; e2e: three VMs in a group and the all-or-none refusals in the link section on every backend. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1.8 KiB
1.8 KiB
title, weight
| title | weight |
|---|---|
| devvm network | 27 |
Show or change the network policy of this folder's VM
Synopsis
Show the network policy of this folder's VM, which is on, off or unenforced, and then its allowlist, file by file. devvm network on or off changes it from the VM's next start, such as with devvm restart. With -g, show or change whether new VMs get network policy instead: ask, on or off.
devvm network [on|off] [flags]
Examples
devvm network # show the VM's network policy and allowlist
devvm network allow example.com # let the VM reach example.com
devvm network log --blocked # list what the VM's network policy blocked
devvm network off # turn network policy off from the VM's next start
devvm network -g on # give every new VM network policy without asking
Options
-g, --global show or change whether new VMs get network policy instead
-h, --help help for network
--json print it as one JSON object, for scripts
Options inherited from parent commands
--no-input never ask, and fail where devvm would ask, naming the flag that answers it
-v, --verbose show the output of the commands devvm runs instead of a status line
Docs
The docs page for devvm network explains it in full.
See also
- devvm: Open a shell in this folder's VM, creating it first
- devvm network allow: Allow hosts for this folder's VM
- devvm network deny: Deny hosts for this folder's VM
- devvm network log: Show what this folder's VM connected to and what its network policy blocked
- devvm network rm: Remove rules from this folder's VM