* don't advertise IPv6 in VNet when IPv6 is disabled on host
* show ipv6 disabled in VNet diag report
* add platformHostIPv6Disabled stub for unsupported OSes
* fix some nits
* allow RunTestBackgroundTask to be used from benchmarks
* reuse fakeTUN packet buffers via sync.Pool to avoid benchmark alloc noise
* add network stack throughput benchmark
* bump gvisor version
* use AsViewList to drop the [][]byte alloc per outbound packet
* do go mod tidy
* fix some nits
* add 512 B chunk case to netstack throughput benchmark
* add dns diagnostic check proto
* add DNSServerSuffix and DNSServerPort constants
* handle dns diagnostic probe queries
* add dns diagnostic check
* enable dns diagnostic check in Connect
* run dns diagnostic check in tsh vnet
* render dns diagnostic check in Connect
* fix some nits
* move ssh diag check after dns check
* handle dns diagnostic probe A queries
* add dns diagnostic check proto for A queries
* refactor dns diagnostic check to also check A records
* refactor Connect to also render dns diagnostic A records
* drop trailing dot from dns diag probe
* add tests for dns diag text rendering
* do not fail dns diag if any nameserver is reachable
* Adjust spacing between DNS diag success/warning rows
* fix some nits
* improve rendering of dns reachability errors
---------
Co-authored-by: Maja Cieślak <maja.cieslak@goteleport.com>
* lib/vnet: add `EmbeddedVNet` type
* lib/vnet/dns: make it possible to use `/etc/resolv.conf` on Linux
* Use FakeHostNetwork in vnet_test.go
* Close host-side TUN
* Link to the `/etc/resolv.conf` man page
* Extend the host network ready timeout for CI
* Stop using global logger unnecessarily
* Fix spelling mistakes in doc comments
* first build
* add d-bus daemon for vnet
* set up dns server via systemd-resolved d-bus api
* get DNS upstreams via systemd-resolved API
* never forward DNS requests to self
* refactor: move all systemd-resolved logic to a separate package
* refactor: move all polkit logic to a separate package
* filter systemd-resolved loopback upstreams
* add scope for link-local IPv6 adresses for upstreams
* comment updates, small fixes, and typo cleanup
* return uid from D-Bus authorize func
* add typed constants for systemd unit states
* avoid using canceled context for stopping VNet daemon
* refactor: do not store ctx in dbusDaemon
* Improve dbusDaemon lifecycle handling
* Log errors from `dbusDaemon.Wait`
* refactor: reuse shared darwin/linux code for admin process
* reintroduce isDiagSupported
* refactor logging errors from dbusDaemon.Wait
* do not return error for missing TUN during deconfigure
* use d.conn.Context()
* avoid using bare slog logger
* avoid mutating cached upstream nameserver slices
* fix race between dbus Start and Stop
* small fixes
* some refactoring
---------
Co-authored-by: Nic Klaassen <nic@goteleport.com>
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Prepare values and functions to be reused
* Initialize VNet config service before NewGRPCServer
* Initialize VNet config
* Add test for getting VNet config as a user
* Remove extra require.NoError
* Support os_log in lib/utils.InitLogger
* Refactor code for getting bundle identifier
* Rename DaemonLabel to VNEDaemonLabel
Rename the Obj-C function so that we can add a C function called
DaemonLabel later. The C function will be called from Go code.
* Use os_log in VNet daemon
* Adjust logging preferences of VNet daemon
* Clean up logger components in lib/vnet
* lib/teleterm/vnet: Collect CIDR ranges while listing DNS zones
This will be used for the diagnostic report.
* Include IPv6Prefix in NetworkStackInfo
* Refactor RouteConflict into a protobuf struct
* Add protos for diagnostic report
* Add Diagnostician for generating diag report
* Add netstat command for route conflict check
* Send diag report from tshd to Electron app
* Remove unnecessary Diagnostician struct
* Return nil instead of an empty slice
* s/is supposed to return/returns/
* Capture stderr of failed command attempt
* Check if command stdout and stderr are valid UTF-8 text
* Add RunDiagnostics RPC
* Add button for running diagnostics
* Return network stack info from runPlatformUserProcess
This will allow teleterm's VNet service to read the interface name after
VNet is started.
* Add route conflict diag check
* Run route conflict diag check from teleterm's VNet service
* Add hidden diag flag to tsh vnet
* Inline CheckAndSetDefaults of RouteConflictConfig
* Add comment for RunDiagnostics RPC
* Reduce indentation in vnetCommand.run by returning early
* Add godocs
* Depend on the default split function
* Log and skip invalid route messages
* Keep exported APIs in platform-independent file
* Make NetworkStackInfo platform-independent
* Fix Go and JS linters
* Adjust title for disabled button
* Adjust check for interface name in teleterm's service
* Use teleport.Component for logger name
* Add godoc for DarwinRouting
* Use `unstable.` instead of `feature.` as app config prop prefix
Users are less likely to enable something called `unstable` than
`feature`.
* [vnet] remote app provider
* use fully qualified domain for non-matching app
* make errNoTCPHandler a trace error
* fix license headers
* remove explicit trail calls, rely on gRPC interceptors
* wrap error
* add comment on signer cache lifecycle
* fix imports
* make test client app grpc service listen on localhost
* remove test 100ms dial timeout for ci
* [vnet] refactor AppProvider for Windows implementation
* allow empty cert pool
* fix unconvert lint
* fix root cluster ca pool
* edit log message
* return errors when failing to get appinfo for matching app
* edit comment on ClientApplication interface
* add missing license header
* chore: restructure vnet for windows support
In preparation for adding Windows support to VNet, I have restructured
the package/file structure a bit in a way that I think makes more sense
and narrows the scope of OS-specific code.
I also unexported some identifiers that did not need to be exported, in
an attempt to make it more clear what is actually called from outside
the vnet package.
This commit does not make any functional changes except for adding the
hidden `tsh vnet` and `tsh vnet-admin-setup` commands on windows that
will just return errors.
* fix renames in comments
* switch reexec to escalate
* fix-imports