updated apt state
This commit is contained in:
parent
6bbd1f9256
commit
9fbe6854f5
@ -17,8 +17,8 @@ apt-proxy-detect-go:
|
||||
file.managed:
|
||||
- name: /usr/local/bin/apt-proxy-detect
|
||||
- source: {{ apt.fetch_url }}/apt_{{ apt.arch }}
|
||||
- source_hash: {{ apt.fetch_url }}/hashes
|
||||
- template: jinja
|
||||
- skip_verify: true
|
||||
- mode: "0755"
|
||||
|
||||
{% for key, value in apt.config.items() -%}
|
||||
|
@ -17,13 +17,18 @@ type Proxy struct {
|
||||
}
|
||||
|
||||
func (p *Proxy) Format() string {
|
||||
if p.PORT == 0 {
|
||||
return fmt.Sprintf(TMPL_WITHOUT_PORT, p.SCHEME, p.HOSTNAME)
|
||||
} else {
|
||||
return fmt.Sprintf(TMPL, p.SCHEME, p.HOSTNAME, p.PORT)
|
||||
}
|
||||
}
|
||||
|
||||
var DEFAULT_PORT = 8000
|
||||
var DEFAULT_PROXY = Proxy{SCHEME: "http", HOSTNAME: "apt.paulbsd.com", PORT: 8001}
|
||||
var DEFAULT_PROXY = Proxy{SCHEME: "https", HOSTNAME: "apt.paulbsd.com", PORT: 0}
|
||||
|
||||
const TMPL = "%s://%s:%d"
|
||||
const TMPL_WITHOUT_PORT = "%s://%s"
|
||||
|
||||
func main() {
|
||||
addr, err := net.ResolveUDPAddr("udp", mdns.DefaultAddress)
|
||||
|
Loading…
Reference in New Issue
Block a user