File: python3

package info (click to toggle)
libproxy 0.4.17-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 920 kB
  • sloc: cpp: 3,984; sh: 187; ansic: 111; cs: 71; makefile: 54; python: 53; perl: 42; ruby: 8
file content (34 lines) | stat: -rwxr-xr-x 997 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Copyright 2020 Simon McVittie
# SPDX-License-Identifier: LGPL-2.1+

set -eux
set -o pipefail

export _MM_DEBUG=1
export _PX_DEBUG=1

unset DESKTOP_SESSION
unset FTP_PROXY
unset GNOME_DESKTOP_SESSION_ID
unset HTTPS_PROXY
unset HTTP_PROXY
unset KDE_FULL_SESSION
unset NO_PROXY
unset ftp_proxy
unset http_proxy
unset https_proxy
unset no_proxy

if [ $# -lt 1 ]; then
    set -- python3
fi

for python in "$@"; do
    answer="$(http_proxy=http://proxy.example.net https_proxy=http://sslproxy.example.net "$python" ./debian/tests/resolve-proxy.py http://example.com)"
    test "$answer" = http://proxy.example.net
    answer="$(http_proxy=http://proxy.example.net https_proxy=http://sslproxy.example.net "$python" ./debian/tests/resolve-proxy.py https://example.com)"
    test "$answer" = http://sslproxy.example.net
    answer="$(http_proxy=http://proxy.example.net no_proxy=example.com "$python" ./debian/tests/resolve-proxy.py https://example.com)"
    test "$answer" = direct://
done