exclude: update
[sks-keyservers-pool.git] / sks-keyservers.net / status-srv / exclude.inc.php
1 <?
2  /*
3   *  status-srv/exclude.php
4   *  Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012  Kristian Fiskerstrand
5   *  
6   *  This file is part of SKS Keyserver Pool (http://sks-keyservers.net)
7   *  
8   *  The Author can be reached by electronic mail at kf@sumptuouscapital.com
9   *  Communication using OpenPGP is preferred - a copy of the public key 0x0B7F8B60E3EDFAE3
10   *  is available in all the common keyservers or in hkp://pool.sks-keyservers.net
11   *  
12   *  This program is free software: you can redistribute it and/or modify
13   *  it under the terms of the GNU General Public License as published by
14   *  the Free Software Foundation, either version 3 of the License, or
15   *  (at your option) any later version.
16   *
17   *  This program is distributed in the hope that it will be useful,
18   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
19   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20   *  GNU General Public License for more details.
21   *
22   *  You should have received a copy of the GNU General Public License
23   *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
24   */
25   
26  function ServerIsExcluded($hostname)
27  {
28     $exclude = 
29         array(
30                 "keys.flanga.io", // unrecognized server type
31                 "pgp.mit.edu", // Heavy load
32                 "localhost", 
33                 "delta.keyserver.ws",
34                 "pool.sks-keyservers.net",
35                 "ipv4.pool.sks-keyservers.net",
36                 "ipv6.pool.sks-keyservers.net",
37                 "test.surfnet.nl", // improper (no DNS record) hostname in sksconf for pgp.surfnet.nl
38                 "nemesis.key-servers.de",
39                 "key-server.nl",
40                 "key-server.org",
41                 "keys.bz",
42                 "keys.keysigning.org",
43                 "keys.kfwebs.net",
44                 "keys.n3npq.net",
45                 "keys.nayr.net",
46                 "keys.slc.biz",
47                 "keys.sugarlabs.org",
48                 "keys.syn.co.uk",
49                 "keyserver.cais.rnp.br",
50                 "keyserver.fug.com.br",
51                 "keyserver.maze.io",
52                 "keyserver.mozilla.org",
53                 "keyserver.novomundo.com.br",
54                 "keyserver.pramberger.at",
55                 "keyserver.uberslacks.com",
56                 "keyserver.veloxis.de",
57                 "keyservers.org",
58                 "ks.rainydayz.org",
59                 "liberty.antagonism.org",
60                 "node0.mainframe.cx",
61                 "odin.stueve.us",
62                 "pgp.acm.jhu.edu",
63                 "pgp.webtru.st",
64                 "pks.mtholyoke.edu",
65                 "redundant.dyndns.org",
66                 "research.nxfifteen.me.uk",
67                 "sks.betabuild.net",
68                 "sks.dgrphone.net",
69                 // Issues with PTR <> A relationship
70                 "keyserver.witopia.net",
71                 /*
72                  * Automatically generate exclude list 
73                  * from  php debug_generate_exclude.php.php
74                  * follows. Checked with 
75                  *   for i in `php debug_check_excluded_servers.php `; \ 
76                  *   do echo "--------------------------"; \            
77                  *   php sks_get_peer_data.php $i | grep "statusok\":true" \
78                  *  | grep -v "version\":0"; done
79                  */
80                  "sks1.webtru.st",
81                  "sks2.webtru.st",
82                  "users.webtru.st",
83                         "alpha.keyserver.ws",
84                         "barnstable.jbj.org",
85                         "basket",
86                         "booboo",
87                         "cryptochan.org",
88                         "cybernude.org",
89                         "dionysus.ugcs.caltech.edu",
90                         "druzhnaya.canonical.com",
91                         "envirobeast",
92                         "esd0.colliertech.org",
93                         "gpg-keyserver.de",
94                         "gpg.debian.unam.mx",
95                         "gpg.kalkulators.org",
96                         "honeynet.homelinux.com",
97                         "horse",
98                         "key-server.de",
99                         "key.sodrk.ru",
100                         "key.space.chaos-disciple.org",
101                         "keys.cardboard.net",
102                         "keys.christensenplace.us",
103                         "keys.pmman.com",
104                         "keys.rpm5.org",
105                         "keys3.kfwebs.net",
106                         "keys4.kfwebs.net",
107                         "keys5.kfwebs.net",
108                         "keyserver.argoss.nl",
109                         "keyserver.colliertech.org",
110                         "keyserver.dotorg.org",
111                         "keyserver.duf.hu",
112                         "keyserver.fabbione.net",
113                         "keyserver.fishysnax.com",
114                         "keyserver.fryxell.ru",
115                         "keyserver.ftbfs.org",
116                         "keyserver.ganneff.de",
117                         "keyserver.gurski.org",
118                         "keyserver.maluska.de",
119                         "keyserver.metroholografix.org",
120                         "keyserver.mine.nu",
121                         "keyserver.mitaka-g.net",
122                         "keyserver.myriapolis.net",
123                         "keyserver.nijkamp.net",
124                         "keyserver.noreply.org",
125                         "keyserver.northernstandard.us.com",
126                         "keyserver.nuclearwombats.net",
127                         "keyserver.nyfnet.net",
128                         "keyserver.progman.us",
129                         "keyserver.rootbash.com",
130                         "keyserver.sparcs.net",
131                         "keyserver.straderdynamics.com",
132                         "keyserver.unixbyte.com",
133                         "keyserver.vescudero.net",
134                         "keyserver.ws",
135                         "kim.kim-minh.com",
136                         "ky-server.org",
137                         "linux-geeks.de",
138                         "nellfenwick",
139                         "nisamox.fciencias.unam.mx",
140                         "odin.hq-visitech.com",
141                         "oppie.homelinux.com",
142                         "pgp.codelabs.ru",
143                         "pgp.gabrix.ath.cx",
144                         "pgp.srv.ualberta.ca",
145                         "pgp.teanfordhouse.com",
146                         "pgp.treefish.org",
147                         "pgp.ugcs.caltech.edu",
148                         "pgp.wernherus.de",
149                         "pgpkeys.logintas.ch",
150                         "pki.colliertech.org",
151                         "pubdmz01.phx.mozilla.com",
152                         "research.nxfifteen.com",
153                         "s328158944.onlinehome.fr",
154                         "sks-server.siu.edu",
155                         "sks.5coluna.com",
156                         "sks.buanzo.org",
157                         "sks.dnsalias.net",
158                         "sks.hezmatt.org",
159                         "sks.keyserver.ca",
160                         "sks.matroxsolutions.com",
161                         "sks.mit.edu",
162                         "sks.nanofortnight.org",
163                         "sks.teanfordhouse.com",
164                         "sksbackup.local",
165                         "sodrk.ru",
166                         "thermos",
167                         "users.nayr.net",
168                         "wellfleet.jbj.org",
169                         "yogi",
170                         "barbadine.canonical.com",
171                         "bhs.dan.me.uk",
172                         "envirobeast.stueve.us",
173                         "esperanza.canonical.com",
174                         "icechest",
175                         "reg.goeswhere.com", //disabled as per sks-devel announcement
176                         "carbon.ipv6.jhcloos.org",
177                         "fau.xxx",
178                         "funboard.dtdns.net",
179                         "keys.wuschelpuschel.org",
180                         "keyserver.fr",
181                         "keyserver.linux.it",
182                         "orion.stueve.us",
183                         "thesecuregroup.com",
184                         "www.mainframe.cx",
185                         "zomers.be",
186                         "sks.cthn.de", // IDN use for returned hostname
187                         "pgpkeys.cacert.org", // disabled by request from administrator
188                         "node1.mj2.uk", // cluster node
189                         "node2.mj2.uk", // cluster node
190                         "node3.mj2.uk", // cluster node
191                         "a.0.keysnode.ispfontela.es", //redirects hkp to hkps
192                         "gpg.nebrwesleyan.edu" // SRV issues for resolvers
193         );
194         
195         $returnValue = false; 
196         
197         //Server name is found in exclude list
198         if(in_array($hostname, $exclude)) 
199                 $returnValue = true;
200
201         //Ignore IP-only matches
202         if(!is_array($hostname))
203         {
204                 if(preg_match("/^\d+\.\d+\.\d+\.\d+$/", $hostname))
205                         $returnValue = true; 
206         }
207                 
208         return $returnValue; 
209  }
210  
211 ?>