Skip to content

Commit 5e45ed3

Browse files
author
hastmu
committed
updated README for reflecting change including #5
1 parent c07e4d3 commit 5e45ed3

File tree

1 file changed

+109
-37
lines changed

1 file changed

+109
-37
lines changed

README.md

Lines changed: 109 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ this dedicated URL as some proxies may have white/black lists or just not got co
8888
right or outdated for the new stuff to be checked out.
8989

9090
In case a proxy is not serving the URL it is drop for this dedicated URL.
91+
Latest version also cache the none-proxy state for 60 seconds, accepting the fact
92+
that there is currently no proxy around which can serve the request.
9193

9294
The found (via avahi-browse _apt_proxy._tcp) proxies are cached in case this has the
9395
wrong owner it is ignored and a waring is issued.
@@ -109,52 +111,122 @@ export DEBUG_APT_PROXY_DETECT=1
109111
sudo apt update
110112
```
111113

112-
looks like
114+
looks like (first run)
113115

114116
```
115117
dev@dev:~$ export DEBUG_APT_PROXY_DETECT=1
116118
dev@dev:~$ sudo apt update
117119
# INFO-TAG MS : MESSAGE
118-
[ INFO][ 2]: ===--- apt-proxy-detect ---===
120+
[ INFO][ 1]: ===--- apt-proxy-detect ---===
119121
[ TEST-URL][ 16]: URL: http://packages.microsoft.com/repos/code/dists/stable/InRelease
120-
[ HASH][ 25]: HASH: c0b917f192fa7cccb3f536f2c01b824d of (http://packages.microsoft.com)
121-
[ CACHE][ 30]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
122-
[ CACHE-AGE][ 33]: age: 687 sec
123-
[ CHECK-PROXY][ 35]: Checking proxy (http://192.168.0.27:8000) with testurl (http://packages.microsoft.com/repos/code/dists/stable/InRelease)
124-
[ WORKS][ 127]: give back cached proxy
125-
[ PROXY][ 131]: return http://192.168.0.27:8000
126-
[ INFO][ 3]: ===--- apt-proxy-detect ---===
127-
[ TEST-URL][ 20]: URL: http://download.proxmox.com/debian/pve/dists/bookworm/InRelease
128-
[ HASH][ 34]: HASH: 17b43db99b56eb6355d41861f4f304d0 of (http://download.proxmox.com)
129-
[ CACHE][ 41]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
130-
[ CACHE-AGE][ 44]: age: 687 sec
131-
[ CHECK-PROXY][ 47]: Checking proxy (http://192.168.0.27:8000) with testurl (http://download.proxmox.com/debian/pve/dists/bookworm/InRelease)
132-
[ WORKS][ 461]: give back cached proxy
133-
[ PROXY][ 464]: return http://192.168.0.27:8000
134-
[ INFO][ 3]: ===--- apt-proxy-detect ---===
135-
[ TEST-URL][ 17]: URL: http://local-repo.fritz.box/local-repo/dists/trunk/InRelease
136-
[ HASH][ 25]: HASH: 2bfbb1335aaf9d333a5c9498226eb208 of (http://local-repo.fritz.box)
137-
[ CACHE][ 32]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
138-
[ CACHE-AGE][ 37]: age: 687 sec
139-
[ CHECK-PROXY][ 39]: Checking proxy (http://192.168.0.27:8000) with testurl (http://local-repo.fritz.box/local-repo/dists/trunk/InRelease)
140-
[ WORKS][ 57]: give back cached proxy
141-
[ PROXY][ 60]: return http://192.168.0.27:8000
122+
[ HASH][ 26]: HASH: c0b917f192fa7cccb3f536f2c01b824d of (http://packages.microsoft.com)
123+
[ AVAHI][ 33]: get cache entries for _apt_proxy._tcp
124+
[ CHECK][ 208]: Checking found proxy (http://192.168.0.27:8000) with testurl (http://packages.microsoft.com/repos/code/dists/stable/InRelease)
125+
[ CHECK-PROXY][ 331]: Proxy (http://192.168.0.27:8000) works with testurl (http://packages.microsoft.com/repos/code/dists/stable/InRelease).
126+
[ ADD][ 333]: add proxy to working proxy list.
127+
Service[OK][Squid deb proxy on squid-deb-proxy]@http://192.168.0.27:8000
128+
[ CHECK][ 356]: Checking found proxy (http://192.168.0.27:3142) with testurl (http://packages.microsoft.com/repos/code/dists/stable/InRelease)
129+
[ CHECK-PROXY][ 367]: Proxy (http://192.168.0.27:3142) failed with testurl (http://packages.microsoft.com/repos/code/dists/stable/InRelease)
130+
Service[ER][apt-cacher-ng proxy on squid-deb-proxy]@http://192.168.0.27:3142
131+
[ PROXY][ 370]: return :http://192.168.0.27:8000:
132+
[ CACHE][ 373]: Store (http://192.168.0.27:8000) in cache file (/var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt)
133+
[ CACHE][ 375]: Update cachefile.
134+
[ INFO][ 2]: ===--- apt-proxy-detect ---===
135+
[ TEST-URL][ 17]: URL: http://download.proxmox.com/debian/pve/dists/bookworm/InRelease
136+
[ HASH][ 29]: HASH: 17b43db99b56eb6355d41861f4f304d0 of (http://download.proxmox.com)
137+
[ CACHE][ 35]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
138+
[ CHECK][ 38]: once working proxy: http://192.168.0.27:8000 for http://download.proxmox.com/debian/pve/dists/bookworm/InRelease
139+
[ CHECK-PROXY][ 141]: Proxy (http://192.168.0.27:8000) works with testurl (http://download.proxmox.com/debian/pve/dists/bookworm/InRelease).
140+
[ PROXY][ 144]: return :http://192.168.0.27:8000:
141+
[ CACHE][ 146]: Store (http://192.168.0.27:8000) in cache file (/var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt)
142+
[ CACHE][ 148]: Update cachefile.
143+
[ INFO][ 1]: ===--- apt-proxy-detect ---===
144+
[ TEST-URL][ 15]: URL: http://local-repo.fritz.box/local-repo/dists/trunk/InRelease
145+
[ HASH][ 23]: HASH: 2bfbb1335aaf9d333a5c9498226eb208 of (http://local-repo.fritz.box)
146+
[ CACHE][ 28]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
147+
[ CHECK][ 30]: once working proxy: http://192.168.0.27:8000 for http://local-repo.fritz.box/local-repo/dists/trunk/InRelease
148+
[ CHECK-PROXY][ 49]: Proxy (http://192.168.0.27:8000) works with testurl (http://local-repo.fritz.box/local-repo/dists/trunk/InRelease).
149+
[ PROXY][ 51]: return :http://192.168.0.27:8000:
150+
[ CACHE][ 53]: Store (http://192.168.0.27:8000) in cache file (/var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt)
151+
[ CACHE][ 56]: Update cachefile.
152+
[ INFO][ 1]: ===--- apt-proxy-detect ---===
153+
[ TEST-URL][ 27]: URL: http://security.debian.org/debian-security/dists/bookworm-security/InRelease
154+
[ HASH][ 38]: HASH: 3b68f7b6590a2da8625ff71f01d38ffb of (http://security.debian.org)
155+
[ CACHE][ 47]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
156+
[ CHECK][ 51]: once working proxy: http://192.168.0.27:8000 for http://security.debian.org/debian-security/dists/bookworm-security/InRelease
157+
[ CHECK-PROXY][ 102]: Proxy (http://192.168.0.27:8000) works with testurl (http://security.debian.org/debian-security/dists/bookworm-security/InRelease).
158+
[ PROXY][ 104]: return :http://192.168.0.27:8000:
159+
[ CACHE][ 106]: Store (http://192.168.0.27:8000) in cache file (/var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt)
160+
[ CACHE][ 108]: Update cachefile.
161+
[ INFO][ 1]: ===--- apt-proxy-detect ---===
162+
[ TEST-URL][ 16]: URL: http://deb.debian.org/debian/dists/bookworm/InRelease
163+
[ HASH][ 24]: HASH: efbfa0e2acaaa513c457b6698de83118 of (http://deb.debian.org)
164+
[ CACHE][ 28]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
165+
[ CHECK][ 30]: once working proxy: http://192.168.0.27:8000 for http://deb.debian.org/debian/dists/bookworm/InRelease
166+
[ CHECK-PROXY][ 93]: Proxy (http://192.168.0.27:8000) works with testurl (http://deb.debian.org/debian/dists/bookworm/InRelease).
167+
[ PROXY][ 95]: return :http://192.168.0.27:8000:
168+
[ CACHE][ 97]: Store (http://192.168.0.27:8000) in cache file (/var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt)
169+
[ CACHE][ 100]: Update cachefile.
170+
Hit:1 http://local-repo.fritz.box/local-repo trunk InRelease
171+
Hit:2 http://deb.debian.org/debian bookworm InRelease
172+
Hit:3 http://security.debian.org/debian-security bookworm-security InRelease
173+
Hit:4 http://download.proxmox.com/debian/pve bookworm InRelease
174+
Hit:5 http://deb.debian.org/debian bookworm-updates InRelease
175+
Hit:6 http://packages.microsoft.com/repos/code stable InRelease
176+
Hit:7 https://dl.google.com/linux/chrome/deb stable InRelease
177+
Reading package lists... Done
178+
Building dependency tree... Done
179+
Reading state information... Done
180+
22 packages can be upgraded. Run 'apt list --upgradable' to see them.
181+
182+
```
183+
184+
looks like (second run)
185+
186+
```
187+
dev@dev:~$ export DEBUG_APT_PROXY_DETECT=1
188+
dev@dev:~$ sudo apt update
189+
# INFO-TAG MS : MESSAGE
190+
[ INFO][ 1]: ===--- apt-proxy-detect ---===
191+
[ TEST-URL][ 15]: URL: http://packages.microsoft.com/repos/code/dists/stable/InRelease
192+
[ HASH][ 23]: HASH: c0b917f192fa7cccb3f536f2c01b824d of (http://packages.microsoft.com)
193+
[ CACHE][ 28]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
194+
[ CACHE-AGE][ 30]: age: 110 sec
195+
[ CHECK-PROXY][ 138]: Proxy (http://192.168.0.27:8000) works with testurl (http://packages.microsoft.com/repos/code/dists/stable/InRelease).
196+
[ WORKS][ 140]: give back cached proxy
197+
[ PROXY][ 142]: return http://192.168.0.27:8000
198+
[ INFO][ 1]: ===--- apt-proxy-detect ---===
199+
[ TEST-URL][ 16]: URL: http://download.proxmox.com/debian/pve/dists/bookworm/InRelease
200+
[ HASH][ 23]: HASH: 17b43db99b56eb6355d41861f4f304d0 of (http://download.proxmox.com)
201+
[ CACHE][ 28]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
202+
[ CACHE-AGE][ 30]: age: 110 sec
203+
[ CHECK-PROXY][ 134]: Proxy (http://192.168.0.27:8000) works with testurl (http://download.proxmox.com/debian/pve/dists/bookworm/InRelease).
204+
[ WORKS][ 136]: give back cached proxy
205+
[ PROXY][ 138]: return http://192.168.0.27:8000
206+
[ INFO][ 2]: ===--- apt-proxy-detect ---===
207+
[ TEST-URL][ 16]: URL: http://local-repo.fritz.box/local-repo/dists/trunk/InRelease
208+
[ HASH][ 24]: HASH: 2bfbb1335aaf9d333a5c9498226eb208 of (http://local-repo.fritz.box)
209+
[ CACHE][ 28]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
210+
[ CACHE-AGE][ 30]: age: 111 sec
211+
[ CHECK-PROXY][ 49]: Proxy (http://192.168.0.27:8000) works with testurl (http://local-repo.fritz.box/local-repo/dists/trunk/InRelease).
212+
[ WORKS][ 52]: give back cached proxy
213+
[ PROXY][ 54]: return http://192.168.0.27:8000
142214
[ INFO][ 2]: ===--- apt-proxy-detect ---===
143215
[ TEST-URL][ 19]: URL: http://security.debian.org/debian-security/dists/bookworm-security/InRelease
144-
[ HASH][ 28]: HASH: 3b68f7b6590a2da8625ff71f01d38ffb of (http://security.debian.org)
145-
[ CACHE][ 36]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
146-
[ CACHE-AGE][ 39]: age: 688 sec
147-
[ CHECK-PROXY][ 41]: Checking proxy (http://192.168.0.27:8000) with testurl (http://security.debian.org/debian-security/dists/bookworm-security/InRelease)
148-
[ WORKS][ 93]: give back cached proxy
149-
[ PROXY][ 95]: return http://192.168.0.27:8000
216+
[ HASH][ 27]: HASH: 3b68f7b6590a2da8625ff71f01d38ffb of (http://security.debian.org)
217+
[ CACHE][ 32]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
218+
[ CACHE-AGE][ 34]: age: 110 sec
219+
[ CHECK-PROXY][ 44]: Proxy (http://192.168.0.27:8000) works with testurl (http://security.debian.org/debian-security/dists/bookworm-security/InRelease).
220+
[ WORKS][ 48]: give back cached proxy
221+
[ PROXY][ 50]: return http://192.168.0.27:8000
150222
[ INFO][ 2]: ===--- apt-proxy-detect ---===
151-
[ TEST-URL][ 24]: URL: http://deb.debian.org/debian/dists/bookworm/InRelease
152-
[ HASH][ 33]: HASH: efbfa0e2acaaa513c457b6698de83118 of (http://deb.debian.org)
153-
[ CACHE][ 41]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
154-
[ CACHE-AGE][ 44]: age: 687 sec
155-
[ CHECK-PROXY][ 47]: Checking proxy (http://192.168.0.27:8000) with testurl (http://deb.debian.org/debian/dists/bookworm/InRelease)
156-
[ WORKS][ 145]: give back cached proxy
157-
[ PROXY][ 147]: return http://192.168.0.27:8000
223+
[ TEST-URL][ 18]: URL: http://deb.debian.org/debian/dists/bookworm/InRelease
224+
[ HASH][ 30]: HASH: efbfa0e2acaaa513c457b6698de83118 of (http://deb.debian.org)
225+
[ CACHE][ 34]: using stored under: /var/lib/apt/lists/auxfiles/.apt-proxy-detect._apt
226+
[ CACHE-AGE][ 37]: age: 110 sec
227+
[ CHECK-PROXY][ 107]: Proxy (http://192.168.0.27:8000) works with testurl (http://deb.debian.org/debian/dists/bookworm/InRelease).
228+
[ WORKS][ 110]: give back cached proxy
229+
[ PROXY][ 112]: return http://192.168.0.27:8000
158230
Hit:1 http://local-repo.fritz.box/local-repo trunk InRelease
159231
Hit:2 http://deb.debian.org/debian bookworm InRelease
160232
Hit:3 http://security.debian.org/debian-security bookworm-security InRelease

0 commit comments

Comments
 (0)