GUI のないヘッドレス ubuntu システムを使用しています。ubuntu にpac ベースのプロキシを使用したいと考えています。大洪水のbittorentクライアントでも使用したい
私は現在この設定を使用しています
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ファイルの内容です:
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"
}
実行するapt-get update
と、次のエラーが表示されます。
W: Failed to fetch http://stingray.cyber.net.pk/pub/ubuntu/dists/trusty-proposed/Release.gpg Could not resolve 'stingray.cyber.net.pk'
これを修正するにはどうすればよいですか?