GUI가없는 헤드없는 우분투 시스템을 사용하고 있습니다. 내 우분투에 pac-based 프록시를 사용하고 싶습니다. 내가 apt-get update
를 얻을 실행하면프록시 시스템 Wide Ubuntu 사용
function isPlainHostNameEx(host){
return !(!!~host.indexOf('.') || !!~host.indexOf(':'));
}
function FindProxyForURL(url, host){
var lhost = host.toLowerCase();
host = lhost;
IPNotation = /^\d+\.\d+\.\d+\.\d+$/g;
var direct = [
"local", "dev", "ip", "box", "lvh.me", "ripe", "invalid",
"intra", "intranet", "onion", "vcap.me", "127.0.0.1.xip.io",
"smackaho.st", "localtest.me", "site", "ip"
]
for(var i=0;i<direct.length;i++){
if(dnsDomainIs(host, direct[i])){
return "DIRECT";
}
}
var CC = "DE";
var exceptions = JSON.parse('[{"CC":"US"}]');
for(var i=0;i<exceptions.length;i++){
var e = exceptions[i];
if(e.CC == CC) {
for(var j=0;j<e.domains.length;j++){
if(dnsDomainIs(host, e.domains[j])){
return e.nodes;
}
}
}
}
return "12.024.04.10"
}
: 나는 또한
내가 현재
gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http enabled true
gsettings set org.gnome.system.proxy.http host 'http://localhost/proxy.pac'
이 내 .pac 파일의 내용이이 설정을 사용하고 홍수의 bittorent 클라이언트에서 사용하려면 이러한 오류 :
W: Failed to fetch http://stingray.cyber.net.pk/pub/ubuntu/dists/trusty-proposed/Release.gpg Could not resolve 'stingray.cyber.net.pk'
이 문제를 해결하려면 어떻게해야합니까?
무엇이 문제입니까? :/ – furins
이것은 헤드리스 서버에 사용하려는 pac 스크립트입니다. 나는 apt-get update를 실행할 때 이러한 오류가 발생합니다. W : 가져 오지 못했습니다. http://stingray.cyber.net.pk/pub/ubuntu/dists/trusty-proposed/Release.gpg 'stingray.cyber.net을 확인할 수 없습니다. .pk ' –