Add geoip support and flag icons

This commit is contained in:
zzz
2009-05-19 18:07:19 +00:00
parent cb5390b2fb
commit 3ba43a77f4
260 changed files with 92434 additions and 45 deletions

View File

@ -79,6 +79,7 @@ Public domain except as listed below:
XMLPull library used by UPnP:
See licenses/LICENSE-Apache2.0.txt
GeoIP data free to use, courtesy http://ip-to-country.webhosting.info/
Installer:
@ -146,6 +147,7 @@ Applications:
Router console:
Public domain.
Flag icons public domain, courtesy mjames@gmail.com http://www.famfamfam.com/
SAM:
Public domain.

View File

@ -0,0 +1,27 @@
<%
/*
* USE CAUTION WHEN EDITING
* Trailing whitespace OR NEWLINE on the last line will cause
* IllegalStateExceptions !!!
*/
/**
* flags.jsp?c=de => icons/flags/de.png
* with headers set so the browser caches.
*/
boolean rendered = false;
String c = request.getParameter("c");
if (c != null && c.length() > 0) {
java.io.OutputStream cout = response.getOutputStream();
response.setContentType("image/png");
response.setHeader("Cache-Control", "max-age=86400"); // cache for a day
try {
net.i2p.util.FileUtil.readFile(c + ".png", "icons/flags", cout);
rendered = true;
} catch (java.io.IOException ioe) {}
if (rendered)
cout.close();;
}
if (!rendered)
response.sendError(404, "Not found");
%>

View File

@ -1,4 +1,10 @@
<%
/*
* USE CAUTION WHEN EDITING
* Trailing whitespace OR NEWLINE on the last line will cause
* IllegalStateExceptions !!!
*/
boolean rendered = false;
String templateFile = request.getParameter("template");
if (templateFile != null) {

View File

@ -1,4 +1,10 @@
<%
/*
* USE CAUTION WHEN EDITING
* Trailing whitespace OR NEWLINE on the last line will cause
* IllegalStateExceptions !!!
*/
String uri = request.getRequestURI();
if (uri.endsWith(".css")) {
response.setContentType("text/css");

View File

@ -17,6 +17,7 @@
<echo message=" updater: tar the built i2p specific files into an i2pupdate.zip (extracts safely over existing installs)" />
<echo message=" updaterWithJetty: tar the built i2p specific files and jetty into an i2pupdate.zip (extracts safely over existing installs)" />
<echo message=" updaterWithJettyFixes: updater including local jetty patches" />
<echo message=" updaterWithGeoIP: updater including GeoIP Files" />
<echo message=" updaterSmall: updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" />
<echo message=" updaterRouter: updater with the i2p.jar and router.jar only" />
<echo message=" distclean: clean up all derived files" />
@ -319,6 +320,11 @@
<copy todir="pkg-temp/licenses/" >
<fileset dir="licenses/" />
</copy>
<copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
<copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
<copy todir="pkg-temp/icons/flags" >
<fileset dir="installer/resources/icons/flags" />
</copy>
</target>
<target name="tarball" depends="preppkg">
<tar compression="bzip2" destfile="i2p.tar.bz2">
@ -331,21 +337,20 @@
<fileset dir="." includes="readme*.html" />
<fileset dir="installer/resources/" includes="*-header.ht" />
</copy>
<copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
<copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
<copy todir="pkg-temp/icons/flags" >
<fileset dir="installer/resources/icons/flags" />
</copy>
<zip destfile="docs.zip" basedir="pkg-temp" />
</target>
<target name="updater" depends="prepupdate">
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="updaterWithJetty" depends="prepjupdate">
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="updaterWithJettyFixes" depends="prepjupdatefixes">
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="updaterSmall" depends="prepupdateSmall">
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="updaterRouter" depends="prepupdateRouter">
<target name="updater" depends="prepupdate, zipit" />
<target name="updaterWithGeoIP" depends="prepgeoupdate, zipit" />
<target name="updaterWithJetty" depends="prepjupdate, zipit" />
<target name="updaterWithJettyFixes" depends="prepjupdatefixes, zipit" />
<target name="updaterSmall" depends="prepupdateSmall, zipit" />
<target name="updaterRouter" depends="prepupdateRouter, zipit" />
<target name="zipit">
<zip destfile="i2pupdate.zip" basedir="pkg-temp" />
</target>
<target name="updateTest" depends="prepupdate">
@ -393,6 +398,13 @@
<copy file="build/i2p.jar" todir="pkg-temp/lib/" />
<copy file="build/router.jar" todir="pkg-temp/lib/" />
</target>
<target name="prepgeoupdate" depends="prepupdate">
<copy file="installer/resources/geoip.txt" todir="pkg-temp/geoip/" />
<copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
<copy todir="pkg-temp/icons/flags" >
<fileset dir="installer/resources/icons/flags" />
</copy>
</target>
<target name="prepjupdate" depends="prepupdate, buildWEB">
<copy file="build/jasper-compiler.jar" todir="pkg-temp/lib/" />
<copy file="build/jasper-runtime.jar" todir="pkg-temp/lib/" />

View File

@ -0,0 +1,235 @@
AD,ANDORRA
AE,UNITED ARAB EMIRATES
AF,AFGHANISTAN
AG,ANTIGUA AND BARBUDA
AI,ANGUILLA
AL,ALBANIA
AM,ARMENIA
AN,NETHERLANDS ANTILLES
AO,ANGOLA
AQ,ANTARCTICA
AR,ARGENTINA
AS,AMERICAN SAMOA
AT,AUSTRIA
AU,AUSTRALIA
AW,ARUBA
AX,
AZ,AZERBAIJAN
BA,BOSNIA AND HERZEGOVINA
BB,BARBADOS
BD,BANGLADESH
BE,BELGIUM
BF,BURKINA FASO
BG,BULGARIA
BH,BAHRAIN
BI,BURUNDI
BJ,BENIN
BM,BERMUDA
BN,BRUNEI DARUSSALAM
BO,BOLIVIA
BR,BRAZIL
BS,BAHAMAS
BT,BHUTAN
BW,BOTSWANA
BY,BELARUS
BZ,BELIZE
CA,CANADA
CD,THE DEMOCRATIC REPUBLIC OF THE CONGO
CF,CENTRAL AFRICAN REPUBLIC
CG,CONGO
CH,SWITZERLAND
CI,COTE D'IVOIRE
CK,COOK ISLANDS
CL,CHILE
CM,CAMEROON
CN,CHINA
CO,COLOMBIA
CR,COSTA RICA
CS,SERBIA AND MONTENEGRO
CU,CUBA
CV,CAPE VERDE
CY,CYPRUS
CZ,CZECH REPUBLIC
DE,GERMANY
DJ,DJIBOUTI
DK,DENMARK
DM,DOMINICA
DO,DOMINICAN REPUBLIC
DZ,ALGERIA
EC,ECUADOR
EE,ESTONIA
EG,EGYPT
ER,ERITREA
ES,SPAIN
ET,ETHIOPIA
FI,FINLAND
FJ,FIJI
FK,FALKLAND ISLANDS (MALVINAS)
FM,FEDERATED STATES OF MICRONESIA
FO,FAROE ISLANDS
FR,FRANCE
GA,GABON
GB,UNITED KINGDOM
GD,GRENADA
GE,GEORGIA
GF,FRENCH GUIANA
GH,GHANA
GI,GIBRALTAR
GL,GREENLAND
GM,GAMBIA
GN,GUINEA
GP,GUADELOUPE
GQ,EQUATORIAL GUINEA
GR,GREECE
GS,SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
GT,GUATEMALA
GU,GUAM
GW,GUINEA-BISSAU
GY,GUYANA
HK,HONG KONG
HN,HONDURAS
HR,CROATIA
HT,HAITI
HU,HUNGARY
ID,INDONESIA
IE,IRELAND
IL,ISRAEL
IM,
IN,INDIA
IO,BRITISH INDIAN OCEAN TERRITORY
IQ,IRAQ
IR,ISLAMIC REPUBLIC OF IRAN
IS,ICELAND
IT,ITALY
JE,
JM,JAMAICA
JO,JORDAN
JP,JAPAN
KE,KENYA
KG,KYRGYZSTAN
KH,CAMBODIA
KI,KIRIBATI
KM,COMOROS
KN,SAINT KITTS AND NEVIS
KR,REPUBLIC OF KOREA
KW,KUWAIT
KY,CAYMAN ISLANDS
KZ,KAZAKHSTAN
LA,LAO PEOPLE'S DEMOCRATIC REPUBLIC
LB,LEBANON
LC,SAINT LUCIA
LI,LIECHTENSTEIN
LK,SRI LANKA
LR,LIBERIA
LS,LESOTHO
LT,LITHUANIA
LU,LUXEMBOURG
LV,LATVIA
LY,LIBYAN ARAB JAMAHIRIYA
MA,MOROCCO
MC,MONACO
MD,REPUBLIC OF MOLDOVA
ME,
MG,MADAGASCAR
MH,MARSHALL ISLANDS
MK,THE FORMER YUGOSLAV REPUBLIC OF MACEDONIA
ML,MALI
MM,MYANMAR
MN,MONGOLIA
MO,MACAO
MP,NORTHERN MARIANA ISLANDS
MQ,MARTINIQUE
MR,MAURITANIA
MS,MONTSERRAT
MT,MALTA
MU,MAURITIUS
MV,MALDIVES
MW,MALAWI
MX,MEXICO
MY,MALAYSIA
MZ,MOZAMBIQUE
NA,NAMIBIA
NC,NEW CALEDONIA
NE,NIGER
NF,NORFOLK ISLAND
NG,NIGERIA
NI,NICARAGUA
NL,NETHERLANDS
NO,NORWAY
NP,NEPAL
NR,NAURU
NU,NIUE
NZ,NEW ZEALAND
OM,OMAN
PA,PANAMA
PE,PERU
PF,FRENCH POLYNESIA
PG,PAPUA NEW GUINEA
PH,PHILIPPINES
PK,PAKISTAN
PL,POLAND
PM,SAINT PIERRE AND MIQUELON
PR,PUERTO RICO
PS,PALESTINIAN TERRITORY
PT,PORTUGAL
PW,PALAU
PY,PARAGUAY
QA,QATAR
RE,REUNION
RO,ROMANIA
RS,
RU,RUSSIAN FEDERATION
RW,RWANDA
SA,SAUDI ARABIA
SB,SOLOMON ISLANDS
SC,SEYCHELLES
SD,SUDAN
SE,SWEDEN
SG,SINGAPORE
SI,SLOVENIA
SK,SLOVAKIA
SL,SIERRA LEONE
SM,SAN MARINO
SN,SENEGAL
SO,SOMALIA
SR,SURINAME
ST,SAO TOME AND PRINCIPE
SV,EL SALVADOR
SY,SYRIAN ARAB REPUBLIC
SZ,SWAZILAND
TC,TURKS AND CAICOS ISLANDS
TD,CHAD
TF,FRENCH SOUTHERN TERRITORIES
TG,TOGO
TH,THAILAND
TJ,TAJIKISTAN
TK,TOKELAU
TL,TIMOR-LESTE
TM,TURKMENISTAN
TN,TUNISIA
TO,TONGA
TR,TURKEY
TT,TRINIDAD AND TOBAGO
TV,TUVALU
TW,TAIWAN
TZ,UNITED REPUBLIC OF TANZANIA
UA,UKRAINE
UG,UGANDA
UM,UNITED STATES MINOR OUTLYING ISLANDS
US,UNITED STATES
UY,URUGUAY
UZ,UZBEKISTAN
VA,HOLY SEE (VATICAN CITY STATE)
VC,SAINT VINCENT AND THE GRENADINES
VE,VENEZUELA
VG,VIRGIN ISLANDS
VI,VIRGIN ISLANDS
VN,VIET NAM
VU,VANUATU
WF,WALLIS AND FUTUNA
WS,SAMOA
YE,YEMEN
YT,MAYOTTE
ZA,SOUTH AFRICA
ZM,ZAMBIA
ZW,ZIMBABWE

91752
installer/resources/geoip.txt Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Some files were not shown because too many files have changed in this diff Show More