-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add descriptions and version to pac-file and rollback changes in dock…
…erfile
- Loading branch information
heikoschmidt
committed
Mar 11, 2024
1 parent
3e01b9b
commit 158e1f0
Showing
4 changed files
with
47 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
FROM python:3.11 | ||
|
||
RUN useradd --create-home --home /code pyapp | ||
USER pyapp | ||
WORKDIR /code | ||
COPY pyproject.toml requirements.txt README.md LICENSE ./ | ||
COPY ./src /src | ||
|
||
ENV VIRTUAL_ENV=/code/venv | ||
RUN python -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
RUN pip install --no-cache-dir --editable .[test] | ||
|
||
COPY --chown=app pyproject.toml requirements.txt ./ | ||
RUN mkdir src | ||
RUN pip install --editable .[test] | ||
WORKDIR /src/ | ||
|
||
COPY --chown=pyapp . . | ||
ENV PYTHONPATH=/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,60 @@ | ||
function FindProxyForURL(url, host) { | ||
/* | ||
Description: For the unittests, hopefully no real script should look like this. ;) | ||
Version: 1.0 | ||
*/ | ||
host = host.toLowerCase(); | ||
if ( | ||
localHostOrDomainIs(host, "example.com") | ||
|| localHostOrDomainIs(host, "foo.example.com") | ||
|| localHostOrDomainIs(host, "foo.example.net") | ||
) { return "PROXY domain-overlaps.example.com"; } | ||
) { | ||
/* here domains overlap with the default route */ | ||
return "PROXY domain-overlaps.example.com"; | ||
} | ||
if ( | ||
localHostOrDomainIs(host, "example.net") | ||
|| localHostOrDomainIs(host, "bar.example.com") | ||
|| localHostOrDomainIs(host, "bar.example.net") | ||
) { return "PROXY mixed.example.com"; } | ||
) { | ||
/* a proxy for mixed matches, this should be split up */ | ||
return "PROXY mixed.example.com"; | ||
} | ||
if ( | ||
dnsDomainIs(host, ".example.com") | ||
) { return "DIRECT"; } | ||
) { | ||
/* take the direct route */ | ||
return "DIRECT"; | ||
} | ||
if ( | ||
host.substring(0, 3) === "10." | ||
|| host.substring(host.length - 8) === ".102.123" | ||
|| host === "10" | ||
) { return "PROXY string.example.com"; } | ||
) { | ||
/* a proxy for string matches */ | ||
return "PROXY string.example.com"; | ||
} | ||
if ( | ||
dnsResolve(host) === "192.0.0.170" | ||
|| dnsResolve(host) === "192.0.0.171" | ||
|| dnsResolve(host) === "127.0.0.1" | ||
) { return "PROXY ip.example.com"; } | ||
) { | ||
/* a proxy for IPs */ | ||
return "PROXY ip.example.com"; | ||
} | ||
if ( | ||
isInNet(host, "20.10.10.0", "255.255.255.0") | ||
|| dnsResolve(host) === "130.131.132.133" | ||
) { return "PROXY mixed.example.com"; } | ||
) { | ||
/* a proxy for mixed matches, this should be split up */ | ||
return "PROXY mixed.example.com"; | ||
} | ||
if ( | ||
isInNet(host, "93.184.0.0", "255.255.0.0") | ||
|| isInNet(host, "2001:db8:85a3:8d3::", "ffff:ffff:ffff:ffff::") | ||
) { return "PROXY netmask.example.com"; } | ||
) { | ||
/* a proxy for netmask */ | ||
return "PROXY netmask.example.com"; | ||
} | ||
return "PROXY default.example.com"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters