reach own docker daemon over tcp on socket-proxy setups; re-run host detection when an environment is added or edited; keep scanner on the host socket
This commit is contained in:
8 files changed
+277
-84
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Pure host-path helpers. NO db / docker import, so unit-testable directly
|
||||
* (importing host-path.ts pulls in the DB layer and would boot the database).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether an environment can be used to inspect Dockhand's OWN container over a
|
||||
* plain tcp:// address (the socket-proxy fallback, #1203/#1204). Only plain-http
|
||||
* `direct` envs qualify: socket envs give no host:port (and we have no socket to
|
||||
* reach anyway), https/mTLS envs need certs a bare tcp:// would drop, hawser envs
|
||||
* are remote agents.
|
||||
*/
|
||||
export function isSelfInspectCandidate(env: {
|
||||
connectionType?: string | null;
|
||||
protocol?: string | null;
|
||||
host?: string | null;
|
||||
port?: number | null;
|
||||
}): boolean {
|
||||
return env.connectionType === 'direct'
|
||||
&& (env.protocol ?? 'http') === 'http'
|
||||
&& !!env.host && !!env.port;
|
||||
}
|
||||
Reference in new issue
Block a user