mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-07 21:19:03 +02:00
Private connection working with traefik
This commit is contained in:
@@ -1696,7 +1696,7 @@ export async function getTraefikConfig(
|
|||||||
const srKey = `inference-sr${sr.siteResourceId}`;
|
const srKey = `inference-sr${sr.siteResourceId}`;
|
||||||
const routerName = `${srKey}-router`;
|
const routerName = `${srKey}-router`;
|
||||||
const serviceName = `${srKey}-service`;
|
const serviceName = `${srKey}-service`;
|
||||||
const rule = `Host(\`${fullDomain}\`) && ClientIP(${exitNode.address})`; // restrict to coming from the exit node ip range that the client is connected to
|
const rule = `Host(\`${fullDomain}\`) && ClientIP(\`${exitNode.address}\`)`; // restrict to coming from the exit node ip range that the client is connected to
|
||||||
|
|
||||||
let tls: any = {};
|
let tls: any = {};
|
||||||
if (!privateConfig.getRawPrivateConfig().flags.use_pangolin_dns) {
|
if (!privateConfig.getRawPrivateConfig().flags.use_pangolin_dns) {
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ async function resolveTarget(host: string): Promise<ResolvedTarget | null> {
|
|||||||
.from(siteResources)
|
.from(siteResources)
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
eq(siteResources.alias, host),
|
eq(siteResources.fullDomain, host),
|
||||||
eq(siteResources.mode, "inference"),
|
eq(siteResources.mode, "inference"),
|
||||||
eq(siteResources.enabled, true)
|
eq(siteResources.enabled, true)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -421,7 +421,10 @@ export default function PrivateResourcesTable({
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (resourceRow.mode === "http") {
|
if (
|
||||||
|
resourceRow.mode === "http" ||
|
||||||
|
resourceRow.mode === "inference"
|
||||||
|
) {
|
||||||
const domainId = resourceRow.domainId;
|
const domainId = resourceRow.domainId;
|
||||||
const fullDomain = resourceRow.fullDomain;
|
const fullDomain = resourceRow.fullDomain;
|
||||||
const url = `${resourceRow.ssl ? "https" : "http"}://${fullDomain}`;
|
const url = `${resourceRow.ssl ? "https" : "http"}://${fullDomain}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user