mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-01 13:17:21 +02:00
fix: unexposed containers with existing proxy rule
This commit is contained in:
parent
73e6530862
commit
a98d86a303
@ -268,26 +268,28 @@
|
|||||||
|
|
||||||
// add the container to the networked list, using it's name as address
|
// add the container to the networked list, using it's name as address
|
||||||
container.Ports.forEach((portObject) => {
|
container.Ports.forEach((portObject) => {
|
||||||
// skip unexposed ports if the checkbox is not checked
|
|
||||||
if (!portObject.PublicPort && !$showUnexposed.is(":checked")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const port = portObject.PublicPort || portObject.PrivatePort;
|
const port = portObject.PublicPort || portObject.PrivatePort;
|
||||||
const key = `${containerName}:${port}`;
|
const key = `${containerName}:${port}`;
|
||||||
|
|
||||||
if (existingTargets.has(key) && !existingEntries[key]) {
|
// always include existing proxy-rule targets
|
||||||
existingEntries[key] = {
|
if (existingTargets.has(key)) {
|
||||||
name: containerName,
|
if (!existingEntries[key]) {
|
||||||
ip: containerName,
|
existingEntries[key] = {
|
||||||
port,
|
name: containerName,
|
||||||
};
|
ip: containerName,
|
||||||
} else if (!networkedEntries[key]) {
|
port,
|
||||||
networkedEntries[key] = {
|
};
|
||||||
name: containerName,
|
}
|
||||||
ip: containerName,
|
}
|
||||||
port,
|
// otherwise, include only if exposed or checkbox is checked
|
||||||
};
|
else if (portObject.PublicPort || $showUnexposed.is(":checked")) {
|
||||||
|
if (!networkedEntries[key]) {
|
||||||
|
networkedEntries[key] = {
|
||||||
|
name: containerName,
|
||||||
|
ip: containerName,
|
||||||
|
port,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user