47debbde0086344673a202e91e1fd7bc29c8232f
[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                 "localhost", 
31                 "delta.keyserver.ws",
32                 "pool.sks-keyservers.net",
33                 "ipv4.pool.sks-keyservers.net",
34                 "ipv6.pool.sks-keyservers.net",
35                 "test.surfnet.nl", // improper (no DNS record) hostname in sksconf for pgp.surfnet.nl
36                 "nemesis.key-servers.de",
37                 "key-server.nl",
38                 "key-server.org",
39                 "keys.bz",
40                 "keys.keysigning.org",
41                 "keys.kfwebs.net",
42                 "keys.n3npq.net",
43                 "keys.nayr.net",
44                 "keys.slc.biz",
45                 "keys.sugarlabs.org",
46                 "keys.syn.co.uk",
47                 "keyserver.cais.rnp.br",
48                 "keyserver.fug.com.br",
49                 "keyserver.maze.io",
50                 "keyserver.mozilla.org",
51                 "keyserver.novomundo.com.br",
52                 "keyserver.pramberger.at",
53                 "keyserver.uberslacks.com",
54                 "keyserver.veloxis.de",
55                 "keyservers.org",
56                 "ks.rainydayz.org",
57                 "liberty.antagonism.org",
58                 "node0.mainframe.cx",
59                 "odin.stueve.us",
60                 "pgp.acm.jhu.edu",
61                 "pgp.webtru.st",
62                 "pks.mtholyoke.edu",
63                 "redundant.dyndns.org",
64                 "research.nxfifteen.me.uk",
65                 "sks.betabuild.net",
66                 "sks.dgrphone.net",
67                 // Issues with PTR <> A relationship
68                 "keyserver.witopia.net",
69                 /*
70                  * Automatically generate exclude list 
71                  * from  php debug_generate_exclude.php.php
72                  * follows. Checked with 
73                  *   for i in `php debug_check_excluded_servers.php `; \ 
74                  *   do echo "--------------------------"; \            
75                  *   php sks_get_peer_data.php $i | grep "statusok\":true" \
76                  *  | grep -v "version\":0"; done
77                  */
78                  "sks1.webtru.st",
79                  "sks2.webtru.st",
80                  "users.webtru.st",
81                         "alpha.keyserver.ws",
82                         "barnstable.jbj.org",
83                         "basket",
84                         "booboo",
85                         "cryptochan.org",
86                         "cybernude.org",
87                         "dionysus.ugcs.caltech.edu",
88                         "druzhnaya.canonical.com",
89                         "envirobeast",
90                         "esd0.colliertech.org",
91                         "gpg-keyserver.de",
92                         "gpg.debian.unam.mx",
93                         "gpg.kalkulators.org",
94                         "honeynet.homelinux.com",
95                         "horse",
96                         "key-server.de",
97                         "key.sodrk.ru",
98                         "key.space.chaos-disciple.org",
99                         "keys.cardboard.net",
100                         "keys.christensenplace.us",
101                         "keys.pmman.com",
102                         "keys.rpm5.org",
103                         "keys3.kfwebs.net",
104                         "keys4.kfwebs.net",
105                         "keys5.kfwebs.net",
106                         "keyserver.argoss.nl",
107                         "keyserver.colliertech.org",
108                         "keyserver.dotorg.org",
109                         "keyserver.duf.hu",
110                         "keyserver.fabbione.net",
111                         "keyserver.fishysnax.com",
112                         "keyserver.fryxell.ru",
113                         "keyserver.ftbfs.org",
114                         "keyserver.ganneff.de",
115                         "keyserver.gurski.org",
116                         "keyserver.maluska.de",
117                         "keyserver.metroholografix.org",
118                         "keyserver.mine.nu",
119                         "keyserver.mitaka-g.net",
120                         "keyserver.myriapolis.net",
121                         "keyserver.nijkamp.net",
122                         "keyserver.noreply.org",
123                         "keyserver.northernstandard.us.com",
124                         "keyserver.nuclearwombats.net",
125                         "keyserver.nyfnet.net",
126                         "keyserver.progman.us",
127                         "keyserver.rootbash.com",
128                         "keyserver.sparcs.net",
129                         "keyserver.straderdynamics.com",
130                         "keyserver.unixbyte.com",
131                         "keyserver.vescudero.net",
132                         "keyserver.ws",
133                         "kim.kim-minh.com",
134                         "ky-server.org",
135                         "linux-geeks.de",
136                         "nellfenwick",
137                         "nisamox.fciencias.unam.mx",
138                         "odin.hq-visitech.com",
139                         "oppie.homelinux.com",
140                         "pgp.codelabs.ru",
141                         "pgp.gabrix.ath.cx",
142                         "pgp.srv.ualberta.ca",
143                         "pgp.teanfordhouse.com",
144                         "pgp.treefish.org",
145                         "pgp.ugcs.caltech.edu",
146                         "pgp.wernherus.de",
147                         "pgpkeys.logintas.ch",
148                         "pki.colliertech.org",
149                         "pubdmz01.phx.mozilla.com",
150                         "research.nxfifteen.com",
151                         "s328158944.onlinehome.fr",
152                         "sks-server.siu.edu",
153                         "sks.5coluna.com",
154                         "sks.buanzo.org",
155                         "sks.dnsalias.net",
156                         "sks.hezmatt.org",
157                         "sks.keyserver.ca",
158                         "sks.matroxsolutions.com",
159                         "sks.mit.edu",
160                         "sks.nanofortnight.org",
161                         "sks.teanfordhouse.com",
162                         "sksbackup.local",
163                         "sodrk.ru",
164                         "thermos",
165                         "users.nayr.net",
166                         "wellfleet.jbj.org",
167                         "yogi",
168                         "barbadine.canonical.com",
169                         "bhs.dan.me.uk",
170                         "envirobeast.stueve.us",
171                         "esperanza.canonical.com",
172                         "icechest",
173                         "reg.goeswhere.com", //disabled as per sks-devel announcement
174                         "carbon.ipv6.jhcloos.org",
175                         "fau.xxx",
176                         "funboard.dtdns.net",
177                         "keys.wuschelpuschel.org",
178                         "keyserver.fr",
179                         "keyserver.linux.it",
180                         "orion.stueve.us",
181                         "thesecuregroup.com",
182                         "www.mainframe.cx",
183                         "zomers.be",
184                         "sks.cthn.de", // IDN use for returned hostname
185                         "pgpkeys.cacert.org", // disabled by request from administrator
186                         "node1.mj2.uk", // cluster node
187                         "node2.mj2.uk", // cluster node
188                         "node3.mj2.uk", // cluster node
189                         "a.0.keysnode.ispfontela.es", //redirects hkp to hkps
190                         "gpg.nebrwesleyan.edu" // SRV issues for resolvers
191         );
192         
193         $returnValue = false; 
194         
195         //Server name is found in exclude list
196         if(in_array($hostname, $exclude)) 
197                 $returnValue = true;
198
199         //Ignore IP-only matches
200         if(!is_array($hostname))
201         {
202                 if(preg_match("/^\d+\.\d+\.\d+\.\d+$/", $hostname))
203                         $returnValue = true; 
204         }
205                 
206         return $returnValue; 
207  }
208  
209 ?>