forked from I2P_Developers/i2p.i2p
Compare commits
990 Commits
i2p-0.9.44
...
test-red-2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0348905f34 | ||
![]() |
aa4a0419ba | ||
![]() |
15b6638538 | ||
![]() |
56db652ee8 | ||
![]() |
831a9cebfa | ||
![]() |
a04bb77c68 | ||
![]() |
8d11a97c9d | ||
![]() |
023a7fdebe | ||
![]() |
77375148e3 | ||
![]() |
5c232792cc | ||
![]() |
6e03300371 | ||
![]() |
731bf920f6 | ||
![]() |
c1c2f4bb2e | ||
![]() |
6a54af399d | ||
![]() |
82b7eea5f0 | ||
![]() |
0b71fcf2e6 | ||
![]() |
e4c7ef183f | ||
![]() |
c8341e77ab | ||
![]() |
51d2862d75 | ||
![]() |
10d303aee5 | ||
![]() |
b0b7c1c3d1 | ||
![]() |
6339445e35 | ||
![]() |
f5a6bb1211 | ||
![]() |
662fd484de | ||
![]() |
fda53416d3 | ||
![]() |
638d471d6b | ||
![]() |
74c493b1fe | ||
![]() |
10b90f45f0 | ||
![]() |
8e465f4da7 | ||
![]() |
ca1b6bbe42 | ||
![]() |
3fbe4ed7e8 | ||
![]() |
c36c8678ed | ||
![]() |
c3099c7cfa | ||
![]() |
ee2482c2c1 | ||
![]() |
64ebcea50a | ||
![]() |
c6c2ee94a7 | ||
![]() |
6520f69a38 | ||
![]() |
eecb6bef69 | ||
![]() |
4a9424b485 | ||
![]() |
f04c0740c4 | ||
![]() |
d3563752a1 | ||
![]() |
e1cd22e6ee | ||
![]() |
63e9b7f034 | ||
![]() |
ea736d71ef | ||
![]() |
ca974a85c5 | ||
![]() |
2ee4cbabfe | ||
![]() |
aa91dc985d | ||
![]() |
12e9e79010 | ||
![]() |
3c94f529ad | ||
![]() |
c04265c37a | ||
![]() |
9177459db6 | ||
![]() |
851752a57a | ||
![]() |
eb535762c4 | ||
![]() |
fa3ca565ca | ||
![]() |
f09de33978 | ||
![]() |
daf894dbe3 | ||
![]() |
3af5a87782 | ||
![]() |
9c677eb465 | ||
![]() |
c609e43d90 | ||
![]() |
e63e9c58a8 | ||
![]() |
7f3f46c8ba | ||
![]() |
6e2292354a | ||
![]() |
58e5c55cfd | ||
![]() |
20e56c2e52 | ||
![]() |
f076789915 | ||
![]() |
d132d0ccdb | ||
![]() |
182039964f | ||
![]() |
fe43da82f2 | ||
![]() |
6e3b483c03 | ||
![]() |
1a5fedbb6d | ||
![]() |
b656274c92 | ||
![]() |
5d5e6fa3c2 | ||
![]() |
b92d94ea04 | ||
![]() |
3bec2b5c73 | ||
![]() |
1d2dbb3cc2 | ||
![]() |
70cd6daa7c | ||
![]() |
e14de8235f | ||
![]() |
89070163cd | ||
![]() |
60cdfb3af9 | ||
![]() |
c19730a32b | ||
![]() |
0f730398d4 | ||
![]() |
ad66437421 | ||
![]() |
b3f60402af | ||
![]() |
4fd9f6e9b2 | ||
![]() |
31a01f0f00 | ||
![]() |
4bf98da6de | ||
![]() |
e645a16e6a | ||
![]() |
56beb1aec5 | ||
![]() |
2eb83171f4 | ||
![]() |
c837bd9bfd | ||
![]() |
9af1c7e4ea | ||
![]() |
53416a5fc5 | ||
![]() |
69f48f49d1 | ||
![]() |
b2655dc86b | ||
![]() |
48d3f6469d | ||
![]() |
c8471d5d9b | ||
![]() |
92d91dfc3a | ||
![]() |
745a9f083b | ||
![]() |
ce3db7ed9f | ||
![]() |
d51a7ccf38 | ||
![]() |
5502eda407 | ||
![]() |
eefd8b71ad | ||
![]() |
c0c84fd6a5 | ||
![]() |
79d270e2d5 | ||
![]() |
7d08a2377c | ||
![]() |
a87033f04c | ||
![]() |
4b7921838b | ||
![]() |
64b862d378 | ||
![]() |
8db8c6a028 | ||
![]() |
8d60d68e23 | ||
![]() |
56fabe31e2 | ||
![]() |
f7934e2ed5 | ||
![]() |
fdb4ec7d7c | ||
![]() |
a4777f3e5d | ||
![]() |
3314d4bf31 | ||
![]() |
20c7c8785b | ||
![]() |
0b4fe1aa56 | ||
![]() |
1c8614bc33 | ||
![]() |
af4c41ef08 | ||
![]() |
33397433ac | ||
![]() |
af6ecde867 | ||
706a4f5e08 | |||
6a18bf086f | |||
![]() |
29cbac6a41 | ||
![]() |
e48ba4b83c | ||
d7638b4167 | |||
f39ddcb14a | |||
3c48b18f43 | |||
317b59a9af | |||
4c1076ee07 | |||
16e886ca3e | |||
f68abc41b7 | |||
![]() |
1dfdf79d15 | ||
b2f4445f50 | |||
acbb8d1a24 | |||
bd1017ba92 | |||
![]() |
cb22f31d96 | ||
![]() |
451e53a674 | ||
![]() |
9f7b0390a3 | ||
![]() |
c400232cdf | ||
c87e74ea1d | |||
![]() |
c95430f33b | ||
4a9131c39d | |||
b47269f14e | |||
fb317b44ba | |||
e64e12b3fb | |||
![]() |
08c46e55f5 | ||
![]() |
5e5886395c | ||
4776080ce6 | |||
79a868b8fe | |||
![]() |
c79e6455fd | ||
![]() |
b7262aa592 | ||
596f6e01cc | |||
![]() |
d95c85cdbe | ||
f71e59a049 | |||
169fb59d7d | |||
![]() |
922178b2c7 | ||
![]() |
74a9193ba5 | ||
![]() |
335409f1d2 | ||
![]() |
d6edb9e96c | ||
f150855f1c | |||
![]() |
655ce09796 | ||
![]() |
91ebec15d5 | ||
![]() |
b17d321503 | ||
![]() |
a6398d88a9 | ||
![]() |
59969db16c | ||
![]() |
b68a5ea7fd | ||
![]() |
c2234685b9 | ||
![]() |
ce7daaa02a | ||
![]() |
b19999f95a | ||
![]() |
92ecc9f8e8 | ||
![]() |
aa2ba92db8 | ||
![]() |
5f3c41244b | ||
![]() |
bf29132898 | ||
![]() |
a424331b78 | ||
![]() |
ccb0c279f7 | ||
![]() |
7fe01fb9a7 | ||
![]() |
66c4c10a78 | ||
![]() |
163967311e | ||
![]() |
75734448c5 | ||
![]() |
aed1de84b8 | ||
![]() |
51560a8ec8 | ||
![]() |
ec89a80e80 | ||
![]() |
41c7b7382a | ||
![]() |
b4e1fbd857 | ||
![]() |
517ff4fa24 | ||
![]() |
106b1a696d | ||
![]() |
6cab545c45 | ||
![]() |
619923dbf8 | ||
![]() |
ed0ecdf253 | ||
![]() |
d42ef2223d | ||
![]() |
e461004ed9 | ||
![]() |
2e180d4c60 | ||
![]() |
152ad1659b | ||
![]() |
888311e34f | ||
![]() |
2df5fb972a | ||
![]() |
a481255adb | ||
![]() |
139594df8f | ||
![]() |
659ab97f69 | ||
![]() |
963a4fe89c | ||
![]() |
4c4dbae107 | ||
![]() |
6978049416 | ||
![]() |
46fe1ba74a | ||
![]() |
13bd5e4938 | ||
![]() |
bbacf85245 | ||
![]() |
68f011f344 | ||
![]() |
8bd2384ac8 | ||
![]() |
54dda1a15f | ||
![]() |
3f44a555ba | ||
![]() |
86cbb2ed4e | ||
![]() |
2569123055 | ||
![]() |
afa4b9e66d | ||
![]() |
67bd5a32fd | ||
![]() |
ada3629507 | ||
![]() |
dcb7314306 | ||
![]() |
e3c2ad6354 | ||
![]() |
178ea252d5 | ||
![]() |
7e4ba4eb31 | ||
![]() |
de43de17f6 | ||
![]() |
2ceb9c429a | ||
![]() |
0b59f53fe9 | ||
![]() |
62fce859b9 | ||
![]() |
9fc97764c5 | ||
![]() |
2813d9412d | ||
![]() |
a0bf76a4b1 | ||
![]() |
d2a79e8837 | ||
![]() |
738ef496d4 | ||
![]() |
a2734ffa72 | ||
![]() |
8606d30e9a | ||
![]() |
a45084cfc3 | ||
![]() |
eeaf6f3514 | ||
![]() |
9e18ff1cd1 | ||
![]() |
665239fd37 | ||
![]() |
12f9a7187e | ||
![]() |
8835351b99 | ||
![]() |
a3c44912f2 | ||
![]() |
db9f735376 | ||
![]() |
875a7242d4 | ||
![]() |
51ecdc64a4 | ||
![]() |
7b785ea454 | ||
![]() |
8f5fc44755 | ||
![]() |
010dbfa6f2 | ||
![]() |
e20a19c358 | ||
![]() |
387e513949 | ||
![]() |
5e005e6520 | ||
![]() |
e88f40cd95 | ||
![]() |
82e93a53a3 | ||
fee5668c1c | |||
![]() |
abb8cbe75d | ||
![]() |
340df51429 | ||
![]() |
bec8feb05a | ||
![]() |
d86ccded53 | ||
![]() |
db7d92a5cd | ||
![]() |
30ffdd03c7 | ||
251d8de943 | |||
![]() |
5e8de68746 | ||
![]() |
8ae29c8c00 | ||
![]() |
542efa0d9a | ||
![]() |
23c80accfa | ||
![]() |
b909430725 | ||
![]() |
20b413bc67 | ||
![]() |
a9b6b86183 | ||
![]() |
66b724759d | ||
![]() |
56059448c5 | ||
![]() |
1c52eeb910 | ||
![]() |
4aefe4bf7a | ||
![]() |
b9444cdc51 | ||
![]() |
eb72e4c9f5 | ||
![]() |
aa181ee43f | ||
![]() |
ab04f92072 | ||
![]() |
0830329eaf | ||
![]() |
2d154cc90e | ||
![]() |
183280871f | ||
![]() |
067ee80ba0 | ||
![]() |
804e2f39f9 | ||
![]() |
0ad7e52b71 | ||
![]() |
e15110bbe1 | ||
![]() |
2cffda6974 | ||
2300f6c226 | |||
1ed8a1b6f3 | |||
c4ed7719e8 | |||
a98fe45204 | |||
5a3e26453f | |||
c259000cdb | |||
d683f0d9eb | |||
48b8886224 | |||
1097220d31 | |||
fdeae72d38 | |||
f870bc2ccd | |||
ec3bfa3cb7 | |||
c3f7c5d154 | |||
127b93c1e2 | |||
cd019f258f | |||
889b7361fe | |||
99f6d4aba4 | |||
69deddcbc7 | |||
58020b4b58 | |||
df43e72a08 | |||
326e2c630c | |||
36fdfd529f | |||
94bdc9c5b3 | |||
c60e51514c | |||
7dcbbf17c3 | |||
5551deb246 | |||
6e8fd42efd | |||
5020100ef8 | |||
6c2c6abfb9 | |||
![]() |
4940c34779 | ||
![]() |
6d5aebeaa0 | ||
d8924119b5 | |||
4b445e7d35 | |||
17e47a0c93 | |||
2ffb570850 | |||
aef2fb8ce0 | |||
875fcdfb94 | |||
![]() |
151f856b0a | ||
337787be0e | |||
798521466d | |||
678c035fa3 | |||
ccb4210f8b | |||
7e5dc6ad64 | |||
31622d0458 | |||
f9b18545f9 | |||
![]() |
e67eccd1eb | ||
![]() |
cefe212a17 | ||
![]() |
8a76d71bd5 | ||
![]() |
806df95114 | ||
![]() |
c6c0b9ce8a | ||
00a0970c95 | |||
cb1bd95f2b | |||
d12b52f82a | |||
891ffaac09 | |||
36fbf0e332 | |||
e811238d60 | |||
c9e6bef825 | |||
0f002b9b69 | |||
f179a057bc | |||
6f5042be8f | |||
2044474549 | |||
0b0b93f26f | |||
595f8762ab | |||
8644eb431e | |||
223afdfc7e | |||
de41cab08e | |||
3606a42ea8 | |||
6887c7edae | |||
![]() |
4a00691385 | ||
![]() |
1d0a2c4fac | ||
![]() |
d0016380e5 | ||
29dc311c6a | |||
7aa78a1aed | |||
989f64192f | |||
c908c6bd05 | |||
![]() |
9f51b72cab | ||
a2fd817915 | |||
5bafdd05a9 | |||
![]() |
e18708bdbe | ||
![]() |
f6687c1f88 | ||
![]() |
b9eabca403 | ||
![]() |
9ec2c62f2f | ||
d4152ea546 | |||
8cc62b5b42 | |||
e242015145 | |||
35da97936d | |||
bfe21176ea | |||
d1dd9ab517 | |||
c18dbe974a | |||
f69563da75 | |||
057eca56d5 | |||
a21a64e0c6 | |||
751af5bcd8 | |||
c8605009ba | |||
5625caebda | |||
fc0a78dd7b | |||
90aab37002 | |||
5c1a529df0 | |||
6fa015c410 | |||
2d1e68b53b | |||
35012a3bad | |||
190b76d7fd | |||
![]() |
8d0b1214d2 | ||
70eb2a49f9 | |||
f231ea0951 | |||
f9ffdd5137 | |||
![]() |
38f9955391 | ||
517ff9af28 | |||
62a91acb40 | |||
69a5266675 | |||
e671741329 | |||
ab55f27ea4 | |||
cf88b3057a | |||
af97eedcbb | |||
7823001594 | |||
a49f87179a | |||
b52f85ac38 | |||
470bc77551 | |||
a0822a6b71 | |||
15da2f85ad | |||
9b3ff9e615 | |||
df1db163f0 | |||
4a4d814a17 | |||
![]() |
c84360ba4b | ||
6a6064d614 | |||
49565a99f9 | |||
ee27bc3bbf | |||
25899d41d5 | |||
35f6a2e2bf | |||
9ae5cbbc87 | |||
0ace93cec7 | |||
d387448794 | |||
4d82917b94 | |||
![]() |
7a77f48963 | ||
dee5dfc682 | |||
5ed6f834c1 | |||
3b8e5f0763 | |||
7c1798513d | |||
e54950e02e | |||
b2f060795c | |||
940ad61ccc | |||
c1f531ea92 | |||
0ebca7e8e3 | |||
d301669726 | |||
010bb0a2fe | |||
f028002c11 | |||
11e1747ffc | |||
5dc9333bb6 | |||
f77acb6db6 | |||
22abf09bd7 | |||
9a1d7a2ae3 | |||
98e5908557 | |||
9e36fe090c | |||
b4b6968ede | |||
999c4c51a2 | |||
8737a6a4fd | |||
a9a5d13e06 | |||
![]() |
ca1e2ba91e | ||
2e34969bbc | |||
cead0b2fb8 | |||
![]() |
9d566aea68 | ||
2d9933a4a9 | |||
cd699c587b | |||
4108007b26 | |||
b31b42a557 | |||
c3f187abcb | |||
2989d955d9 | |||
ea4409897d | |||
7dd7f021b0 | |||
2cb53ec45c | |||
![]() |
8fa3e45e47 | ||
c4a5d111e7 | |||
dca45a9b18 | |||
6ffebbd5c1 | |||
aa07775a32 | |||
30244f9d9b | |||
19d4a5ce26 | |||
e4cb730c1b | |||
3b18e54545 | |||
2fbbd8e7d1 | |||
e466331407 | |||
5d1f46e6c4 | |||
36318def69 | |||
72e4b16c1a | |||
8a10c3a097 | |||
d402300dba | |||
ada6753255 | |||
ceb0749e0d | |||
4863ab3711 | |||
c745cc8aa1 | |||
273902f616 | |||
bb761aea96 | |||
d13a7d2872 | |||
49b2ca061c | |||
![]() |
3e23ec8d27 | ||
22eeb90b81 | |||
6a69cef2a8 | |||
c1fef302f3 | |||
bd370cf407 | |||
feba993019 | |||
623a11dd8f | |||
ba7fb00450 | |||
20b4186331 | |||
2479645d22 | |||
![]() |
8585e2e955 | ||
![]() |
14518dc396 | ||
ccd64b6f07 | |||
21efdb9bd0 | |||
94778c74dc | |||
![]() |
929c09fecc | ||
c067f38123 | |||
046d1e01b0 | |||
cc6247fe7e | |||
![]() |
797a31924d | ||
87f9b619e5 | |||
![]() |
4ac89e7024 | ||
fceda68cd8 | |||
07fc66ccff | |||
d7b512ca9a | |||
![]() |
926f88585a | ||
717e1c58fa | |||
4b3dbd8915 | |||
![]() |
9d31a41ffe | ||
![]() |
217571118b | ||
![]() |
b03e919cbe | ||
![]() |
482b305065 | ||
![]() |
27776cddb2 | ||
![]() |
029e082cfc | ||
![]() |
6087a46a0b | ||
b78f6a645c | |||
f8b04e398e | |||
097f178e2a | |||
d221846c31 | |||
fa08d2f946 | |||
336563e7c0 | |||
f4ac8e02f6 | |||
29d2051a34 | |||
e52359c4c0 | |||
d73b327fd0 | |||
![]() |
d1bdeae596 | ||
![]() |
fa8bd4310c | ||
4f8f8b659b | |||
5a9eb68160 | |||
![]() |
b97ec8da90 | ||
a3fe0092ac | |||
896dbfbacf | |||
4d3561c92a | |||
![]() |
3c7b658a59 | ||
![]() |
6482437795 | ||
12e2dabaa8 | |||
e05545ab7c | |||
f0bcab2e2c | |||
075ac7ab43 | |||
31d7d7d9bb | |||
![]() |
ed14aa130c | ||
81007c1a03 | |||
2e3ff679f3 | |||
a84996399e | |||
![]() |
7b872474fd | ||
![]() |
531b7c2ae9 | ||
![]() |
95f16c99bd | ||
![]() |
462180f9a4 | ||
![]() |
505c49ad01 | ||
![]() |
16d6cf0177 | ||
112beb552b | |||
![]() |
b53cdafc84 | ||
365b9053ec | |||
![]() |
aadc9a13aa | ||
![]() |
39f3e3a92c | ||
![]() |
9a6374c79b | ||
3a392e84a9 | |||
c119de6188 | |||
066833819b | |||
c840f223cd | |||
4c2bf3e42f | |||
6ec95a7f13 | |||
670e57b9e5 | |||
![]() |
d441ead884 | ||
![]() |
38f654edd9 | ||
25b4d136b8 | |||
2b9783028d | |||
6c0e18d3e2 | |||
e23f671ca3 | |||
2af7066074 | |||
220f641ba6 | |||
76493b398f | |||
f1a277c4d7 | |||
ac76d544b9 | |||
cd77461fba | |||
326178ad47 | |||
0fce24479f | |||
3f895d32dd | |||
2af26f7d5b | |||
765d4ea725 | |||
ec231ecd78 | |||
957767c985 | |||
3cc7374984 | |||
6461c8e880 | |||
edfbc4081b | |||
317bf1e9db | |||
f985004be0 | |||
4fd834d13e | |||
370f96acfb | |||
d8b308dd9d | |||
3ad8f9b9a5 | |||
4fe9a27e2e | |||
686fe88e61 | |||
9b5e4373d4 | |||
03b1a4dfc0 | |||
27e422f81d | |||
f3e821a65d | |||
3fac44874e | |||
f8df7eba7f | |||
4574ebd8a9 | |||
a00b9bb0c7 | |||
e091eeae90 | |||
0a98147315 | |||
e9cc4a4357 | |||
0ab4730002 | |||
31d7b6fb7d | |||
26e5f4c482 | |||
766649bd54 | |||
bb6641ed96 | |||
6aa81f7ec6 | |||
![]() |
a3fc8af1dd | ||
![]() |
05082e3ffa | ||
![]() |
4b655070d4 | ||
f25037447d | |||
df3a03afc5 | |||
ded4bde905 | |||
![]() |
e1d8e360a5 | ||
![]() |
b373e253c9 | ||
a9d84da3b3 | |||
4b7c62aa9c | |||
e16c0a3271 | |||
ef66457181 | |||
093c46c937 | |||
d48d16d237 | |||
65cd84dd2e | |||
c457ef68c7 | |||
f00b86475d | |||
90bc00436c | |||
1af32bfe79 | |||
25338019ca | |||
878c11b36f | |||
c6c9ba76d9 | |||
a0261e8fd7 | |||
d493028c1e | |||
3992ea235d | |||
31b527a4c4 | |||
09b647f283 | |||
40b312d7c1 | |||
fad9d0e3da | |||
31a57b1a60 | |||
50e44ece54 | |||
f233416bf6 | |||
1b3885720a | |||
82dd9435a3 | |||
bc89d247ec | |||
fe36482063 | |||
a47f6d1b2e | |||
8aa23c7dc7 | |||
0eef0dd21b | |||
a12a26f65c | |||
1ebed8b6aa | |||
deb0fe338c | |||
005f79c95f | |||
eeee8d7600 | |||
13cfdf0d5a | |||
e77c3f23d3 | |||
d157daea10 | |||
9aa36562b9 | |||
6a36b79a95 | |||
2cd2f25c56 | |||
8631db8769 | |||
7da2ac9ef3 | |||
4da58258f5 | |||
4f78040569 | |||
0738d1d1fb | |||
e99e15209a | |||
![]() |
96a8aa9d0c | ||
![]() |
0bbd747f82 | ||
e31b837a7f | |||
ab7e428624 | |||
565e7f4d67 | |||
910de68495 | |||
e904c9981e | |||
ddc372f58c | |||
4ff234c110 | |||
69ef47e68c | |||
59901ec7c3 | |||
13e38f3d3e | |||
4b85f06951 | |||
08df2ba907 | |||
7a192b4961 | |||
d18f622458 | |||
8a482659e0 | |||
eeecede382 | |||
d49741c2db | |||
2ac2850cd4 | |||
3d56545210 | |||
5de76252ea | |||
778d6a2809 | |||
![]() |
f90cbaba5a | ||
6510e07b8b | |||
4996c05361 | |||
78effe14ad | |||
122b12fa31 | |||
438703a29b | |||
467a48cfe1 | |||
2b1c6a9d8f | |||
f1307614c6 | |||
ea8e340895 | |||
26af857dc7 | |||
f04526d83a | |||
a255a60944 | |||
b4de0cfaf9 | |||
2188d6b222 | |||
0528e4109d | |||
47f09479ad | |||
80d24fa70d | |||
![]() |
bef9ea11bf | ||
![]() |
278090a772 | ||
eab688b0bc | |||
788c72c331 | |||
90d9843acc | |||
d7095b69b9 | |||
dd96e29213 | |||
fd3e181b7c | |||
d7b5783674 | |||
634802c008 | |||
9e233b42a5 | |||
4cf8bfbe0d | |||
e1beeb3653 | |||
82a918b37d | |||
b6ecad3c0f | |||
e9d56d85af | |||
b874bb2ba0 | |||
7f179551b7 | |||
10be87bb59 | |||
5173d24c72 | |||
f4a37ce75f | |||
![]() |
ff4cfd3eb0 | ||
![]() |
8b6d8507ec | ||
![]() |
65356f09a6 | ||
![]() |
b0c6c845bf | ||
![]() |
6859baba9f | ||
![]() |
c14541f4a3 | ||
![]() |
1083d2939b | ||
2a8f23602a | |||
da5c92a599 | |||
baa26aec26 | |||
9da290831b | |||
882f853b1d | |||
a7de9a7f24 | |||
f2f6dfbf18 | |||
5e2db982dd | |||
bc11e66429 | |||
da8f49a712 | |||
a97085ac67 | |||
eb7211660f | |||
b182562c80 | |||
25a80c78b5 | |||
c69af8308f | |||
0cc1861649 | |||
57cd4c5843 | |||
cd035e1247 | |||
73886d06e8 | |||
![]() |
ae199581be | ||
bf425d8ac9 | |||
![]() |
823dc72eaa | ||
3716ccc3ef | |||
108b3a2363 | |||
35bb5896a1 | |||
da9bfd48c0 | |||
![]() |
0bd3df6d98 | ||
![]() |
0656abd101 | ||
![]() |
5299eb365f | ||
53eb0fe7f8 | |||
4cdaa11024 | |||
e642d8e538 | |||
cc5f13fc5e | |||
80f66113c4 | |||
b3d5accca2 | |||
12ac06d5ba | |||
7b47d3f314 | |||
0d2dbcc8fc | |||
e2cc62a21f | |||
689b26102b | |||
c989addadc | |||
5e00bc6510 | |||
828311a24f | |||
5976d4952f | |||
80ae2ccea6 | |||
370b7f1124 | |||
26b90b9d17 | |||
c8647fc3a5 | |||
3fa15824ee | |||
1752291ffd | |||
![]() |
4edb9bbf7f | ||
![]() |
e88a585703 | ||
928c0e9b91 | |||
83a4f5f2f0 | |||
f54db66f77 | |||
f16981d844 | |||
f6b5a2d493 | |||
14b33a1e4c | |||
c99adeeb61 | |||
b979a97905 | |||
916b296ee0 | |||
f9f64a441b | |||
2482df7121 | |||
f9d7cfa7e1 | |||
5229c0e811 | |||
1ca9674f3f | |||
c77e41c59e | |||
8c4410277d | |||
2ec9a4ab64 | |||
6b05acff8d | |||
471b53698a | |||
7404bdc4fd | |||
9307cc8a0c | |||
6dd0b23c61 | |||
97f002bfb5 | |||
22ca4d0e44 | |||
86fc6478f5 | |||
dee92b5290 | |||
b19b529afe | |||
0c4cf5d3cd | |||
eeb7ea4cae | |||
23634afbc9 | |||
acf3abb19b | |||
c5435410ba | |||
786d68ce9a | |||
0170ff2337 | |||
a5c0448053 | |||
7a1e2865fc | |||
0c19216c4c | |||
f2787a8df6 | |||
7654a0af42 | |||
5c1700c2ab | |||
6487fb0516 | |||
42fb3bb2e9 | |||
![]() |
f57876dc3b | ||
![]() |
0a7027dd9b | ||
![]() |
1154d28be7 | ||
0e68df6ba4 | |||
7707c4bb94 | |||
![]() |
56639fa7d2 | ||
f0a15d084a | |||
de6cee8f6a | |||
8b075f26bf | |||
5455820a74 | |||
d38c660c36 | |||
3f629ce1af | |||
29f9986f40 | |||
d505a2fe76 | |||
3eb573295b | |||
0b9babab42 | |||
c190ddd6b0 | |||
53118fa9c6 | |||
8cf241f6da | |||
6774af6910 | |||
eb73f0aae2 | |||
0bec84a3b1 | |||
![]() |
75c2d24c45 | ||
![]() |
53e77df77d | ||
326a85ea4f | |||
e567f7b460 | |||
ab28ee960e | |||
88a4261b03 | |||
e7a66659e9 | |||
44a935d086 | |||
1e5414f74f | |||
357d400bc6 | |||
594f1c7f8b | |||
4a845f0b73 | |||
bc791f91ab | |||
f938090d6a | |||
d9ea6b1f9c | |||
5bed4a0d7f | |||
4826bbd333 | |||
0540c76c51 | |||
f081e88420 | |||
4030d0b427 | |||
c5f6c9a498 | |||
403440bab8 | |||
8ed7a029d7 | |||
ec6807cd2c | |||
226494028a | |||
4bcd896829 | |||
2524a7a69d | |||
2805388a4c | |||
631a082ebd | |||
24b98b86c2 | |||
5ee903765e | |||
c0db50ed0f | |||
3403ea3b51 | |||
daf595ab7e | |||
fd958df118 | |||
dd794ceee4 | |||
c19a63c6a2 | |||
84bea6438f | |||
d3bd2ce190 | |||
e82f420ee6 | |||
a035901f0a | |||
e73ddb548a | |||
fd87c609f2 | |||
17060c0100 | |||
fe16ccb434 | |||
a46100bde5 | |||
0478ac75e9 | |||
d42235486e | |||
dd3dbbf7f9 | |||
![]() |
efe85cc30a | ||
![]() |
0b3e6acb97 | ||
![]() |
aa6c218122 | ||
![]() |
033c37f4a0 | ||
e7ddee5509 | |||
f8283c04ca | |||
0f7bcbf4bb | |||
![]() |
c4fce448c3 | ||
c4c75c0ce5 | |||
2988e58cb2 | |||
![]() |
21ae518102 | ||
8bebb884c3 | |||
4401265200 | |||
![]() |
094613b8de | ||
![]() |
6e38cce149 | ||
![]() |
9c626a07c5 | ||
![]() |
80db2faeb7 | ||
![]() |
b31eb3f53b | ||
![]() |
b572a330ed | ||
98f7f30864 | |||
23d24a48b5 | |||
064e4046a6 | |||
![]() |
50c86147b0 | ||
3c9e78bd76 | |||
f65cfbf92c | |||
![]() |
4ad4e579d8 | ||
![]() |
1f6b3c1107 | ||
a2a646e1f5 | |||
ea05af42fa | |||
![]() |
520faf477d | ||
![]() |
cf2a4ba053 | ||
1a0b25a6ef | |||
23598ab011 | |||
7ac189696b | |||
ecdccac37e | |||
e865f451ca | |||
3d80f0122f | |||
0a34f3d5dd | |||
![]() |
b588297458 | ||
![]() |
b524e91888 | ||
![]() |
29f8fec912 | ||
09d31cb107 | |||
fa9f60bcd9 | |||
63b48e30be | |||
e714e7082e | |||
9966c40d28 | |||
9dbec9fbb5 | |||
aa472feea9 | |||
c7a6584481 | |||
ae994e3230 | |||
fcd8a3ae69 | |||
ccaf4ce4b9 | |||
5772b7d9ae | |||
61ec10ff47 | |||
c3138793fe | |||
c5904b080b | |||
7d10ef7a19 | |||
938410d68b | |||
dd0d84fece | |||
b2aa649c2a | |||
74020ae5a3 | |||
6f3cfd83cd | |||
10b8c92fdb | |||
520da91735 | |||
d73fc85c34 | |||
4eca698584 | |||
3fa3b69cbc | |||
bf94460420 | |||
d054652952 | |||
ad3c978c7c | |||
3277ea4854 | |||
7b6e25db8b | |||
1974cc5559 | |||
9c534fda7b | |||
a5efce883a | |||
6197454225 | |||
64e9e2aebe | |||
faf130cf38 | |||
831c1945a5 | |||
26ecf364a6 | |||
74b61a7ba6 | |||
d65208b917 | |||
bf70a1520b | |||
3a3416d2a5 | |||
00667151da | |||
a9abf3babf | |||
cad3c46ea6 | |||
9289a6daa9 | |||
![]() |
f2f29d6a6c | ||
![]() |
3e888f8936 | ||
![]() |
cbccba8dc2 | ||
7cfc16ca36 | |||
f7a2d23f1e | |||
31e8ff8f45 | |||
3a7ee4f211 | |||
cc3c2d4d1a | |||
11d89e248e | |||
2bb94bea80 |
31
.dockerignore
Normal file
31
.dockerignore
Normal file
@@ -0,0 +1,31 @@
|
||||
.idea
|
||||
.git
|
||||
Dockerfile
|
||||
|
||||
|
||||
# Gradle
|
||||
.gradle
|
||||
build
|
||||
apps/BOB/build
|
||||
apps/addressbook/build
|
||||
apps/desktopgui/build
|
||||
apps/i2pcontrol/build
|
||||
apps/i2psnark/build
|
||||
apps/i2ptunnel/build
|
||||
apps/imagegen/build
|
||||
apps/jetty/build
|
||||
apps/jrobin/build
|
||||
apps/ministreaming/java/build
|
||||
apps/ministreaming/build
|
||||
apps/routerconsole/build
|
||||
apps/sam/build
|
||||
apps/streaming/build
|
||||
apps/susidns/build
|
||||
apps/susimail/build
|
||||
apps/systray/build
|
||||
core/java/build
|
||||
core/build
|
||||
installer/build
|
||||
router/java/build
|
||||
router/build
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@@ -54,4 +54,10 @@ sloccount.sc
|
||||
.settings/
|
||||
# IDEA
|
||||
*.iml
|
||||
.idea
|
||||
|
||||
# Gradle
|
||||
.gradle
|
||||
|
||||
# TODO: why does this file appear?
|
||||
apps/routerconsole/jsp/favicon.ico
|
||||
|
102
.gitlab-ci.yml
Normal file
102
.gitlab-ci.yml
Normal file
@@ -0,0 +1,102 @@
|
||||
image: openjdk:8-alpine
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
test:gradle:
|
||||
stage: test
|
||||
coverage: '/Total.*?([0-9]{1,3})%/'
|
||||
before_script:
|
||||
- apk add --no-cache grep
|
||||
script:
|
||||
- ./gradlew codeCoverageReport
|
||||
# The actual output that will be parsed by the code coverage
|
||||
- grep -oP "Total.*?%" build/reports/jacoco/html/index.html
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- .gradle
|
||||
only:
|
||||
- master
|
||||
- merge_requests
|
||||
- tags
|
||||
|
||||
test:ant:
|
||||
stage: test
|
||||
image: debian:buster-slim
|
||||
variables:
|
||||
SCALA: https://downloads.lightbend.com/scala/2.12.13/scala-2.12.13.deb
|
||||
LIBPREFIX: /usr/share/scala/lib
|
||||
LIB_SCALATEST: https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/3.0.4/scalatest_2.12-3.0.4.jar
|
||||
LIB_SCALACTIC: https://repo1.maven.org/maven2/org/scalactic/scalactic_2.12/3.0.4/scalactic_2.12-3.0.4.jar
|
||||
before_script:
|
||||
# Fix bug installing openjdk-11-jdk-headless's manuals
|
||||
- mkdir -p /usr/share/man/man1/
|
||||
- apt-get update -q
|
||||
- apt-get install -y wget gettext
|
||||
ant default-jdk-headless
|
||||
libmockito-java libhamcrest-java junit4
|
||||
# Install specific version of scala
|
||||
- wget -qO scala.deb "${SCALA}"
|
||||
- dpkg -i scala.deb
|
||||
# link to the scala libs with the name `ant test` expects
|
||||
- ln -s "${LIBPREFIX}/scala-xml_2.12-1.0.6.jar" "${LIBPREFIX}/scala-xml.jar"
|
||||
# Download required scala libs
|
||||
- wget -qO "${LIBPREFIX}/scalactic.jar" "${LIB_SCALACTIC}"
|
||||
- wget -qO "${LIBPREFIX}/scalatest.jar" "${LIB_SCALATEST}"
|
||||
# Point ant to the right directories
|
||||
- echo scalatest.libs=/usr/share/scala/lib > override.properties
|
||||
- echo junit.home=/usr/share/java >> override.properties
|
||||
- echo hamcrest.home=/usr/share/java >> override.properties
|
||||
- echo mockito.home=/usr/share/java >> override.properties
|
||||
script:
|
||||
- ant test
|
||||
only:
|
||||
- master
|
||||
- merge_requests
|
||||
- tags
|
||||
|
||||
# Make sure we can build a docker image
|
||||
# It's cached for later jobs
|
||||
build_docker:
|
||||
stage: build
|
||||
image: docker:19.03.12
|
||||
services:
|
||||
- docker:19.03.12-dind
|
||||
script:
|
||||
# Try to load latest branch image from local tar or from registry
|
||||
- docker load -i ci-exports/$CI_COMMIT_REF_SLUG.tar || docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:latest .
|
||||
- mkdir -p ci-exports/
|
||||
- docker save $CI_REGISTRY_IMAGE:latest > ci-exports/$CI_COMMIT_REF_SLUG.tar
|
||||
variables:
|
||||
# When using dind service, we need to instruct docker to talk with
|
||||
# the daemon started inside of the service. The daemon is available
|
||||
# with a network connection instead of the default
|
||||
# /var/run/docker.sock socket. Docker 19.03 does this automatically
|
||||
# by setting the DOCKER_HOST in
|
||||
# https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03/docker-entrypoint.sh#L23-L29
|
||||
#
|
||||
# The 'docker' hostname is the alias of the service container as described at
|
||||
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services.
|
||||
#
|
||||
# Specify to Docker where to create the certificates, Docker will
|
||||
# create them automatically on boot, and will create
|
||||
# `/certs/client` that will be shared between the service and job
|
||||
# container, thanks to volume mount from config.toml
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
|
||||
DOCKER_HOST: tcp://docker:2376
|
||||
cache:
|
||||
# The same key should be used across branches
|
||||
key: "$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- ci-exports/
|
||||
only:
|
||||
- master
|
||||
- merge_requests
|
||||
- tags
|
||||
|
6
.idea/ant.xml
generated
6
.idea/ant.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AntConfiguration">
|
||||
<buildFile url="file://$PROJECT_DIR$/build.xml" />
|
||||
</component>
|
||||
</project>
|
41
.idea/compiler.xml
generated
41
.idea/compiler.xml
generated
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel>
|
||||
<module name="addressbook_main" target="1.7" />
|
||||
<module name="addressbook_test" target="1.7" />
|
||||
<module name="BOB_main" target="1.7" />
|
||||
<module name="BOB_test" target="1.7" />
|
||||
<module name="core_main" target="1.7" />
|
||||
<module name="core_test" target="1.7" />
|
||||
<module name="desktopgui_main" target="1.7" />
|
||||
<module name="desktopgui_test" target="1.7" />
|
||||
<module name="i2psnark_main" target="1.7" />
|
||||
<module name="i2psnark_test" target="1.7" />
|
||||
<module name="i2ptunnel_main" target="1.7" />
|
||||
<module name="i2ptunnel_test" target="1.7" />
|
||||
<module name="installer_main" target="1.7" />
|
||||
<module name="installer_test" target="1.7" />
|
||||
<module name="jetty_main" target="1.7" />
|
||||
<module name="jetty_test" target="1.7" />
|
||||
<module name="jrobin_main" target="1.7" />
|
||||
<module name="jrobin_test" target="1.7" />
|
||||
<module name="ministreaming_main" target="1.7" />
|
||||
<module name="ministreaming_test" target="1.7" />
|
||||
<module name="router_main" target="1.7" />
|
||||
<module name="router_test" target="1.7" />
|
||||
<module name="routerconsole_main" target="1.7" />
|
||||
<module name="routerconsole_test" target="1.7" />
|
||||
<module name="sam_main" target="1.7" />
|
||||
<module name="sam_test" target="1.7" />
|
||||
<module name="streaming_main" target="1.7" />
|
||||
<module name="streaming_test" target="1.7" />
|
||||
<module name="susidns_main" target="1.7" />
|
||||
<module name="susidns_test" target="1.7" />
|
||||
<module name="susimail_main" target="1.7" />
|
||||
<module name="susimail_test" target="1.7" />
|
||||
<module name="systray_main" target="1.7" />
|
||||
<module name="systray_test" target="1.7" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
3
.idea/copyright/profiles_settings.xml
generated
3
.idea/copyright/profiles_settings.xml
generated
@@ -1,3 +0,0 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="javax.servlet.jsp-2.2.0.v201112011158">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
22
.idea/libraries/jettylib.xml
generated
22
.idea/libraries/jettylib.xml
generated
@@ -1,22 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="jettylib">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-security-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-servlets-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-deploy-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-util-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-servlet-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-http-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-xml-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-server-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/servlet-api-3.0.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-jmx-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-webapp-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-io-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-continuation-8.1.17.v20150415.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/lib/jetty-rewrite-8.1.17.v20150415.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/jrobin_1_5_9_1.xml
generated
9
.idea/libraries/jrobin_1_5_9_1.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="jrobin-1.5.9.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/jrobin/jrobin-1.5.9.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
10
.idea/libraries/lib.xml
generated
10
.idea/libraries/lib.xml
generated
@@ -1,10 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/susidns/src/lib/jstl.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/susidns/src/lib/standard.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/start.xml
generated
9
.idea/libraries/start.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="start">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/jetty-distribution-8.1.17.v20150415/start.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/systray4j.xml
generated
9
.idea/libraries/systray4j.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="systray4j">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/systray/java/lib/systray4j.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/tomcat_coyote_util.xml
generated
9
.idea/libraries/tomcat_coyote_util.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="tomcat-coyote-util">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/apache-tomcat/lib/tomcat-coyote-util.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
12
.idea/libraries/tomcat_lib.xml
generated
12
.idea/libraries/tomcat_lib.xml
generated
@@ -1,12 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="tomcat-lib">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/apache-tomcat-deployer/lib/tomcat-juli.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/apache-tomcat-deployer/lib/el-api.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/apache-tomcat-deployer/lib/jasper.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/apps/jetty/apache-tomcat-deployer/lib/jasper-el.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/wrapper.xml
generated
9
.idea/libraries/wrapper.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="wrapper">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/installer/lib/wrapper/all/wrapper.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/wrapper_win.xml
generated
9
.idea/libraries/wrapper_win.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="wrapper-win">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/installer/lib/wrapper/win-all/wrapper.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
57
.idea/misc.xml
generated
57
.idea/misc.xml
generated
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ClientPropertiesManager">
|
||||
<properties class="javax.swing.AbstractButton">
|
||||
<property name="hideActionText" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JComponent">
|
||||
<property name="html.disable" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JEditorPane">
|
||||
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
|
||||
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
|
||||
<property name="charset" class="java.lang.String" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JList">
|
||||
<property name="List.isFileList" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JPasswordField">
|
||||
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JSlider">
|
||||
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
|
||||
<property name="JSlider.isFilled" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JTable">
|
||||
<property name="Table.isFileList" class="java.lang.Boolean" />
|
||||
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
|
||||
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JToolBar">
|
||||
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JTree">
|
||||
<property name="JTree.lineStyle" class="java.lang.String" />
|
||||
</properties>
|
||||
<properties class="javax.swing.text.JTextComponent">
|
||||
<property name="caretAspectRatio" class="java.lang.Double" />
|
||||
<property name="caretWidth" class="java.lang.Integer" />
|
||||
</properties>
|
||||
</component>
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build" />
|
||||
</component>
|
||||
</project>
|
80
.idea/modules.xml
generated
80
.idea/modules.xml
generated
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/BOB/BOB.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/BOB/BOB.iml" group="apps/BOB" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/BOB/BOB.iml" filepath="$PROJECT_DIR$/apps/BOB/BOB.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/BOB/BOB_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/BOB/BOB_main.iml" group="apps/BOB" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/BOB/BOB_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/BOB/BOB_test.iml" group="apps/BOB" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/addressbook/addressbook.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/addressbook/addressbook.iml" group="apps/addressbook" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/addressbook/addressbook.iml" filepath="$PROJECT_DIR$/apps/addressbook/addressbook.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/addressbook/addressbook_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/addressbook/addressbook_main.iml" group="apps/addressbook" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/addressbook/addressbook_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/addressbook/addressbook_test.iml" group="apps/addressbook" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/admin/admin.iml" filepath="$PROJECT_DIR$/apps/admin/admin.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/apps.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/apps.iml" group="apps" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core.iml" group="core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/core/core.iml" filepath="$PROJECT_DIR$/core/core.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_main.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_main.iml" group="core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_test.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_test.iml" group="core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/desktopgui/desktopgui.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/desktopgui/desktopgui.iml" group="apps/desktopgui" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/desktopgui/desktopgui.iml" filepath="$PROJECT_DIR$/apps/desktopgui/desktopgui.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/desktopgui/desktopgui_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/desktopgui/desktopgui_main.iml" group="apps/desktopgui" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/desktopgui/desktopgui_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/desktopgui/desktopgui_test.iml" group="apps/desktopgui" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/i2p.i2p.sl.iml" filepath="$PROJECT_DIR$/.idea/modules/i2p.i2p.sl.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/i2psnark/i2psnark.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/i2psnark/i2psnark.iml" group="apps/i2psnark" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/i2psnark/i2psnark.iml" filepath="$PROJECT_DIR$/apps/i2psnark/i2psnark.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/i2psnark/i2psnark_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/i2psnark/i2psnark_main.iml" group="apps/i2psnark" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/i2psnark/i2psnark_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/i2psnark/i2psnark_test.iml" group="apps/i2psnark" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/i2ptunnel/i2ptunnel.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/i2ptunnel/i2ptunnel.iml" group="apps/i2ptunnel" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/i2ptunnel/i2ptunnel.iml" filepath="$PROJECT_DIR$/apps/i2ptunnel/i2ptunnel.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/i2ptunnel/i2ptunnel_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/i2ptunnel/i2ptunnel_main.iml" group="apps/i2ptunnel" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/i2ptunnel/i2ptunnel_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/i2ptunnel/i2ptunnel_test.iml" group="apps/i2ptunnel" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/imagegen/identicon/identicon.iml" filepath="$PROJECT_DIR$/apps/imagegen/identicon/identicon.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/imagegen/imagegen/imagegen.iml" filepath="$PROJECT_DIR$/apps/imagegen/imagegen/imagegen.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/installer/installer.iml" filepath="$PROJECT_DIR$/.idea/modules/installer/installer.iml" group="installer" />
|
||||
<module fileurl="file://$PROJECT_DIR$/installer/installer.iml" filepath="$PROJECT_DIR$/installer/installer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/installer/installer_main.iml" filepath="$PROJECT_DIR$/.idea/modules/installer/installer_main.iml" group="installer" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/installer/installer_test.iml" filepath="$PROJECT_DIR$/.idea/modules/installer/installer_test.iml" group="installer" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/jetty/jetty.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/jetty/jetty.iml" group="apps/jetty" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/jetty/jetty.iml" filepath="$PROJECT_DIR$/apps/jetty/jetty.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/jetty/jetty_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/jetty/jetty_main.iml" group="apps/jetty" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/jetty/jetty_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/jetty/jetty_test.iml" group="apps/jetty" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/jrobin/jrobin.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/jrobin/jrobin.iml" group="apps/jrobin" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/jrobin/jrobin_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/jrobin/jrobin_main.iml" group="apps/jrobin" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/jrobin/jrobin_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/jrobin/jrobin_test.iml" group="apps/jrobin" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/ministreaming/ministreaming.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/ministreaming/ministreaming.iml" group="apps/ministreaming" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/ministreaming/ministreaming.iml" filepath="$PROJECT_DIR$/apps/ministreaming/ministreaming.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/ministreaming/ministreaming_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/ministreaming/ministreaming_main.iml" group="apps/ministreaming" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/ministreaming/ministreaming_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/ministreaming/ministreaming_test.iml" group="apps/ministreaming" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/router/router.iml" filepath="$PROJECT_DIR$/.idea/modules/router/router.iml" group="router" />
|
||||
<module fileurl="file://$PROJECT_DIR$/router/router.iml" filepath="$PROJECT_DIR$/router/router.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/router/router_main.iml" filepath="$PROJECT_DIR$/.idea/modules/router/router_main.iml" group="router" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/router/router_test.iml" filepath="$PROJECT_DIR$/.idea/modules/router/router_test.iml" group="router" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/routerconsole/routerconsole.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/routerconsole/routerconsole.iml" group="apps/routerconsole" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/routerconsole/routerconsole.iml" filepath="$PROJECT_DIR$/apps/routerconsole/routerconsole.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/routerconsole/routerconsole_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/routerconsole/routerconsole_main.iml" group="apps/routerconsole" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/routerconsole/routerconsole_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/routerconsole/routerconsole_test.iml" group="apps/routerconsole" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/sam/sam.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/sam/sam.iml" group="apps/sam" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/sam/sam.iml" filepath="$PROJECT_DIR$/apps/sam/sam.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/sam/sam_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/sam/sam_main.iml" group="apps/sam" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/sam/sam_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/sam/sam_test.iml" group="apps/sam" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/streaming/streaming.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/streaming/streaming.iml" group="apps/streaming" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/streaming/streaming.iml" filepath="$PROJECT_DIR$/apps/streaming/streaming.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/streaming/streaming_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/streaming/streaming_main.iml" group="apps/streaming" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/streaming/streaming_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/streaming/streaming_test.iml" group="apps/streaming" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/susidns/susidns.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/susidns/susidns.iml" group="apps/susidns" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/susidns/susidns.iml" filepath="$PROJECT_DIR$/apps/susidns/susidns.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/susidns/susidns_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/susidns/susidns_main.iml" group="apps/susidns" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/susidns/susidns_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/susidns/susidns_test.iml" group="apps/susidns" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/susimail/susimail.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/susimail/susimail.iml" group="apps/susimail" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/susimail/susimail.iml" filepath="$PROJECT_DIR$/apps/susimail/susimail.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/susimail/susimail_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/susimail/susimail_main.iml" group="apps/susimail" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/susimail/susimail_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/susimail/susimail_test.iml" group="apps/susimail" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/systray/systray.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/systray/systray.iml" group="apps/systray" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/systray/systray.iml" filepath="$PROJECT_DIR$/apps/systray/systray.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/systray/systray_main.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/systray/systray_main.iml" group="apps/systray" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apps/systray/systray_test.iml" filepath="$PROJECT_DIR$/.idea/modules/apps/systray/systray_test.iml" group="apps/systray" />
|
||||
<module fileurl="file://$PROJECT_DIR$/apps/imagegen/zxing/zxing.iml" filepath="$PROJECT_DIR$/apps/imagegen/zxing/zxing.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/runConfigurations/updater.xml
generated
6
.idea/runConfigurations/updater.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="updater" type="AntRunConfiguration" factoryName="Ant Target">
|
||||
<antsettings antfile="file://$PROJECT_DIR$/build.xml" target="updater" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
90
.mtn-ignore
90
.mtn-ignore
@@ -1,90 +0,0 @@
|
||||
# Just to try and prevent some noob disasters.
|
||||
# Use mtn add --no-respect-ignore foo.jar to ignore this ignore list
|
||||
|
||||
# Temporary/build files
|
||||
_jsp\.java$
|
||||
\.bz2$
|
||||
\.tar$
|
||||
\.class$
|
||||
\.diff$
|
||||
\.exe$
|
||||
\.fba$
|
||||
\.gz$
|
||||
\.jar$
|
||||
\.out$
|
||||
\.patch$
|
||||
\.sig$
|
||||
\.sud$
|
||||
\.su2$
|
||||
.\su3$
|
||||
\.tar$
|
||||
\.war$
|
||||
.\deb$
|
||||
\.zip$
|
||||
\.torrent$
|
||||
^\.
|
||||
~$
|
||||
web-fragment.xml
|
||||
web-out.xml
|
||||
|
||||
# Temporary/build dirs
|
||||
^build$
|
||||
^pkg-temp
|
||||
/build$
|
||||
/classes
|
||||
/dist
|
||||
^installer/resources/locale/mo
|
||||
/tmp
|
||||
^apps/jetty/jettylib
|
||||
|
||||
# MSVC files
|
||||
core/c/jcpuid/msvc/*.opendb
|
||||
core/c/jcpuid/msvc/*.pdb
|
||||
core/c/jcpuid/msvc/*.sdf
|
||||
core/c/jcpuid/msvc/*.user
|
||||
|
||||
# Debian-related
|
||||
^debian/copyright
|
||||
^.pc/
|
||||
|
||||
# Build property overrides
|
||||
override.properties
|
||||
|
||||
# Launcher build paths
|
||||
launchers/macosx/target
|
||||
launchers/browserbundle/target
|
||||
launchers/macosx/project/target
|
||||
launchers/browserbundle/project/target
|
||||
launchers/target
|
||||
launchers/project/target
|
||||
launchers/common/target
|
||||
launchers/output
|
||||
launchers/project/project
|
||||
|
||||
# Reporting
|
||||
sloccount.sc
|
||||
^reports/
|
||||
|
||||
# IDE project files
|
||||
# Eclipse
|
||||
/.classpath$
|
||||
/.project$
|
||||
/.settings
|
||||
# IDEA
|
||||
\.iml$
|
||||
|
||||
|
||||
# Meeh stuff
|
||||
target/scala-2.12
|
||||
target/streams
|
||||
project/target
|
||||
launchers/macosx/version.h
|
||||
launchers/macosx/project/project/target
|
||||
launchers/macosx/I2PLauncher.xcodeproj/project.xcworkspace/xcuserdata
|
||||
launchers/macosx/I2PLauncher.xcodeproj/xcuserdata
|
||||
launchers/macosx/I2PLauncher.xcworkspace/xcuserdata
|
||||
launchers/macosx/Sparkle.framework
|
||||
launchers/macosx/I2PLauncher.app
|
||||
launchers/macosx/releases.done
|
||||
launchers/macosx/target
|
||||
|
37
.travis.yml
37
.travis.yml
@@ -1,39 +1,18 @@
|
||||
language: java
|
||||
dist: trusty
|
||||
dist: bionic
|
||||
|
||||
jdk:
|
||||
- oraclejdk11
|
||||
- oraclejdk9
|
||||
- openjdk12
|
||||
- openjdk11
|
||||
- openjdk10
|
||||
- openjdk9
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- jdk: oraclejdk8
|
||||
- jdk: oraclejdk11
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "i2p"
|
||||
before_install:
|
||||
- export JAVA7_HOME=$(jdk_switcher home openjdk7)
|
||||
- sed -i "1iplugins {\n id 'org.sonarqube' version '2.6.1'\n}\n" build.gradle
|
||||
- sed -i "1iplugins {\n id 'org.sonarqube' version '3.0'\n}\n" build.gradle
|
||||
- jdk: openjdk8
|
||||
before_install:
|
||||
- export JAVA7_HOME=$(jdk_switcher home openjdk7)
|
||||
- jdk: openjdk7
|
||||
sudo: required
|
||||
before_install: # Work around missing crypto in openjdk7
|
||||
- export JAVA7_HOME=$(jdk_switcher home openjdk7)
|
||||
- sudo wget "https://bouncycastle.org/download/bcprov-ext-jdk15on-158.jar" -O "${JAVA_HOME}/jre/lib/ext/bcprov-ext-jdk15on-158.jar"
|
||||
- sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
|
||||
- echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
|
||||
install:
|
||||
- export TARGET_JAVA_HOME=$JAVA_HOME
|
||||
- jdk_switcher use oraclejdk8
|
||||
- ./gradlew assemble
|
||||
allow_failures:
|
||||
- jdk: openjdk12
|
||||
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
@@ -45,13 +24,11 @@ cache:
|
||||
- $HOME/.sonar/cache/
|
||||
- .gradle
|
||||
|
||||
env:
|
||||
- SONAR_SCANNER_OPTS="-Xmx2048m"
|
||||
|
||||
script:
|
||||
- |
|
||||
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
|
||||
./gradlew sonarqube codeCoverageReport
|
||||
else
|
||||
./gradlew check codeCoverageReport
|
||||
fi
|
||||
- travis_wait 45 ./tests/scripts/travis.sh
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
149
.tx/config
149
.tx/config
@@ -1,3 +1,6 @@
|
||||
;; warning - conversions for all Java bundles:
|
||||
;; id->in, he->iw, iy, yi->ji
|
||||
|
||||
[I2P.i2ptunnel]
|
||||
source_file = apps/i2ptunnel/locale/messages_en.po
|
||||
source_lang = en
|
||||
@@ -24,6 +27,7 @@ trans.pt_BR = apps/i2ptunnel/locale/messages_pt_BR.po
|
||||
trans.ro = apps/i2ptunnel/locale/messages_ro.po
|
||||
trans.ru_RU = apps/i2ptunnel/locale/messages_ru.po
|
||||
trans.sk = apps/i2ptunnel/locale/messages_sk.po
|
||||
trans.sq = apps/i2ptunnel/locale/messages_sq.po
|
||||
trans.sv_SE = apps/i2ptunnel/locale/messages_sv.po
|
||||
trans.tr_TR = apps/i2ptunnel/locale/messages_tr.po
|
||||
trans.uk_UA = apps/i2ptunnel/locale/messages_uk.po
|
||||
@@ -46,6 +50,7 @@ trans.hu = apps/i2ptunnel/locale-proxy/messages_hu.po
|
||||
;; Java converts id to in
|
||||
trans.id = apps/i2ptunnel/locale-proxy/messages_in.po
|
||||
trans.it = apps/i2ptunnel/locale-proxy/messages_it.po
|
||||
trans.ja = apps/i2ptunnel/locale-proxy/messages_ja.po
|
||||
trans.ko = apps/i2ptunnel/locale-proxy/messages_ko.po
|
||||
trans.nb = apps/i2ptunnel/locale-proxy/messages_nb.po
|
||||
trans.nl = apps/i2ptunnel/locale-proxy/messages_nl.po
|
||||
@@ -62,10 +67,85 @@ trans.uk_UA = apps/i2ptunnel/locale-proxy/messages_uk.po
|
||||
trans.vi = apps/i2ptunnel/locale-proxy/messages_vi.po
|
||||
trans.zh_CN = apps/i2ptunnel/locale-proxy/messages_zh.po
|
||||
|
||||
[I2P.core]
|
||||
type = PO
|
||||
source_file = core/locale/messages_en.po
|
||||
source_lang = en
|
||||
trans.ar = core/locale/messages_ar.po
|
||||
trans.az = core/locale/messages_az.po
|
||||
trans.cs = core/locale/messages_cs.po
|
||||
trans.da = core/locale/messages_da.po
|
||||
trans.de = core/locale/messages_de.po
|
||||
trans.el = core/locale/messages_el.po
|
||||
trans.es = core/locale/messages_es.po
|
||||
trans.et_EE = core/locale/messages_et.po
|
||||
trans.fa = core/locale/messages_fa.po
|
||||
trans.fi = core/locale/messages_fi.po
|
||||
trans.fr = core/locale/messages_fr.po
|
||||
trans.hu = core/locale/messages_hu.po
|
||||
;; Java converts id to in
|
||||
trans.id = core/locale/messages_in.po
|
||||
trans.it = core/locale/messages_it.po
|
||||
trans.ja = core/locale/messages_ja.po
|
||||
trans.ko = core/locale/messages_ko.po
|
||||
trans.ku = core/locale/messages_ku.po
|
||||
trans.nb = core/locale/messages_nb.po
|
||||
trans.nl = core/locale/messages_nl.po
|
||||
trans.pl = core/locale/messages_pl.po
|
||||
trans.pt = core/locale/messages_pt.po
|
||||
trans.pt_BR = core/locale/messages_pt_BR.po
|
||||
trans.ro = core/locale/messages_ro.po
|
||||
trans.ru_RU = core/locale/messages_ru.po
|
||||
trans.sv_SE = core/locale/messages_sv.po
|
||||
trans.tk = core/locale/messages_tk.po
|
||||
trans.tr_TR = core/locale/messages_tr.po
|
||||
trans.uk_UA = core/locale/messages_uk.po
|
||||
trans.vi = core/locale/messages_vi.po
|
||||
trans.zh_CN = core/locale/messages_zh.po
|
||||
trans.zh_TW = core/locale/messages_zh_TW.po
|
||||
|
||||
[I2P.router]
|
||||
type = PO
|
||||
source_file = router/locale/messages_en.po
|
||||
source_lang = en
|
||||
trans.ar = router/locale/messages_ar.po
|
||||
trans.az = router/locale/messages_az.po
|
||||
trans.cs = router/locale/messages_cs.po
|
||||
trans.da = router/locale/messages_da.po
|
||||
trans.de = router/locale/messages_de.po
|
||||
trans.el = router/locale/messages_el.po
|
||||
trans.es = router/locale/messages_es.po
|
||||
trans.et_EE = router/locale/messages_et.po
|
||||
trans.fa = router/locale/messages_fa.po
|
||||
trans.fi = router/locale/messages_fi.po
|
||||
trans.fr = router/locale/messages_fr.po
|
||||
trans.hu = router/locale/messages_hu.po
|
||||
;; Java converts id to in
|
||||
trans.id = router/locale/messages_in.po
|
||||
trans.it = router/locale/messages_it.po
|
||||
trans.ja = router/locale/messages_ja.po
|
||||
trans.ko = router/locale/messages_ko.po
|
||||
trans.ku = router/locale/messages_ku.po
|
||||
trans.nb = router/locale/messages_nb.po
|
||||
trans.nl = router/locale/messages_nl.po
|
||||
trans.pl = router/locale/messages_pl.po
|
||||
trans.pt = router/locale/messages_pt.po
|
||||
trans.pt_BR = router/locale/messages_pt_BR.po
|
||||
trans.ro = router/locale/messages_ro.po
|
||||
trans.ru_RU = router/locale/messages_ru.po
|
||||
trans.sv_SE = router/locale/messages_sv.po
|
||||
trans.tk = router/locale/messages_tk.po
|
||||
trans.tr_TR = router/locale/messages_tr.po
|
||||
trans.uk_UA = router/locale/messages_uk.po
|
||||
trans.vi = router/locale/messages_vi.po
|
||||
trans.zh_CN = router/locale/messages_zh.po
|
||||
trans.zh_TW = router/locale/messages_zh_TW.po
|
||||
|
||||
[I2P.routerconsole]
|
||||
source_file = apps/routerconsole/locale/messages_en.po
|
||||
source_lang = en
|
||||
trans.ar = apps/routerconsole/locale/messages_ar.po
|
||||
trans.az = apps/routerconsole/locale/messages_az.po
|
||||
trans.cs = apps/routerconsole/locale/messages_cs.po
|
||||
trans.da = apps/routerconsole/locale/messages_da.po
|
||||
trans.de = apps/routerconsole/locale/messages_de.po
|
||||
@@ -108,12 +188,15 @@ trans.fa = apps/routerconsole/locale-news/messages_fa.po
|
||||
trans.fi = apps/routerconsole/locale-news/messages_fi.po
|
||||
trans.fr = apps/routerconsole/locale-news/messages_fr.po
|
||||
trans.gl = apps/routerconsole/locale-news/messages_gl.po
|
||||
trans.he = apps/routerconsole/locale-news/messages_he.po
|
||||
;; Java converts he to iw
|
||||
trans.he = apps/routerconsole/locale-news/messages_iw.po
|
||||
trans.hu = apps/routerconsole/locale-news/messages_hu.po
|
||||
;; Java converts id to in
|
||||
trans.id = apps/routerconsole/locale-news/messages_in.po
|
||||
trans.it = apps/routerconsole/locale-news/messages_it.po
|
||||
trans.ja = apps/routerconsole/locale-news/messages_ja.po
|
||||
trans.ko = apps/routerconsole/locale-news/messages_ko.po
|
||||
trans.ku = apps/routerconsole/locale-news/messages_ku.po
|
||||
trans.mg = apps/routerconsole/locale-news/messages_mg.po
|
||||
trans.nb = apps/routerconsole/locale-news/messages_nb.po
|
||||
trans.nl = apps/routerconsole/locale-news/messages_nl.po
|
||||
@@ -126,6 +209,7 @@ trans.sk = apps/routerconsole/locale-news/messages_sk.po
|
||||
trans.sq = apps/routerconsole/locale-news/messages_sq.po
|
||||
trans.sr = apps/routerconsole/locale-news/messages_sr.po
|
||||
trans.sv_SE = apps/routerconsole/locale-news/messages_sv.po
|
||||
trans.tk = apps/routerconsole/locale-news/messages_tk.po
|
||||
trans.tr_TR = apps/routerconsole/locale-news/messages_tr.po
|
||||
trans.uk_UA = apps/routerconsole/locale-news/messages_uk.po
|
||||
trans.zh_CN = apps/routerconsole/locale-news/messages_zh.po
|
||||
@@ -137,7 +221,9 @@ source_file = apps/routerconsole/locale-countries/messages_en.po
|
||||
source_lang = en
|
||||
trans.ar = apps/routerconsole/locale-countries/messages_ar.po
|
||||
trans.az = apps/routerconsole/locale-countries/messages_az.po
|
||||
trans.bg = apps/routerconsole/locale-countries/messages_bg.po
|
||||
trans.ca = apps/routerconsole/locale-countries/messages_ca.po
|
||||
trans.cs = apps/routerconsole/locale-countries/messages_cs.po
|
||||
trans.da = apps/routerconsole/locale-countries/messages_da.po
|
||||
trans.de = apps/routerconsole/locale-countries/messages_de.po
|
||||
trans.el = apps/routerconsole/locale-countries/messages_el.po
|
||||
@@ -147,13 +233,17 @@ trans.fa = apps/routerconsole/locale-countries/messages_fa.po
|
||||
trans.fi = apps/routerconsole/locale-countries/messages_fi.po
|
||||
trans.fr = apps/routerconsole/locale-countries/messages_fr.po
|
||||
trans.gl = apps/routerconsole/locale-countries/messages_gl.po
|
||||
trans.hi = apps/routerconsole/locale-countries/messages_hi.po
|
||||
trans.hr = apps/routerconsole/locale-countries/messages_hr.po
|
||||
trans.hu = apps/routerconsole/locale-countries/messages_hu.po
|
||||
;; Java converts he to iw
|
||||
trans.he = apps/routerconsole/locale-countries/messages_iw.po
|
||||
;; Java converts id to in
|
||||
trans.id = apps/routerconsole/locale-countries/messages_in.po
|
||||
trans.it = apps/routerconsole/locale-countries/messages_it.po
|
||||
trans.ja = apps/routerconsole/locale-countries/messages_ja.po
|
||||
trans.ko = apps/routerconsole/locale-countries/messages_ko.po
|
||||
trans.ku = apps/routerconsole/locale-countries/messages_ku.po
|
||||
trans.mg = apps/routerconsole/locale-countries/messages_mg.po
|
||||
trans.nb = apps/routerconsole/locale-countries/messages_nb.po
|
||||
trans.nl = apps/routerconsole/locale-countries/messages_nl.po
|
||||
@@ -164,7 +254,9 @@ trans.ro = apps/routerconsole/locale-countries/messages_ro.po
|
||||
trans.ru_RU = apps/routerconsole/locale-countries/messages_ru.po
|
||||
trans.sk = apps/routerconsole/locale-countries/messages_sk.po
|
||||
trans.sq = apps/routerconsole/locale-countries/messages_sq.po
|
||||
trans.sr = apps/routerconsole/locale-countries/messages_sr.po
|
||||
trans.sv_SE = apps/routerconsole/locale-countries/messages_sv.po
|
||||
trans.tk = apps/routerconsole/locale-countries/messages_tk.po
|
||||
trans.tr_TR = apps/routerconsole/locale-countries/messages_tr.po
|
||||
trans.uk_UA = apps/routerconsole/locale-countries/messages_uk.po
|
||||
trans.vi = apps/routerconsole/locale-countries/messages_vi.po
|
||||
@@ -248,6 +340,7 @@ trans.da = apps/desktopgui/locale/messages_da.po
|
||||
trans.de = apps/desktopgui/locale/messages_de.po
|
||||
trans.el = apps/desktopgui/locale/messages_el.po
|
||||
trans.es = apps/desktopgui/locale/messages_es.po
|
||||
trans.es_AR = apps/desktopgui/locale/messages_es_AR.po
|
||||
trans.fa = apps/desktopgui/locale/messages_fa.po
|
||||
trans.fi = apps/desktopgui/locale/messages_fi.po
|
||||
trans.fr = apps/desktopgui/locale/messages_fr.po
|
||||
@@ -258,6 +351,7 @@ trans.id = apps/desktopgui/locale/messages_in.po
|
||||
trans.it = apps/desktopgui/locale/messages_it.po
|
||||
trans.ja = apps/desktopgui/locale/messages_ja.po
|
||||
trans.ko = apps/desktopgui/locale/messages_ko.po
|
||||
trans.ku = apps/desktopgui/locale/messages_ku.po
|
||||
trans.mg = apps/desktopgui/locale/messages_mg.po
|
||||
trans.nb = apps/desktopgui/locale/messages_nb.po
|
||||
trans.nl = apps/desktopgui/locale/messages_nl.po
|
||||
@@ -267,10 +361,12 @@ trans.pt_BR = apps/desktopgui/locale/messages_pt_BR.po
|
||||
trans.ro = apps/desktopgui/locale/messages_ro.po
|
||||
trans.ru_RU = apps/desktopgui/locale/messages_ru.po
|
||||
trans.sk = apps/desktopgui/locale/messages_sk.po
|
||||
trans.sr = apps/desktopgui/locale/messages_sr.po
|
||||
trans.sv_SE = apps/desktopgui/locale/messages_sv.po
|
||||
trans.sq = apps/desktopgui/locale/messages_sq.po
|
||||
trans.uk_UA = apps/desktopgui/locale/messages_uk.po
|
||||
trans.tk = apps/desktopgui/locale/messages_tk.po
|
||||
trans.tr_TR = apps/desktopgui/locale/messages_tr.po
|
||||
trans.uk_UA = apps/desktopgui/locale/messages_uk.po
|
||||
trans.vi = apps/desktopgui/locale/messages_vi.po
|
||||
trans.zh_CN = apps/desktopgui/locale/messages_zh.po
|
||||
trans.zh_TW = apps/desktopgui/locale/messages_zh_TW.po
|
||||
@@ -280,6 +376,8 @@ source_file = apps/susimail/locale/messages_en.po
|
||||
source_lang = en
|
||||
trans.ar = apps/susimail/locale/messages_ar.po
|
||||
trans.az = apps/susimail/locale/messages_az.po
|
||||
trans.bg = apps/susimail/locale/messages_bg.po
|
||||
trans.ca = apps/susimail/locale/messages_ca.po
|
||||
trans.cs = apps/susimail/locale/messages_cs.po
|
||||
trans.da = apps/susimail/locale/messages_da.po
|
||||
trans.de = apps/susimail/locale/messages_de.po
|
||||
@@ -289,7 +387,10 @@ trans.fa = apps/susimail/locale/messages_fa.po
|
||||
trans.fi = apps/susimail/locale/messages_fi.po
|
||||
trans.fr = apps/susimail/locale/messages_fr.po
|
||||
trans.gl = apps/susimail/locale/messages_gl.po
|
||||
trans.hr = apps/susimail/locale/messages_hr.po
|
||||
trans.hu = apps/susimail/locale/messages_hu.po
|
||||
;; Java converts he to iw
|
||||
trans.he = apps/susimail/locale/messages_iw.po
|
||||
;; Java converts id to in
|
||||
trans.id = apps/susimail/locale/messages_in.po
|
||||
trans.it = apps/susimail/locale/messages_it.po
|
||||
@@ -305,6 +406,7 @@ trans.ro = apps/susimail/locale/messages_ro.po
|
||||
trans.ru_RU = apps/susimail/locale/messages_ru.po
|
||||
trans.sk = apps/susimail/locale/messages_sk.po
|
||||
trans.sq = apps/susimail/locale/messages_sq.po
|
||||
trans.sr = apps/susimail/locale/messages_sr.po
|
||||
trans.sv_SE = apps/susimail/locale/messages_sv.po
|
||||
trans.tr_TR = apps/susimail/locale/messages_tr.po
|
||||
trans.uk_UA = apps/susimail/locale/messages_uk.po
|
||||
@@ -339,6 +441,7 @@ trans.ru_RU = debian/po/ru.po
|
||||
trans.sk = debian/po/sk.po
|
||||
trans.sq = debian/po/sq.po
|
||||
trans.sv_SE = debian/po/sv.po
|
||||
trans.tk = debian/po/tk.po
|
||||
trans.tr_TR = debian/po/tr.po
|
||||
trans.uk_UA = debian/po/uk.po
|
||||
trans.zh_CN = debian/po/zh.po
|
||||
@@ -405,6 +508,7 @@ trans.id = core/java/src/gnu/getopt/MessagesBundle_in.properties
|
||||
trans.it = core/java/src/gnu/getopt/MessagesBundle_it.properties
|
||||
trans.ja = core/java/src/gnu/getopt/MessagesBundle_ja.properties
|
||||
trans.ko = core/java/src/gnu/getopt/MessagesBundle_ko.properties
|
||||
trans.ku = core/java/src/gnu/getopt/MessagesBundle_ku.properties
|
||||
trans.nb = core/java/src/gnu/getopt/MessagesBundle_nb.properties
|
||||
trans.nl = core/java/src/gnu/getopt/MessagesBundle_nl.properties
|
||||
trans.pl = core/java/src/gnu/getopt/MessagesBundle_pl.properties
|
||||
@@ -447,6 +551,7 @@ trans.pt_BR = apps/ministreaming/locale/messages_pt_BR.po
|
||||
trans.ro = apps/ministreaming/locale/messages_ro.po
|
||||
trans.ru_RU = apps/ministreaming/locale/messages_ru.po
|
||||
trans.sv_SE = apps/ministreaming/locale/messages_sv.po
|
||||
trans.tk = apps/ministreaming/locale/messages_tk.po
|
||||
trans.tr_TR = apps/ministreaming/locale/messages_tr.po
|
||||
trans.uk_UA = apps/ministreaming/locale/messages_uk.po
|
||||
trans.zh_CN = apps/ministreaming/locale/messages_zh.po
|
||||
@@ -487,11 +592,15 @@ trans.zh_CN = installer/resources/locale-man/man_zh.po
|
||||
type = HTML
|
||||
source_file = installer/resources/eepsite/docroot/help/index.html
|
||||
source_lang = en
|
||||
trans.ar = installer/resources/eepsite/docroot/help/index_ar.html
|
||||
;; File contains local changes to fix RTL issues.
|
||||
;; Merge locally or make changes on TX side before re-enabling
|
||||
;;trans.ar = installer/resources/eepsite/docroot/help/index_ar.html
|
||||
trans.az = installer/resources/eepsite/docroot/help/index_az.html
|
||||
trans.de = installer/resources/eepsite/docroot/help/index_de.html
|
||||
trans.el = installer/resources/eepsite/docroot/help/index_el.html
|
||||
;; not yet translated on TX, use old page
|
||||
;;trans.es = installer/resources/eepsite/docroot/help/index_es.html
|
||||
trans.fa = installer/resources/eepsite/docroot/help/index_fa.html
|
||||
trans.fr = installer/resources/eepsite/docroot/help/index_fr.html
|
||||
trans.hu = installer/resources/eepsite/docroot/help/index_hu.html
|
||||
;; Java converts id to in
|
||||
@@ -503,32 +612,32 @@ trans.pl = installer/resources/eepsite/docroot/help/index_pl.html
|
||||
trans.pt = installer/resources/eepsite/docroot/help/index_pt.html
|
||||
trans.ro = installer/resources/eepsite/docroot/help/index_ro.html
|
||||
trans.ru_RU = installer/resources/eepsite/docroot/help/index_ru.html
|
||||
;; not yet translated on TX, use old page
|
||||
;;trans.sv_SE = installer/resources/eepsite/docroot/help/index_sv.html
|
||||
trans.sv_SE = installer/resources/eepsite/docroot/help/index_sv.html
|
||||
trans.tr_TR = installer/resources/eepsite/docroot/help/index_tr.html
|
||||
;; not yet translated on TX, use old page
|
||||
;;trans.zh_CN = installer/resources/eepsite/docroot/help/index_zh.html
|
||||
trans.uk_UA = installer/resources/eepsite/docroot/help/index_uk.html
|
||||
trans.zh_CN = installer/resources/eepsite/docroot/help/index_zh.html
|
||||
|
||||
[I2P.readme]
|
||||
;;
|
||||
;; Text on /console
|
||||
;;
|
||||
type = HTML
|
||||
source_file = installer/resources/readme/readme.html
|
||||
source_file = apps/routerconsole/resources/docs/readme.html
|
||||
source_lang = en
|
||||
trans.ar = installer/resources/readme/readme_ar.html
|
||||
trans.de = installer/resources/readme/readme_de.html
|
||||
trans.fr = installer/resources/readme/readme_fr.html
|
||||
trans.ar = apps/routerconsole/resources/docs/readme_ar.html
|
||||
trans.de = apps/routerconsole/resources/docs/readme_de.html
|
||||
trans.fr = apps/routerconsole/resources/docs/readme_fr.html
|
||||
;; Java converts id to in
|
||||
trans.id = installer/resources/readme/readme_in.html
|
||||
trans.it = installer/resources/readme/readme_it.html
|
||||
trans.ja = installer/resources/readme/readme_ja.html
|
||||
trans.pl = installer/resources/readme/readme_pl.html
|
||||
trans.pt = installer/resources/readme/readme_pt.html
|
||||
trans.ro = installer/resources/readme/readme_ro.html
|
||||
trans.ru_RU = installer/resources/readme/readme_ru.html
|
||||
trans.tr_TR = installer/resources/readme/readme_tr.html
|
||||
trans.zh_CN = installer/resources/readme/readme_zh.html
|
||||
trans.id = apps/routerconsole/resources/docs/readme_in.html
|
||||
trans.it = apps/routerconsole/resources/docs/readme_it.html
|
||||
trans.ja = apps/routerconsole/resources/docs/readme_ja.html
|
||||
trans.pl = apps/routerconsole/resources/docs/readme_pl.html
|
||||
trans.pt = apps/routerconsole/resources/docs/readme_pt.html
|
||||
trans.ro = apps/routerconsole/resources/docs/readme_ro.html
|
||||
trans.ru_RU = apps/routerconsole/resources/docs/readme_ru.html
|
||||
trans.tr_TR = apps/routerconsole/resources/docs/readme_tr.html
|
||||
trans.uk_UA = apps/routerconsole/resources/docs/readme_uk.html
|
||||
trans.zh_CN = apps/routerconsole/resources/docs/readme_zh.html
|
||||
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
export JAVA_HOME=/opt/jdk/jre
|
||||
|
||||
# Ensure user rights
|
||||
chown -R i2p:nobody /opt/i2p
|
||||
chmod -R u+rwx /opt/i2p
|
||||
|
||||
gosu i2p /opt/i2p/i2psvc /opt/i2p/wrapper.config wrapper.pidfile=/var/tmp/i2p.pid \
|
||||
wrapper.name=i2p \
|
||||
wrapper.displayname="I2P Service" \
|
||||
wrapper.statusfile=/var/tmp/i2p.status \
|
||||
wrapper.java.statusfile=/var/tmp/i2p.java.status \
|
||||
wrapper.logfile=/var/tmp/wrapper.log
|
87
Dockerfile
87
Dockerfile
@@ -1,62 +1,47 @@
|
||||
FROM meeh/java8server:latest
|
||||
# Docker image based on Alpine with Java.
|
||||
# Use a multi-stage build to reduce the size of the resulting image
|
||||
# We need alpine >v3 in order to install an apache-ant > 1.9
|
||||
FROM alpine:3 as builder
|
||||
ENV I2P_PREFIX="/opt/i2p"
|
||||
|
||||
# We use Oracle Java to run I2P, but uses the openjdk to build it.
|
||||
WORKDIR /tmp/build
|
||||
COPY . ./
|
||||
|
||||
# Build installer
|
||||
RUN apk --no-cache add build-base gettext tar bzip2 apache-ant openjdk8 expect
|
||||
RUN echo "noExe=true" >> build.properties
|
||||
RUN ant installer-linux
|
||||
RUN mkdir -p /opt
|
||||
RUN mv i2pinstall*.jar /tmp/i2pinstall.jar
|
||||
|
||||
MAINTAINER Mikal Villa <mikal@sigterm.no>
|
||||
# Install i2p using the installer into I2P_PREFIX
|
||||
RUN expect -f ./Docker.expt
|
||||
RUN cd ${I2P_PREFIX}
|
||||
RUN rm -fr man docs *.bat *.command *.app
|
||||
|
||||
ENV GIT_BRANCH="master"
|
||||
# Second stage only using the installer from the last stage
|
||||
# ---------------------------------------------------------
|
||||
# We can't use alpine here as the java service wrapper is built with glibc
|
||||
# alpine uses musl
|
||||
FROM openjdk:11.0-jre-slim
|
||||
|
||||
ARG I2P_UID=1000
|
||||
ARG I2P_USER=i2p
|
||||
ENV I2P_PREFIX="/opt/i2p"
|
||||
ENV PATH=${I2P_PREFIX}/bin:$PATH
|
||||
ENV JAVA_HOME=/usr/lib/jvm/default-jvm
|
||||
|
||||
ENV GOSU_VERSION=1.7
|
||||
ENV GOSU_SHASUM="34049cfc713e8b74b90d6de49690fa601dc040021980812b2f1f691534be8a50 /usr/local/bin/gosu"
|
||||
# "install" i2p by copying over installed files
|
||||
COPY --from=builder /opt/i2p ${I2P_PREFIX}
|
||||
COPY docker/* /opt/i2p/
|
||||
|
||||
RUN mkdir /user && adduser -S -h /user i2p && chown -R i2p:nobody /user
|
||||
# Setup user and fix permissions in
|
||||
RUN adduser --system --uid ${I2P_UID} --home /user ${I2P_USER} \
|
||||
&& chown -R ${I2P_USER} /user \
|
||||
&& chown -R ${I2P_USER} ${I2P_PREFIX} \
|
||||
&& chmod -R u+rwx ${I2P_PREFIX}
|
||||
|
||||
# Adding files first, since Docker.expt is required for installation
|
||||
ADD Docker.expt /tmp/Docker.expt
|
||||
ADD Docker.entrypoint.sh /entrypoint.sh
|
||||
EXPOSE 7654 7656 7657 7658 4444 6668 8998 7659 7660 4445
|
||||
|
||||
# Required for wget https
|
||||
RUN apk add --no-cache openssl
|
||||
# Gosu is a replacement for su/sudo in docker and not a backdoor :) See https://github.com/tianon/gosu
|
||||
RUN wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64 \
|
||||
&& echo "${GOSU_SHASUM}" | sha256sum -c && chmod +x /usr/local/bin/gosu
|
||||
|
||||
#
|
||||
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
|
||||
# image under 200mb we need to remove all the build dependencies in the same "RUN" / layer.
|
||||
#
|
||||
|
||||
# The main layer
|
||||
RUN apk --no-cache add build-base git gettext tar bzip2 apache-ant openjdk8 expect \
|
||||
&& mkdir -p /usr/src/build \
|
||||
&& cd /usr/src/build \
|
||||
&& git clone -b ${GIT_BRANCH} https://github.com/i2p/i2p.i2p.git \
|
||||
&& cd /usr/src/build/i2p.i2p \
|
||||
&& echo "noExe=true" >> build.properties \
|
||||
&& ant installer-linux \
|
||||
&& cp i2pinstall*.jar /tmp/i2pinstall.jar \
|
||||
&& mkdir -p /opt \
|
||||
&& chown i2p:root /opt \
|
||||
&& chmod u+rw /opt \
|
||||
&& gosu i2p expect -f /tmp/Docker.expt \
|
||||
&& cd ${I2P_PREFIX} \
|
||||
&& rm -fr man docs *.bat *.command *.app /tmp/i2pinstall.jar /tmp/Docker.expt \
|
||||
&& rm -fr /usr/src/build \
|
||||
&& apk --purge del build-base apache-ant expect tcl expat git openjdk8 openjdk8-jre openjdk8-jre-base openjdk8-jre-lib bzip2 tar \
|
||||
binutils-libs binutils pkgconfig libcurl libc-dev musl-dev g++ make fortify-headers pkgconf giflib libssh2 libxdmcp libxcb \
|
||||
libx11 pcre alsa-lib libxi libxrender libxml2 readline bash openssl \
|
||||
&& rm -fr /usr/lib/jvm/default-jre \
|
||||
&& ln -sf /opt/jdk/jre /usr/lib/jvm/default-jre \
|
||||
&& chmod a+x /entrypoint.sh
|
||||
|
||||
|
||||
|
||||
EXPOSE 7654 7656 7657 7658 4444 6668 8998 7659 7660 4445 15000-20000
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
USER i2p
|
||||
ENTRYPOINT [ "/opt/i2p/i2psvc" ]
|
||||
CMD [ "/opt/i2p/wrapper.config", "wrapper.pidfile=/var/tmp/i2p.pid", "wrapper.name=i2p", "wrapper.displayname=\"I2P Service\"" , "wrapper.statusfile=/var/tmp/i2p.status", "wrapper.java.statusfile=/var/tmp/i2p.java.status", "wrapper.logfile=/var/tmp/wrapper.log" ]
|
||||
|
||||
|
@@ -40,7 +40,7 @@ To uninstall I2P:
|
||||
rm -rf $I2PInstallDir ~/.i2p
|
||||
|
||||
Supported JVMs:
|
||||
All platforms: Java 1.7 or higher required
|
||||
All platforms: Java 1.8 or higher required
|
||||
Windows: OpenJDK or Oracle from http://java.com/download
|
||||
Linux: OpenJDK or Oracle from http://java.com/download
|
||||
FreeBSD: OpenJDK or Oracle from http://java.com/download
|
||||
|
@@ -1,10 +1,10 @@
|
||||
I2P source installation instructions
|
||||
|
||||
Prerequisites to build from source:
|
||||
Java SDK (preferably Oracle/Sun or OpenJDK) 1.7.0 or higher
|
||||
Java SDK (preferably Oracle or OpenJDK) 8 or higher
|
||||
Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java
|
||||
Certain subsystems for embedded (core, router, mstreaming, streaming, i2ptunnel) require only Java 1.6
|
||||
Apache Ant 1.7.0 or higher
|
||||
Apache Ant 1.9.8 or higher
|
||||
The xgettext, msgfmt, and msgmerge tools installed
|
||||
from the GNU gettext package http://www.gnu.org/software/gettext/
|
||||
Build environment must use a UTF-8 locale.
|
||||
|
43
LICENSE.txt
43
LICENSE.txt
@@ -36,10 +36,6 @@ Public domain except as listed below:
|
||||
Copyright (c) 2003, TheCrypto
|
||||
See licenses/LICENSE-ElGamalDSA.txt
|
||||
|
||||
HMAC:
|
||||
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
|
||||
See licenses/LICENSE-SHA256.txt
|
||||
|
||||
ElGamal:
|
||||
Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
|
||||
See licenses/LICENSE-SHA256.txt
|
||||
@@ -89,14 +85,21 @@ Public domain except as listed below:
|
||||
From Apache HttpClient 4.4.1 and HttpCore 4.4.1
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
|
||||
json-simple 1.1.1
|
||||
json-simple 2.3.0
|
||||
(not included in most distribution packages)
|
||||
Copyright 2016 Clifton Labs
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
|
||||
Noise library:
|
||||
Copyright (C) 2016 Southern Storm Software, Pty Ltd.
|
||||
See licenses/LICENSE-Noise.txt
|
||||
|
||||
MiniDNS library 1.0.0
|
||||
This software may be used under the terms of (at your choice)
|
||||
- LGPL version 2 (or later) (see licenses/LICENSE-LGPL2.1.txt)
|
||||
- Apache Software licence (see licenses/LICENSE-Apache2.0.txt)
|
||||
- DWTFYWTPL
|
||||
|
||||
|
||||
Router (router.jar):
|
||||
Public domain except as listed below:
|
||||
@@ -125,6 +128,10 @@ Public domain except as listed below:
|
||||
Copyright (C) 2006 The Android Open Source Project
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
|
||||
SSU HMAC:
|
||||
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
|
||||
See licenses/LICENSE-SHA256.txt
|
||||
|
||||
|
||||
Installer:
|
||||
(not included in distribution packages)
|
||||
@@ -171,18 +178,18 @@ Installer:
|
||||
|
||||
GeoIP Data:
|
||||
(not included in most distribution packages)
|
||||
This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com/
|
||||
See licenses/LICENSE-GeoIP.txt
|
||||
IP Geolocation by DB-IP https://db-ip.com/
|
||||
See https://creativecommons.org/licenses/by/4.0/
|
||||
|
||||
Launchers:
|
||||
(not included in distribution packages)
|
||||
Copyright (c) 2002-2018 EPFL, Lausanne / Lightbend, Inc. , unless otherwise specified.
|
||||
See licenses/LICENSE-Scala.md
|
||||
|
||||
Java Service Wrapper Community Edition 3.5.39:
|
||||
Java Service Wrapper Community Edition 3.5.44:
|
||||
(Windows: 3.5.25)
|
||||
(not included in most distribution packages)
|
||||
Copyright (C) 1999-2019 Tanuki Software, Ltd. All Rights Reserved.
|
||||
Copyright (C) 1999-2020 Tanuki Software, Ltd. All Rights Reserved.
|
||||
See licenses/LICENSE-Wrapper.txt
|
||||
|
||||
|
||||
@@ -192,7 +199,7 @@ Jbigi Libraries (jbigi.jar):
|
||||
GMP 4.3.2 / 5.0.2:
|
||||
Copyright 1991, 1996, 1999, 2000, 2007 Free Software Foundation, Inc.
|
||||
See licenses/LICENSE-LGPLv3.txt
|
||||
GMP 6.0.0 / 6.1.2:
|
||||
GMP 6.0.0 / 6.1.2 / 6.2.0:
|
||||
See licenses/LICENSE-GPLv2.txt
|
||||
|
||||
|
||||
@@ -254,23 +261,22 @@ Applications:
|
||||
Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||
Copyright (c) 2008 Alexander von Gernler. All rights reserved.
|
||||
See licenses/LICENSE-BSD.txt
|
||||
Zxing 3.3.0:
|
||||
Zxing 3.4.1:
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
|
||||
Jetty 9.2.25.v20180606 (jetty-*.jar, org.mortbay.*.jar):
|
||||
Jetty 9.3.29.v20201019 (jetty-*.jar, org.mortbay.*.jar):
|
||||
(not included in most distribution packages, except for jetty-i2p.jar)
|
||||
See licenses/ABOUT-Jetty.html
|
||||
See licenses/NOTICE-Jetty.html
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
See licenses/LICENSE-ECLIPSE-1.0.html
|
||||
|
||||
JRobin 1.6.0-1 (jrobin.jar):
|
||||
RRD4J 3.6 (jrobin.jar):
|
||||
Copyright (c) 2001-2005 Sasa Markovic and Ciaran Treanor.
|
||||
Copyright (c) 2011 The OpenNMS Group, Inc.
|
||||
Copyright 2011 The RRD4J Authors.
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
See licenses/LICENSE-LGPLv2.1.txt
|
||||
DeallocationHelper:
|
||||
Copyright (c) 2006-2016 Julien Gouesse
|
||||
See licenses/LICENSE-GPLv2.txt
|
||||
|
||||
Ministreaming Lib (mstreaming.jar):
|
||||
By mihi.
|
||||
@@ -294,6 +300,7 @@ Applications:
|
||||
FatCow icons: See licenses/LICENSE-FatCowIcons.txt
|
||||
Fugue Icons: See licenses/LICENSE-FugueIcons.txt
|
||||
Feather icons: Copyright (c) 2013-2017 Cole Bemis; see licenses/LICENSE-Feather.txt
|
||||
Fontawesome icons: Copyright (c) 2018 @fontawesome(company) see licenses/LICENSE-fontawesome.txt
|
||||
|
||||
Router Console unthemed, light, and dark theme logos:
|
||||
Copyright (c) 2019 The Invisible Internet Project. All rights reserved.
|
||||
@@ -332,9 +339,9 @@ Applications:
|
||||
Systray (systray.jar):
|
||||
Public domain.
|
||||
|
||||
Tomcat 8.5.46 (jasper-runtime.jar):
|
||||
Tomcat 9.0.40 (jasper-runtime.jar):
|
||||
(not included in most distribution packages)
|
||||
Copyright 1999-2019 The Apache Software Foundation
|
||||
Copyright 1999-2020 The Apache Software Foundation
|
||||
See licenses/LICENSE-Apache2.0.txt
|
||||
See licenses/NOTICE-Tomcat.txt
|
||||
|
||||
|
132
Makefile.gcj
132
Makefile.gcj
@@ -1,132 +0,0 @@
|
||||
# Makefile for building native I2P binaries and libraries with GCJ
|
||||
#
|
||||
# WARNING: Do not use this yet, as it may explode (etc).
|
||||
#
|
||||
GCJ=gcj #/usr/local/gcc-4.0.2/bin/gcj
|
||||
EXTRA_LD_PATH= #/usr/local/gcc-4.0.2/lib
|
||||
ANT=ant #/opt/apache-ant-1.6.5/bin/ant
|
||||
ANT_TARGET=build2
|
||||
NATIVE_DIR=native
|
||||
|
||||
##
|
||||
# Define what jar files get into libi2p.so. The current setup is
|
||||
# *incredibly* lazy, throwing everything in the .so, rather than
|
||||
# give each .jar file its own .so.
|
||||
# i2p.jar: base SDK
|
||||
# mstreaming.jar: streaming API
|
||||
# streaming.jar: full streaming lib implementation
|
||||
# i2ptunnel.jar: I2PTunnel proxy
|
||||
# sam.jar: SAM bridge and API
|
||||
# i2psnark.jar: bittorrent client
|
||||
# router.jar: full I2P router
|
||||
# jbigi.jar: collection of native optimized GMP routines for crypto
|
||||
JAR_BASE=i2p.jar mstreaming.jar streaming.jar
|
||||
JAR_CLIENTS=i2ptunnel.jar sam.jar
|
||||
JAR_ROUTER=router.jar
|
||||
JAR_JBIGI=jbigi.jar
|
||||
JAR_CONSOLE=\
|
||||
javax.servlet.jar \
|
||||
commons-el.jar \
|
||||
commons-logging.jar \
|
||||
jasper-runtime.jar \
|
||||
jasper-compiler.jar \
|
||||
org.mortbay.jetty.jar \
|
||||
routerconsole.jar
|
||||
LIBI2P_JARS=${JAR_BASE} ${JAR_CLIENTS} ${JAR_ROUTER} ${JAR_JBIGI}
|
||||
LIBSAM_JARS=${JAR_BASE} sam.jar
|
||||
LIBROUTER_JARS=i2p.jar ${JAR_ROUTER} ${JAR_JBIGI}
|
||||
LIBCONSOLE_JARS=${LIBROUTER_JARS} ${JAR_CONSOLE}
|
||||
LIBSNARK_JARS=${LIBROUTER_JARS} i2psnark.jar
|
||||
# update:
|
||||
# similar error with gcj 4.3.3.
|
||||
#
|
||||
# unfortunately, its not quite ready for most end users, as the
|
||||
# ${JAR_CONSOLE} fails to compile with:
|
||||
# org/apache/commons/logging/impl/LogKitLogger.java: In class 'org.apache.commons.logging.impl.LogKitLogger':
|
||||
# .../LogKitLogger.java: In constructor '(java.lang.String)':
|
||||
# .../LogKitLogger.java:91: error: cannot find file for class org.apache.log.Hierarchy
|
||||
# .../LogKitLogger.java:91: error: cannot find file for class org.apache.log.Hierarchy
|
||||
# .../LogKitLogger.java:104: error: cannot find file for class org.apache.log.Hierarchy
|
||||
# .../LogKitLogger.java:104: confused by earlier errors, bailing out
|
||||
|
||||
#${JAR_CONSOLE}\
|
||||
#${JAR_XML} \
|
||||
#${JAR_SUCKER}
|
||||
#${JAR_CONSOLE}
|
||||
|
||||
SYSTEM_PROPS=-DloggerFilenameOverride=logs/log-router-@.txt \
|
||||
-Dorg.mortbay.http.Version.paranoid=true \
|
||||
-Dorg.mortbay.util.FileResource.checkAliases=false \
|
||||
-Dorg.mortbay.xml.XmlParser.NotValidating=true
|
||||
#SYSTEM_PROPS=-Di2p.weakPRNG=true
|
||||
OPTIMIZE=-O2
|
||||
#OPTIMIZE=-O3
|
||||
|
||||
LD_LIBRARY_PATH=${EXTRA_LD_PATH}:.
|
||||
|
||||
all: jars native
|
||||
@echo "* Build complete"
|
||||
|
||||
jars:
|
||||
@${ANT} ${ANT_TARGET}
|
||||
|
||||
clean: native_clean
|
||||
|
||||
native: native_clean native_shared
|
||||
@echo "* Native code build in ${NATIVE}"
|
||||
|
||||
native_clean:
|
||||
@rm -rf ${NATIVE_DIR}
|
||||
@mkdir ${NATIVE_DIR}
|
||||
|
||||
native_shared: libi2p.so
|
||||
@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2p_dsa --main=net.i2p.crypto.DSAEngine
|
||||
@echo "* i2p_dsa is a simple test app with the DSA engine and Fortuna PRNG to make sure crypto is working"
|
||||
@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/prng --main=gnu.crypto.prng.FortunaStandalone
|
||||
@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnel --main=net.i2p.i2ptunnel.I2PTunnel
|
||||
@echo "* i2ptunnel is mihi's I2PTunnel CLI"
|
||||
@echo " run it as ./i2ptunnel -cli to avoid awt complaints"
|
||||
@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnelctl --main=net.i2p.i2ptunnel.TunnelControllerGroup
|
||||
@echo "* i2ptunnelctl is a controller for I2PTunnel, reading i2ptunnel.config"
|
||||
@echo " and launching the appropriate proxies"
|
||||
#@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2psnark --main=org.klomp.snark.Snark
|
||||
#@echo "* i2psnark is an anonymous bittorrent client"
|
||||
@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2prouter --main=net.i2p.router.Router
|
||||
@echo "* i2prouter is the main I2P router"
|
||||
@echo " it can be used, and while the router console won't load,"
|
||||
@echo " i2ptunnel will, so it will start all the proxies defined in i2ptunnel.config"
|
||||
|
||||
libi2p.so:
|
||||
@echo "* Building $@"
|
||||
@(cd build ; time ${GCJ} ${OPTIMIZE} -fPIC -fjni -shared -o ../${NATIVE_DIR}/$@ ${LIBI2P_JARS} ; cd .. )
|
||||
@ls -l ${NATIVE_DIR}/$@
|
||||
@echo "* $@ built"
|
||||
|
||||
sam: jars libi2psam.so
|
||||
|
||||
libi2psam.so:
|
||||
@echo "* Building $@"
|
||||
@rm -f ${NATIVE_DIR}/$@
|
||||
@(cd build ; time ${GCJ} ${OPTIMIZE} -fPIC -fjni -shared -o ../${NATIVE_DIR}/$@ ${LIBSAM_JARS} ; cd .. )
|
||||
@ls -l ${NATIVE_DIR}/$@
|
||||
@echo "* $@ built"
|
||||
|
||||
router: jars libi2prouter.so
|
||||
|
||||
libi2prouter.so:
|
||||
@echo "* Building $@"
|
||||
@rm -f ${NATIVE_DIR}/$@
|
||||
@(cd build ; time ${GCJ} ${OPTIMIZE} -fPIC -fjni -shared -o ../${NATIVE_DIR}/$@ ${LIBROUTER_JARS} ; cd .. )
|
||||
@ls -l ${NATIVE_DIR}/$@
|
||||
@echo "* $@ built"
|
||||
|
||||
console: jars libi2pconsole.so
|
||||
|
||||
# doesn't work, see above
|
||||
libi2pconsole.so:
|
||||
@echo "* Building $@"
|
||||
@rm -f ${NATIVE_DIR}/$@
|
||||
@(cd build ; time ${GCJ} ${OPTIMIZE} -fPIC -fjni -shared -o ../${NATIVE_DIR}/$@ ${LIBCONSOLE_JARS} ; cd .. )
|
||||
@ls -l ${NATIVE_DIR}/$@
|
||||
@echo "* $@ built"
|
||||
|
30
README.md
30
README.md
@@ -2,19 +2,19 @@
|
||||
|
||||
This is the source code for the reference Java implementation of I2P.
|
||||
|
||||
Latest release: https://geti2p.net/download
|
||||
Latest release: [https://geti2p.net/download](https://geti2p.net/download)
|
||||
|
||||
## Installing
|
||||
|
||||
See INSTALL.txt or https://geti2p.net/download for installation instructions.
|
||||
See [INSTALL.txt](INSTALL.txt) or [https://geti2p.net/download](https://geti2p.net/download) for installation instructions.
|
||||
|
||||
## Documentation
|
||||
|
||||
https://geti2p.net/how
|
||||
[https://geti2p.net/how](https://geti2p.net/how)
|
||||
|
||||
FAQ: https://geti2p.net/faq
|
||||
FAQ: [https://geti2p.net/faq](https://geti2p.net/faq)
|
||||
|
||||
API: http://docs.i2p-projekt.de/javadoc/
|
||||
API: [http://docs.i2p-projekt.de/javadoc/](http://docs.i2p-projekt.de/javadoc/)
|
||||
or run 'ant javadoc' then start at build/javadoc/index.html
|
||||
|
||||
## How to contribute / Hack on I2P
|
||||
@@ -23,17 +23,17 @@ Please check out [HACKING.md](docs/HACKING.md) and other documents in the docs d
|
||||
|
||||
## Building packages from source
|
||||
|
||||
To get development branch from source control: https://geti2p.net/newdevelopers
|
||||
To get development branch from source control: [https://geti2p.net/newdevelopers](https://geti2p.net/newdevelopers)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Java SDK (preferably Oracle/Sun or OpenJDK) 1.7.0 or higher
|
||||
- Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java
|
||||
- Java SDK (preferably Oracle or OpenJDK) 8 or higher
|
||||
- Non-linux operating systems and JVMs: See [https://trac.i2p2.de/wiki/java](https://trac.i2p2.de/wiki/java)
|
||||
- Certain subsystems for embedded (core, router, mstreaming, streaming, i2ptunnel)
|
||||
require only Java 1.6
|
||||
- Apache Ant 1.7.0 or higher
|
||||
require only Java 6
|
||||
- Apache Ant 1.9.8 or higher
|
||||
- The xgettext, msgfmt, and msgmerge tools installed from the GNU gettext package
|
||||
http://www.gnu.org/software/gettext/
|
||||
[http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/)
|
||||
- Build environment must use a UTF-8 locale.
|
||||
|
||||
### Ant build process
|
||||
@@ -68,13 +68,13 @@ your `~/.gradle/gradle.properties`:
|
||||
|
||||
Need help? See the IRC channel #i2p on irc.freenode.net
|
||||
|
||||
Bug reports: https://trac.i2p2.de/report/1
|
||||
Bug reports: [https://trac.i2p2.de/report/1](https://trac.i2p2.de/report/1)
|
||||
|
||||
Contact information, security issues, press inquiries: https://geti2p.net/en/contact
|
||||
Contact information, security issues, press inquiries: [https://geti2p.net/en/contact](https://geti2p.net/en/contact)
|
||||
|
||||
Twitter: @i2p, @geti2p
|
||||
Twitter: [@i2p](https://twitter.com/i2p), [@geti2p](https://twitter.com/GetI2P)
|
||||
|
||||
## Licenses
|
||||
|
||||
See LICENSE.txt
|
||||
See [LICENSE.txt](LICENSE.txt)
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
Prerequisites to build from source:
|
||||
Java SDK (preferably Oracle/Sun or OpenJDK) 1.7.0 or higher
|
||||
Java SDK (preferably Oracle or OpenJDK) 8 or higher
|
||||
Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java
|
||||
Certain subsystems for embedded (core, router, mstreaming, streaming, i2ptunnel) require only Java 1.6
|
||||
Apache Ant 1.7.0 or higher
|
||||
Certain subsystems for embedded (core, router, mstreaming, streaming, i2ptunnel) require only Java 6
|
||||
Apache Ant 1.9.8 or higher
|
||||
The xgettext, msgfmt, and msgmerge tools installed
|
||||
from the GNU gettext package http://www.gnu.org/software/gettext/
|
||||
Build environment must use a UTF-8 locale.
|
||||
|
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<project name="echoclient" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project echoclient.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="echoclient-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
(
|
||||
cd dist
|
||||
java -jar echoclient.jar main 37338 testclient $1
|
||||
)
|
@@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
X-COMMENT: Main-Class will be added automatically by build
|
||||
|
@@ -1,629 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
|
||||
For the purpose of easier reading the script
|
||||
is divided into following sections:
|
||||
|
||||
- initialization
|
||||
- compilation
|
||||
- jar
|
||||
- execution
|
||||
- debugging
|
||||
- javadoc
|
||||
- junit compilation
|
||||
- junit execution
|
||||
- junit debugging
|
||||
- applet
|
||||
- cleanup
|
||||
|
||||
-->
|
||||
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="echoclient-impl">
|
||||
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="-pre-init" name="-init-private">
|
||||
<property file="nbproject/private/config.properties"/>
|
||||
<property file="nbproject/private/configs/${config}.properties"/>
|
||||
<property file="nbproject/private/private.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private" name="-init-user">
|
||||
<property file="${user.properties.file}"/>
|
||||
<!-- The two properties below are usually overridden -->
|
||||
<!-- by the active platform. Just a fallback. -->
|
||||
<property name="default.javac.source" value="1.4"/>
|
||||
<property name="default.javac.target" value="1.4"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
|
||||
<property file="nbproject/configs/${config}.properties"/>
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
|
||||
<available file="${manifest.file}" property="manifest.available"/>
|
||||
<condition property="manifest.available+main.class">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<isset property="main.class"/>
|
||||
<not>
|
||||
<equals arg1="${main.class}" arg2="" trim="true"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class}"/>
|
||||
<isset property="libs.CopyLibs.classpath"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="have.tests">
|
||||
<or>
|
||||
<available file="${test.src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="have.sources">
|
||||
<or>
|
||||
<available file="${src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="netbeans.home+have.tests">
|
||||
<and>
|
||||
<isset property="netbeans.home"/>
|
||||
<isset property="have.tests"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="no.javadoc.preview">
|
||||
<and>
|
||||
<isset property="javadoc.preview"/>
|
||||
<isfalse value="${javadoc.preview}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="run.jvmargs" value=""/>
|
||||
<property name="javac.compilerargs" value=""/>
|
||||
<property name="work.dir" value="${basedir}"/>
|
||||
<condition property="no.deps">
|
||||
<and>
|
||||
<istrue value="${no.dependencies}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javac.debug" value="true"/>
|
||||
<property name="javadoc.preview" value="true"/>
|
||||
<property name="application.args" value=""/>
|
||||
<property name="source.encoding" value="${file.encoding}"/>
|
||||
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
|
||||
<and>
|
||||
<isset property="javadoc.encoding"/>
|
||||
<not>
|
||||
<equals arg1="${javadoc.encoding}" arg2=""/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javadoc.encoding.used" value="${source.encoding}"/>
|
||||
<property name="includes" value="**"/>
|
||||
<property name="excludes" value=""/>
|
||||
<property name="do.depend" value="false"/>
|
||||
<condition property="do.depend.true">
|
||||
<istrue value="${do.depend}"/>
|
||||
</condition>
|
||||
<condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
|
||||
<and>
|
||||
<isset property="jaxws.endorsed.dir"/>
|
||||
<available file="nbproject/jaxws-build.xml"/>
|
||||
</and>
|
||||
</condition>
|
||||
</target>
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="test.src.dir">Must set test.src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="dist.dir">Must set dist.dir</fail>
|
||||
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
||||
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
||||
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
||||
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
|
||||
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
|
||||
<fail unless="dist.jar">Must set dist.jar</fail>
|
||||
</target>
|
||||
<target name="-init-macrodef-property">
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-javac">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="${javac.debug}" name="debug"/>
|
||||
<attribute default="" name="sourcepath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<sequential>
|
||||
<depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</depend>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<sequential>
|
||||
<fail unless="javac.includes">Must set javac.includes</fail>
|
||||
<pathconvert pathsep="," property="javac.includes.binary">
|
||||
<path>
|
||||
<filelist dir="@{destdir}" files="${javac.includes}"/>
|
||||
</path>
|
||||
<globmapper from="*.java" to="*.class"/>
|
||||
</pathconvert>
|
||||
<delete>
|
||||
<files includes="${javac.includes.binary}"/>
|
||||
</delete>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-junit">
|
||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="**" name="testincludes"/>
|
||||
<sequential>
|
||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
|
||||
<batchtest todir="${build.test.results.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||
<filename name="@{testincludes}"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<classpath>
|
||||
<path path="${run.test.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
</junit>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-nbjpda">
|
||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${main.class}" name="name"/>
|
||||
<attribute default="${debug.classpath}" name="classpath"/>
|
||||
<attribute default="" name="stopclassname"/>
|
||||
<sequential>
|
||||
<nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</nbjpdastart>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${build.classes.dir}" name="dir"/>
|
||||
<sequential>
|
||||
<nbjpdareload>
|
||||
<fileset dir="@{dir}" includes="${fix.classes}">
|
||||
<include name="${fix.includes}*.class"/>
|
||||
</fileset>
|
||||
</nbjpdareload>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-debug-args">
|
||||
<property name="version-output" value="java version "${ant.java.version}"/>
|
||||
<condition property="have-jdk-older-than-1.4">
|
||||
<or>
|
||||
<contains string="${version-output}" substring="java version "1.0"/>
|
||||
<contains string="${version-output}" substring="java version "1.1"/>
|
||||
<contains string="${version-output}" substring="java version "1.2"/>
|
||||
<contains string="${version-output}" substring="java version "1.3"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
|
||||
<istrue value="${have-jdk-older-than-1.4}"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-debug-args" name="-init-macrodef-debug">
|
||||
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${main.class}" name="classname"/>
|
||||
<attribute default="${debug.classpath}" name="classpath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||
<jvmarg line="${debug-args-line}"/>
|
||||
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper from="run-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-java">
|
||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${main.class}" name="classname"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="${run.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper from="run-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-presetdef-jar">
|
||||
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<jar compress="${jar.compress}" jarfile="${dist.jar}">
|
||||
<j2seproject1:fileset dir="${build.classes.dir}"/>
|
||||
</jar>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target depends="init" name="deps-jar" unless="no.deps"/>
|
||||
<target depends="init,deps-jar" name="-pre-pre-compile">
|
||||
<mkdir dir="${build.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target if="do.depend.true" name="-compile-depend">
|
||||
<j2seproject3:depend/>
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
|
||||
<j2seproject3:javac/>
|
||||
<copy todir="${build.classes.dir}">
|
||||
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
|
||||
<target name="-pre-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<j2seproject3:force-recompile/>
|
||||
<j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
|
||||
</target>
|
||||
<target name="-post-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
||||
<!--
|
||||
====================
|
||||
JAR BUILDING SECTION
|
||||
====================
|
||||
-->
|
||||
<target depends="init" name="-pre-pre-jar">
|
||||
<dirname file="${dist.jar}" property="dist.jar.dir"/>
|
||||
<mkdir dir="${dist.jar.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
|
||||
<j2seproject1:jar/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
|
||||
<j2seproject1:jar manifest="${manifest.file}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
|
||||
<j2seproject1:jar manifest="${manifest.file}">
|
||||
<j2seproject1:manifest>
|
||||
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
|
||||
</j2seproject1:manifest>
|
||||
</j2seproject1:jar>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<pathconvert property="run.classpath.with.dist.jar">
|
||||
<path path="${run.classpath}"/>
|
||||
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
|
||||
</pathconvert>
|
||||
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
|
||||
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
||||
<pathconvert property="run.classpath.without.build.classes.dir">
|
||||
<path path="${run.classpath}"/>
|
||||
<map from="${build.classes.dir.resolved}" to=""/>
|
||||
</pathconvert>
|
||||
<pathconvert pathsep=" " property="jar.classpath">
|
||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||
<chainedmapper>
|
||||
<flattenmapper/>
|
||||
<globmapper from="*" to="lib/*"/>
|
||||
</chainedmapper>
|
||||
</pathconvert>
|
||||
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
|
||||
<copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
<attribute name="Class-Path" value="${jar.classpath}"/>
|
||||
</manifest>
|
||||
</copylibs>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<echo>java -jar "${dist.jar.resolved}"</echo>
|
||||
</target>
|
||||
<target name="-post-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
|
||||
<!--
|
||||
=================
|
||||
EXECUTION SECTION
|
||||
=================
|
||||
-->
|
||||
<target depends="init,compile" description="Run a main class." name="run">
|
||||
<j2seproject1:java>
|
||||
<customize>
|
||||
<arg line="${application.args}"/>
|
||||
</customize>
|
||||
</j2seproject1:java>
|
||||
</target>
|
||||
<target name="-do-not-recompile">
|
||||
<property name="javac.includes.binary" value=""/>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-single" name="run-single">
|
||||
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||
<j2seproject1:java classname="${run.class}"/>
|
||||
</target>
|
||||
<!--
|
||||
=================
|
||||
DEBUGGING SECTION
|
||||
=================
|
||||
-->
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
||||
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile" name="-debug-start-debuggee">
|
||||
<j2seproject3:debug>
|
||||
<customize>
|
||||
<arg line="${application.args}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
|
||||
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
|
||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
|
||||
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
||||
<j2seproject3:debug classname="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
|
||||
<target depends="init" name="-pre-debug-fix">
|
||||
<fail unless="fix.includes">Must set fix.includes</fail>
|
||||
<property name="javac.includes" value="${fix.includes}.java"/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
|
||||
<j2seproject1:nbjpdareload/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
|
||||
<!--
|
||||
===============
|
||||
JAVADOC SECTION
|
||||
===============
|
||||
-->
|
||||
<target depends="init" name="-javadoc-build">
|
||||
<mkdir dir="${dist.javadoc.dir}"/>
|
||||
<javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
|
||||
<classpath>
|
||||
<path path="${javac.classpath}"/>
|
||||
</classpath>
|
||||
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
||||
<filename name="**/*.java"/>
|
||||
</fileset>
|
||||
</javadoc>
|
||||
</target>
|
||||
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
|
||||
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
|
||||
</target>
|
||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||
<!--
|
||||
=========================
|
||||
JUNIT COMPILATION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||
<mkdir dir="${build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target if="do.depend.true" name="-compile-test-depend">
|
||||
<j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
|
||||
<j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
||||
<copy todir="${build.test.classes.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
|
||||
<target name="-pre-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
|
||||
<j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
|
||||
<copy todir="${build.test.classes.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT EXECUTION SECTION
|
||||
=======================
|
||||
-->
|
||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
||||
</target>
|
||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target depends="init" if="have.tests" name="test-report"/>
|
||||
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
|
||||
<target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
|
||||
<target depends="init" if="have.tests" name="-pre-test-run-single">
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT DEBUGGING SECTION
|
||||
=======================
|
||||
-->
|
||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
||||
<delete file="${test.report.file}"/>
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
||||
<customize>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<arg value="${test.class}"/>
|
||||
<arg value="showoutput=true"/>
|
||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
|
||||
<!--
|
||||
=========================
|
||||
APPLET EXECUTION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile-single" name="run-applet">
|
||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||
<j2seproject1:java classname="sun.applet.AppletViewer">
|
||||
<customize>
|
||||
<arg value="${applet.url}"/>
|
||||
</customize>
|
||||
</j2seproject1:java>
|
||||
</target>
|
||||
<!--
|
||||
=========================
|
||||
APPLET DEBUGGING SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
|
||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||
<j2seproject3:debug classname="sun.applet.AppletViewer">
|
||||
<customize>
|
||||
<arg value="${applet.url}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target depends="init" name="deps-clean" unless="no.deps"/>
|
||||
<target depends="init" name="-do-clean">
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="${dist.dir}"/>
|
||||
</target>
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
|
||||
</project>
|
@@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=8ce3cee9
|
||||
build.xml.script.CRC32=d1de2df3
|
||||
build.xml.stylesheet.CRC32=be360661
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=8ce3cee9
|
||||
nbproject/build-impl.xml.script.CRC32=22d1fbbb
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=487672f9
|
@@ -1,2 +0,0 @@
|
||||
jaxws.endorsed.dir=/usr/local/netbeans-6.1/java2/modules/ext/jaxws21/api
|
||||
user.properties.file=/root/.netbeans/6.1/build.properties
|
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
|
||||
<file>file:/root/NetBeansProjects/BOB/Demos/echo/echoclient/src/net/i2p/BOB/Demos/echo/echoclient/Main.java</file>
|
||||
</open-files>
|
||||
</project-private>
|
@@ -1,60 +0,0 @@
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
# This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${build.dir}/generated
|
||||
# Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
# This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${dist.dir}/echoclient.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
excludes=
|
||||
file.reference.BOB.jar=../../../dist/BOB.jar
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.source=1.5
|
||||
javac.target=1.5
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${libs.junit.classpath}:\
|
||||
${libs.junit_4.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
main.class=net.i2p.BOB.Demos.echo.echoclient.Main
|
||||
manifest.file=manifest.mf
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# Space-separated list of JVM arguments used when running the project
|
||||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
||||
# or test-sys-prop.name=value to set system properties for unit tests):
|
||||
run.jvmargs=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
||||
test.src.dir=test
|
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>echoclient</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
@@ -1,193 +0,0 @@
|
||||
/**
|
||||
* WTFPL
|
||||
* Version 2, December 2004
|
||||
*
|
||||
* Copyright (C) sponge
|
||||
* Planet Earth
|
||||
*
|
||||
* See...
|
||||
*
|
||||
* http://sam.zoy.org/wtfpl/
|
||||
* and
|
||||
* http://en.wikipedia.org/wiki/WTFPL
|
||||
*
|
||||
* ...for any additional details and license questions.
|
||||
*/
|
||||
package net.i2p.BOB.Demos.echo.echoclient;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author sponge
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
public static String Lread(InputStream in) throws IOException {
|
||||
String S;
|
||||
int b;
|
||||
char c;
|
||||
|
||||
S = new String();
|
||||
|
||||
while(true) {
|
||||
b = in.read();
|
||||
if(b == 13) {
|
||||
//skip CR
|
||||
continue;
|
||||
}
|
||||
if(b < 20 || b > 126) {
|
||||
// exit on anything not legal
|
||||
break;
|
||||
}
|
||||
c = (char)(b & 0x7f); // We only care about ASCII
|
||||
S = new String(S + c);
|
||||
}
|
||||
return S;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for "ERROR" and if so, throw RuntimeException
|
||||
* @param line
|
||||
* @throws java.lang.RuntimeException
|
||||
*/
|
||||
static void checkline(String line) throws RuntimeException {
|
||||
System.out.println(line); // print status
|
||||
if(line.startsWith("ERROR")) {
|
||||
throw new RuntimeException(line);
|
||||
}
|
||||
}
|
||||
|
||||
static void wrtxt(OutputStream CMDout, String s) throws IOException {
|
||||
CMDout.write(DataHelper.getUTF8(s));
|
||||
CMDout.write('\n');
|
||||
CMDout.flush();
|
||||
}
|
||||
|
||||
static void setupconn(String[] args) throws UnknownHostException, IOException, RuntimeException {
|
||||
String line;
|
||||
Socket CMDsock = new Socket("localhost", 0xB0B);
|
||||
InputStream CMDin = CMDsock.getInputStream();
|
||||
OutputStream CMDout = CMDsock.getOutputStream();
|
||||
// setup the tunnel.
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print the banner
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print initial status, should always be "OK"
|
||||
try {
|
||||
wrtxt(CMDout, "status " + args[2]);
|
||||
line = Lread(CMDin); // get the status of this nickname, if it's an error, create it
|
||||
checkline(line);
|
||||
} catch(RuntimeException rte) {
|
||||
wrtxt(CMDout, "setnick " + args[2]);
|
||||
line = Lread(CMDin); // create a new nickname
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "newkeys");
|
||||
line = Lread(CMDin); // set up new keys
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "inport " + args[1]);
|
||||
line = Lread(CMDin); // set the port we connect in on
|
||||
checkline(line);
|
||||
}
|
||||
wrtxt(CMDout, "getnick " + args[2]);
|
||||
line = Lread(CMDin); // Set to our nick
|
||||
try {
|
||||
checkline(line);
|
||||
} catch(RuntimeException rte) {
|
||||
System.out.println("Continuing on existing tunnel..");
|
||||
return;
|
||||
}
|
||||
wrtxt(CMDout, "start");
|
||||
line = Lread(CMDin); // an error here is OK
|
||||
System.out.println(line); // print status
|
||||
CMDsock.close(); // we no longer need this particular socket
|
||||
|
||||
}
|
||||
|
||||
static void deleteconn(String[] args) throws UnknownHostException, IOException, RuntimeException {
|
||||
String line;
|
||||
// Wait for things to flush
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch(InterruptedException ex) {
|
||||
// nop
|
||||
}
|
||||
Socket CMDsock = new Socket("localhost", 0xB0B);
|
||||
InputStream CMDin = CMDsock.getInputStream();
|
||||
OutputStream CMDout = CMDsock.getOutputStream();
|
||||
// delete the tunnel.
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print the banner
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print initial status, should always be "OK"
|
||||
wrtxt(CMDout, "getnick " + args[2]); // Set to our nick
|
||||
line = Lread(CMDin);
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "stop");
|
||||
line = Lread(CMDin);
|
||||
checkline(line);
|
||||
try {
|
||||
Thread.sleep(2000); //sleep for 2000 ms (Two seconds)
|
||||
} catch(Exception e) {
|
||||
// nop
|
||||
}
|
||||
|
||||
wrtxt(CMDout, "clear");
|
||||
line = Lread(CMDin);
|
||||
while(line.startsWith("ERROR")) {
|
||||
wrtxt(CMDout, "clear");
|
||||
line = Lread(CMDin);
|
||||
}
|
||||
System.out.println(line); // print status
|
||||
CMDsock.close(); // we no longer need this particular socket
|
||||
|
||||
}
|
||||
|
||||
static void chatter(String[] args) throws UnknownHostException, IOException, RuntimeException {
|
||||
String line;
|
||||
Socket sock = new Socket("localhost", Integer.parseInt(args[1]));
|
||||
InputStream in = sock.getInputStream();
|
||||
OutputStreamWriter out = new OutputStreamWriter(sock.getOutputStream());
|
||||
out.write(args[3] + "\n"); // send out the i2p address to connect to
|
||||
out.flush();
|
||||
System.out.println("Connecting to " + args[3]);
|
||||
line = Lread(in); // get server greeting
|
||||
System.out.println("Got " + line); // show user
|
||||
out.write("Test complete.\n"); // send something back
|
||||
out.flush(); // make sure it's sent.
|
||||
sock.close(); // done.
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args tunnelport tunnelnickname I2Pdestkey
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// I'm lazy, and want to exit on any failures.
|
||||
try {
|
||||
setupconn(args); // talk to BOB, set up an outbound port
|
||||
chatter(args); // talk over the connection
|
||||
|
||||
} catch(UnknownHostException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch(IOException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
deleteconn(args);
|
||||
} catch(UnknownHostException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch(IOException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch(RuntimeException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<project name="echoserver" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project echoserver.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="echoserver-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
@@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
X-COMMENT: Main-Class will be added automatically by build
|
||||
|
@@ -1,629 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
|
||||
For the purpose of easier reading the script
|
||||
is divided into following sections:
|
||||
|
||||
- initialization
|
||||
- compilation
|
||||
- jar
|
||||
- execution
|
||||
- debugging
|
||||
- javadoc
|
||||
- junit compilation
|
||||
- junit execution
|
||||
- junit debugging
|
||||
- applet
|
||||
- cleanup
|
||||
|
||||
-->
|
||||
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="echoserver-impl">
|
||||
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
||||
<!--
|
||||
======================
|
||||
INITIALIZATION SECTION
|
||||
======================
|
||||
-->
|
||||
<target name="-pre-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="-pre-init" name="-init-private">
|
||||
<property file="nbproject/private/config.properties"/>
|
||||
<property file="nbproject/private/configs/${config}.properties"/>
|
||||
<property file="nbproject/private/private.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private" name="-init-user">
|
||||
<property file="${user.properties.file}"/>
|
||||
<!-- The two properties below are usually overridden -->
|
||||
<!-- by the active platform. Just a fallback. -->
|
||||
<property name="default.javac.source" value="1.4"/>
|
||||
<property name="default.javac.target" value="1.4"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
|
||||
<property file="nbproject/configs/${config}.properties"/>
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
|
||||
<available file="${manifest.file}" property="manifest.available"/>
|
||||
<condition property="manifest.available+main.class">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<isset property="main.class"/>
|
||||
<not>
|
||||
<equals arg1="${main.class}" arg2="" trim="true"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class}"/>
|
||||
<isset property="libs.CopyLibs.classpath"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="have.tests">
|
||||
<or>
|
||||
<available file="${test.src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="have.sources">
|
||||
<or>
|
||||
<available file="${src.dir}"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition property="netbeans.home+have.tests">
|
||||
<and>
|
||||
<isset property="netbeans.home"/>
|
||||
<isset property="have.tests"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="no.javadoc.preview">
|
||||
<and>
|
||||
<isset property="javadoc.preview"/>
|
||||
<isfalse value="${javadoc.preview}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="run.jvmargs" value=""/>
|
||||
<property name="javac.compilerargs" value=""/>
|
||||
<property name="work.dir" value="${basedir}"/>
|
||||
<condition property="no.deps">
|
||||
<and>
|
||||
<istrue value="${no.dependencies}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javac.debug" value="true"/>
|
||||
<property name="javadoc.preview" value="true"/>
|
||||
<property name="application.args" value=""/>
|
||||
<property name="source.encoding" value="${file.encoding}"/>
|
||||
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
|
||||
<and>
|
||||
<isset property="javadoc.encoding"/>
|
||||
<not>
|
||||
<equals arg1="${javadoc.encoding}" arg2=""/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<property name="javadoc.encoding.used" value="${source.encoding}"/>
|
||||
<property name="includes" value="**"/>
|
||||
<property name="excludes" value=""/>
|
||||
<property name="do.depend" value="false"/>
|
||||
<condition property="do.depend.true">
|
||||
<istrue value="${do.depend}"/>
|
||||
</condition>
|
||||
<condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
|
||||
<and>
|
||||
<isset property="jaxws.endorsed.dir"/>
|
||||
<available file="nbproject/jaxws-build.xml"/>
|
||||
</and>
|
||||
</condition>
|
||||
</target>
|
||||
<target name="-post-init">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
|
||||
<fail unless="src.dir">Must set src.dir</fail>
|
||||
<fail unless="test.src.dir">Must set test.src.dir</fail>
|
||||
<fail unless="build.dir">Must set build.dir</fail>
|
||||
<fail unless="dist.dir">Must set dist.dir</fail>
|
||||
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
||||
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
||||
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
||||
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
|
||||
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
|
||||
<fail unless="dist.jar">Must set dist.jar</fail>
|
||||
</target>
|
||||
<target name="-init-macrodef-property">
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-javac">
|
||||
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="${javac.debug}" name="debug"/>
|
||||
<attribute default="" name="sourcepath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${src.dir}" name="srcdir"/>
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<attribute default="${javac.classpath}" name="classpath"/>
|
||||
<sequential>
|
||||
<depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</depend>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${build.classes.dir}" name="destdir"/>
|
||||
<sequential>
|
||||
<fail unless="javac.includes">Must set javac.includes</fail>
|
||||
<pathconvert pathsep="," property="javac.includes.binary">
|
||||
<path>
|
||||
<filelist dir="@{destdir}" files="${javac.includes}"/>
|
||||
</path>
|
||||
<globmapper from="*.java" to="*.class"/>
|
||||
</pathconvert>
|
||||
<delete>
|
||||
<files includes="${javac.includes.binary}"/>
|
||||
</delete>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-junit">
|
||||
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${includes}" name="includes"/>
|
||||
<attribute default="${excludes}" name="excludes"/>
|
||||
<attribute default="**" name="testincludes"/>
|
||||
<sequential>
|
||||
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
|
||||
<batchtest todir="${build.test.results.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
||||
<filename name="@{testincludes}"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<classpath>
|
||||
<path path="${run.test.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<formatter type="xml"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
</junit>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-nbjpda">
|
||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${main.class}" name="name"/>
|
||||
<attribute default="${debug.classpath}" name="classpath"/>
|
||||
<attribute default="" name="stopclassname"/>
|
||||
<sequential>
|
||||
<nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
</nbjpdastart>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${build.classes.dir}" name="dir"/>
|
||||
<sequential>
|
||||
<nbjpdareload>
|
||||
<fileset dir="@{dir}" includes="${fix.classes}">
|
||||
<include name="${fix.includes}*.class"/>
|
||||
</fileset>
|
||||
</nbjpdareload>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-debug-args">
|
||||
<property name="version-output" value="java version "${ant.java.version}"/>
|
||||
<condition property="have-jdk-older-than-1.4">
|
||||
<or>
|
||||
<contains string="${version-output}" substring="java version "1.0"/>
|
||||
<contains string="${version-output}" substring="java version "1.1"/>
|
||||
<contains string="${version-output}" substring="java version "1.2"/>
|
||||
<contains string="${version-output}" substring="java version "1.3"/>
|
||||
</or>
|
||||
</condition>
|
||||
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
|
||||
<istrue value="${have-jdk-older-than-1.4}"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-debug-args" name="-init-macrodef-debug">
|
||||
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<attribute default="${main.class}" name="classname"/>
|
||||
<attribute default="${debug.classpath}" name="classpath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||
<jvmarg line="${debug-args-line}"/>
|
||||
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper from="run-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-macrodef-java">
|
||||
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<attribute default="${main.class}" name="classname"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<java classname="@{classname}" dir="${work.dir}" fork="true">
|
||||
<jvmarg line="${run.jvmargs}"/>
|
||||
<classpath>
|
||||
<path path="${run.classpath}"/>
|
||||
</classpath>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="run-sys-prop."/>
|
||||
<mapper from="run-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<customize/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-presetdef-jar">
|
||||
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<jar compress="${jar.compress}" jarfile="${dist.jar}">
|
||||
<j2seproject1:fileset dir="${build.classes.dir}"/>
|
||||
</jar>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target depends="init" name="deps-jar" unless="no.deps"/>
|
||||
<target depends="init,deps-jar" name="-pre-pre-compile">
|
||||
<mkdir dir="${build.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target if="do.depend.true" name="-compile-depend">
|
||||
<j2seproject3:depend/>
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
|
||||
<j2seproject3:javac/>
|
||||
<copy todir="${build.classes.dir}">
|
||||
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
|
||||
<target name="-pre-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<j2seproject3:force-recompile/>
|
||||
<j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
|
||||
</target>
|
||||
<target name="-post-compile-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
||||
<!--
|
||||
====================
|
||||
JAR BUILDING SECTION
|
||||
====================
|
||||
-->
|
||||
<target depends="init" name="-pre-pre-jar">
|
||||
<dirname file="${dist.jar}" property="dist.jar.dir"/>
|
||||
<mkdir dir="${dist.jar.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
|
||||
<j2seproject1:jar/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
|
||||
<j2seproject1:jar manifest="${manifest.file}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
|
||||
<j2seproject1:jar manifest="${manifest.file}">
|
||||
<j2seproject1:manifest>
|
||||
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
|
||||
</j2seproject1:manifest>
|
||||
</j2seproject1:jar>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<pathconvert property="run.classpath.with.dist.jar">
|
||||
<path path="${run.classpath}"/>
|
||||
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
|
||||
</pathconvert>
|
||||
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
|
||||
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
|
||||
<pathconvert property="run.classpath.without.build.classes.dir">
|
||||
<path path="${run.classpath}"/>
|
||||
<map from="${build.classes.dir.resolved}" to=""/>
|
||||
</pathconvert>
|
||||
<pathconvert pathsep=" " property="jar.classpath">
|
||||
<path path="${run.classpath.without.build.classes.dir}"/>
|
||||
<chainedmapper>
|
||||
<flattenmapper/>
|
||||
<globmapper from="*" to="lib/*"/>
|
||||
</chainedmapper>
|
||||
</pathconvert>
|
||||
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
|
||||
<copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
<attribute name="Class-Path" value="${jar.classpath}"/>
|
||||
</manifest>
|
||||
</copylibs>
|
||||
<echo>To run this application from the command line without Ant, try:</echo>
|
||||
<property location="${dist.jar}" name="dist.jar.resolved"/>
|
||||
<echo>java -jar "${dist.jar.resolved}"</echo>
|
||||
</target>
|
||||
<target name="-post-jar">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
|
||||
<!--
|
||||
=================
|
||||
EXECUTION SECTION
|
||||
=================
|
||||
-->
|
||||
<target depends="init,compile" description="Run a main class." name="run">
|
||||
<j2seproject1:java>
|
||||
<customize>
|
||||
<arg line="${application.args}"/>
|
||||
</customize>
|
||||
</j2seproject1:java>
|
||||
</target>
|
||||
<target name="-do-not-recompile">
|
||||
<property name="javac.includes.binary" value=""/>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-single" name="run-single">
|
||||
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
|
||||
<j2seproject1:java classname="${run.class}"/>
|
||||
</target>
|
||||
<!--
|
||||
=================
|
||||
DEBUGGING SECTION
|
||||
=================
|
||||
-->
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
||||
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile" name="-debug-start-debuggee">
|
||||
<j2seproject3:debug>
|
||||
<customize>
|
||||
<arg line="${application.args}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
|
||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
|
||||
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
|
||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
|
||||
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
|
||||
<j2seproject3:debug classname="${debug.class}"/>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
|
||||
<target depends="init" name="-pre-debug-fix">
|
||||
<fail unless="fix.includes">Must set fix.includes</fail>
|
||||
<property name="javac.includes" value="${fix.includes}.java"/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
|
||||
<j2seproject1:nbjpdareload/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
|
||||
<!--
|
||||
===============
|
||||
JAVADOC SECTION
|
||||
===============
|
||||
-->
|
||||
<target depends="init" name="-javadoc-build">
|
||||
<mkdir dir="${dist.javadoc.dir}"/>
|
||||
<javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
|
||||
<classpath>
|
||||
<path path="${javac.classpath}"/>
|
||||
</classpath>
|
||||
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
||||
<filename name="**/*.java"/>
|
||||
</fileset>
|
||||
</javadoc>
|
||||
</target>
|
||||
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
|
||||
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
|
||||
</target>
|
||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||
<!--
|
||||
=========================
|
||||
JUNIT COMPILATION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||
<mkdir dir="${build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target name="-pre-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target if="do.depend.true" name="-compile-test-depend">
|
||||
<j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
|
||||
<j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
||||
<copy todir="${build.test.classes.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
|
||||
<target name="-pre-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
|
||||
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
||||
<j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
|
||||
<j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
|
||||
<copy todir="${build.test.classes.dir}">
|
||||
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="-post-compile-test-single">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT EXECUTION SECTION
|
||||
=======================
|
||||
-->
|
||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
||||
<j2seproject3:junit testincludes="**/*Test.java"/>
|
||||
</target>
|
||||
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target depends="init" if="have.tests" name="test-report"/>
|
||||
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
|
||||
<target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
|
||||
<target depends="init" if="have.tests" name="-pre-test-run-single">
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
||||
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
||||
<j2seproject3:junit excludes="" includes="${test.includes}"/>
|
||||
</target>
|
||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
||||
<fail if="tests.failed">Some tests failed; see details above.</fail>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
||||
<!--
|
||||
=======================
|
||||
JUNIT DEBUGGING SECTION
|
||||
=======================
|
||||
-->
|
||||
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||
<property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
||||
<delete file="${test.report.file}"/>
|
||||
<mkdir dir="${build.test.results.dir}"/>
|
||||
<j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
||||
<customize>
|
||||
<syspropertyset>
|
||||
<propertyref prefix="test-sys-prop."/>
|
||||
<mapper from="test-sys-prop.*" to="*" type="glob"/>
|
||||
</syspropertyset>
|
||||
<arg value="${test.class}"/>
|
||||
<arg value="showoutput=true"/>
|
||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
||||
<arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
||||
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
||||
</target>
|
||||
<target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
||||
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
|
||||
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
|
||||
</target>
|
||||
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
|
||||
<!--
|
||||
=========================
|
||||
APPLET EXECUTION SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile-single" name="run-applet">
|
||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||
<j2seproject1:java classname="sun.applet.AppletViewer">
|
||||
<customize>
|
||||
<arg value="${applet.url}"/>
|
||||
</customize>
|
||||
</j2seproject1:java>
|
||||
</target>
|
||||
<!--
|
||||
=========================
|
||||
APPLET DEBUGGING SECTION
|
||||
=========================
|
||||
-->
|
||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
|
||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||
<j2seproject3:debug classname="sun.applet.AppletViewer">
|
||||
<customize>
|
||||
<arg value="${applet.url}"/>
|
||||
</customize>
|
||||
</j2seproject3:debug>
|
||||
</target>
|
||||
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
|
||||
<!--
|
||||
===============
|
||||
CLEANUP SECTION
|
||||
===============
|
||||
-->
|
||||
<target depends="init" name="deps-clean" unless="no.deps"/>
|
||||
<target depends="init" name="-do-clean">
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="${dist.dir}"/>
|
||||
</target>
|
||||
<target name="-post-clean">
|
||||
<!-- Empty placeholder for easier customization. -->
|
||||
<!-- You can override this target in the ../build.xml file. -->
|
||||
</target>
|
||||
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
|
||||
</project>
|
@@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=4ce39738
|
||||
build.xml.script.CRC32=c1deb82c
|
||||
build.xml.stylesheet.CRC32=be360661
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=4ce39738
|
||||
nbproject/build-impl.xml.script.CRC32=555cdd2d
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=487672f9
|
@@ -1,2 +0,0 @@
|
||||
jaxws.endorsed.dir=/usr/local/netbeans-6.1/java2/modules/ext/jaxws21/api
|
||||
user.properties.file=/root/.netbeans/6.1/build.properties
|
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
|
||||
<file>file:/root/NetBeansProjects/BOB/Demos/echo/echoserver/src/net/i2p/BOB/Demos/echo/echoserver/Main.java</file>
|
||||
</open-files>
|
||||
</project-private>
|
@@ -1,60 +0,0 @@
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
# This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${build.dir}/generated
|
||||
# Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
# This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${dist.dir}/echoserver.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
excludes=
|
||||
file.reference.BOB.jar=../../../dist/BOB.jar
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.source=1.5
|
||||
javac.target=1.5
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${libs.junit.classpath}:\
|
||||
${libs.junit_4.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
main.class=net.i2p.BOB.Demos.echo.echoserver.Main
|
||||
manifest.file=manifest.mf
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# Space-separated list of JVM arguments used when running the project
|
||||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
||||
# or test-sys-prop.name=value to set system properties for unit tests):
|
||||
run.jvmargs=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
||||
test.src.dir=test
|
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>echoserver</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
@@ -1,4 +0,0 @@
|
||||
(
|
||||
cd dist
|
||||
java -jar echoserver.jar main 37337 testserver
|
||||
)
|
@@ -1,189 +0,0 @@
|
||||
/**
|
||||
* WTFPL
|
||||
* Version 2, December 2004
|
||||
*
|
||||
* Copyright (C) sponge
|
||||
* Planet Earth
|
||||
*
|
||||
* See...
|
||||
*
|
||||
* http://sam.zoy.org/wtfpl/
|
||||
* and
|
||||
* http://en.wikipedia.org/wiki/WTFPL
|
||||
*
|
||||
* ...for any additional details and license questions.
|
||||
*/
|
||||
package net.i2p.BOB.Demos.echo.echoserver;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.InetAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author sponge
|
||||
*/
|
||||
public class Main {
|
||||
public static String Lread(InputStream in) throws IOException {
|
||||
String S;
|
||||
int b;
|
||||
char c;
|
||||
|
||||
S = new String();
|
||||
|
||||
while(true) {
|
||||
b = in.read();
|
||||
if(b < 20) {
|
||||
break;
|
||||
}
|
||||
c = (char)(b & 0x7f); // We only care about ASCII
|
||||
S = new String(S + c);
|
||||
}
|
||||
return S;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for "ERROR" and if so, throw RuntimeException
|
||||
* @param line
|
||||
* @throws java.lang.RuntimeException
|
||||
*/
|
||||
static void checkline(String line) throws RuntimeException {
|
||||
System.out.println(line); // print status
|
||||
if(line.startsWith("ERROR")) {
|
||||
throw new RuntimeException(line);
|
||||
}
|
||||
}
|
||||
|
||||
static void wrtxt(OutputStream CMDout, String s) throws IOException {
|
||||
CMDout.write(DataHelper.getUTF8(s));
|
||||
CMDout.write('\n');
|
||||
CMDout.flush();
|
||||
}
|
||||
|
||||
static void setupconn(String[] args) throws UnknownHostException, IOException, RuntimeException {
|
||||
String line;
|
||||
Socket CMDsock = new Socket("localhost", 0xB0B);
|
||||
InputStream CMDin = CMDsock.getInputStream();
|
||||
OutputStream CMDout = CMDsock.getOutputStream();
|
||||
// setup the tunnel.
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print the banner
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print initial status, should always be "OK"
|
||||
try {
|
||||
wrtxt(CMDout, "status " + args[2]);
|
||||
line =Lread(CMDin); // get the status of this nickname, if it's an error, create it
|
||||
checkline(line);
|
||||
} catch(RuntimeException rte) {
|
||||
wrtxt(CMDout, "setnick " + args[2]);
|
||||
line =Lread(CMDin); // create a new nickname
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "newkeys ");
|
||||
line =Lread(CMDin); // set up new keys
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "outport " + args[1]);
|
||||
line = Lread(CMDin); // set the port we connect out on
|
||||
checkline(line);
|
||||
}
|
||||
wrtxt(CMDout, "getnick " + args[2]);
|
||||
line = Lread(CMDin); // Set to our nick
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "start ");
|
||||
line = Lread(CMDin); // an error here is OK
|
||||
System.out.println(line); // print status
|
||||
CMDsock.close(); // we no longer need this particular socket
|
||||
|
||||
}
|
||||
|
||||
static void deleteconn(String[] args) throws UnknownHostException, IOException, RuntimeException {
|
||||
String line;
|
||||
Socket CMDsock = new Socket("localhost", 0xB0B);
|
||||
InputStream CMDin = CMDsock.getInputStream();
|
||||
OutputStream CMDout = CMDsock.getOutputStream();
|
||||
// delete the tunnel.
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print the banner
|
||||
line = Lread(CMDin);
|
||||
System.out.println(line); // print initial status, should always be "OK"
|
||||
wrtxt(CMDout, "getnick " + args[2]); // Set to our nick
|
||||
line = Lread(CMDin);
|
||||
checkline(line);
|
||||
wrtxt(CMDout, "stop");
|
||||
line = Lread(CMDin);
|
||||
checkline(line);
|
||||
try {
|
||||
Thread.sleep(2000); //sleep for 2000 ms (Two seconds)
|
||||
} catch(Exception e) {
|
||||
// nop
|
||||
}
|
||||
|
||||
wrtxt(CMDout, "clear");
|
||||
line = Lread(CMDin);
|
||||
while(line.startsWith("ERROR")) {
|
||||
wrtxt(CMDout, "clear");
|
||||
line = Lread(CMDin);
|
||||
}
|
||||
System.out.println(line); // print status
|
||||
CMDsock.close(); // we no longer need this particular socket
|
||||
|
||||
}
|
||||
|
||||
static void chatter(Socket sock) throws UnknownHostException, IOException, RuntimeException {
|
||||
String line;
|
||||
InputStream in = sock.getInputStream();
|
||||
OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(sock.getOutputStream()));
|
||||
|
||||
line = Lread(in); // get remote I2P address
|
||||
System.out.println("Connect from: " + line); // show user
|
||||
|
||||
out.write("Hello, You are connecting from " + line + "\n"); // send greeting
|
||||
out.flush(); // make sure it's sent.
|
||||
line = Lread(in); // get test text from client
|
||||
System.out.println("Got "+line); // show user
|
||||
sock.close(); // done.
|
||||
}
|
||||
|
||||
private static void serverlistener(String[] args) throws UnknownHostException, IOException, RuntimeException {
|
||||
ServerSocket listener = new ServerSocket(Integer.parseInt(args[1]), 10, InetAddress.getByName("localhost"));
|
||||
Socket server;
|
||||
|
||||
while(true) {
|
||||
server = listener.accept();
|
||||
chatter(server);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args tunnelport tunnelnickname
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// I'm lazy, and want to exit on any failures.
|
||||
try {
|
||||
setupconn(args); // talk to BOB, set up an inbound port
|
||||
serverlistener(args); // talk over the connection
|
||||
|
||||
} catch(UnknownHostException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch(IOException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
deleteconn(args);
|
||||
} catch(UnknownHostException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch(IOException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch(RuntimeException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
@@ -39,8 +39,9 @@ is divided into following sections:
|
||||
<property file="${user.properties.file}"/>
|
||||
<!-- The two properties below are usually overridden -->
|
||||
<!-- by the active platform. Just a fallback. -->
|
||||
<property name="default.javac.source" value="1.4"/>
|
||||
<property name="default.javac.target" value="1.4"/>
|
||||
<property name="default.javac.source" value="1.8"/>
|
||||
<property name="default.javac.target" value="1.8"/>
|
||||
<property name="javac.release" value="8"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
|
||||
<property file="nbproject/configs/${config}.properties"/>
|
||||
@@ -155,7 +156,7 @@ is divided into following sections:
|
||||
<attribute default="/does/not/exist" name="sourcepath"/>
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" release="${javac.release}">
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
|
@@ -29,28 +29,19 @@ endorsed.classpath=
|
||||
excludes=**/*.html,**/*.txt
|
||||
file.reference.build-javadoc=../../i2p.i2p/build/javadoc
|
||||
file.reference.i2p.jar=../../core/java/build/i2p.jar
|
||||
file.reference.i2ptunnel.jar=../i2ptunnel/java/build/i2ptunnel.jar
|
||||
file.reference.jbigi.jar=../../build/jbigi.jar
|
||||
file.reference.mstreaming.jar=../ministreaming/java/build/mstreaming.jar
|
||||
file.reference.router.jar=../../router/java/build/router.jar
|
||||
file.reference.streaming.jar=../streaming/java/build/streaming.jar
|
||||
file.reference.wrapper.jar=../../installer/lib/wrapper/all/wrapper.jar
|
||||
includes=**
|
||||
jar.compress=true
|
||||
javac.classpath=\
|
||||
${file.reference.router.jar}:\
|
||||
${file.reference.i2ptunnel.jar}:\
|
||||
${file.reference.mstreaming.jar}:\
|
||||
${file.reference.streaming.jar}:\
|
||||
${file.reference.wrapper.jar}:\
|
||||
${file.reference.i2p.jar}:\
|
||||
${file.reference.router.jar}
|
||||
${file.reference.i2p.jar}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.version=1.7
|
||||
javac.version=1.8
|
||||
javac.source=${javac.version}
|
||||
javac.target=${javac.version}
|
||||
javac.release=8
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>BOB</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<minimum-ant-version>1.9.8</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
|
@@ -38,6 +38,7 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.app.*;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.util.I2PAppThread;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.util.PortMapper;
|
||||
import net.i2p.util.SimpleTimer2;
|
||||
|
||||
@@ -111,7 +112,9 @@ import net.i2p.util.SimpleTimer2;
|
||||
* BOB, main command socket listener, launches the command parser engine.
|
||||
*
|
||||
* @author sponge
|
||||
* @deprecated Please port applications to SAMv3
|
||||
*/
|
||||
@Deprecated
|
||||
public class BOB implements Runnable, ClientApp {
|
||||
|
||||
public final static String PROP_CONFIG_LOCATION = "BOB.config";
|
||||
@@ -140,6 +143,7 @@ public class BOB implements Runnable, ClientApp {
|
||||
|
||||
private volatile ServerSocket listener;
|
||||
private volatile Thread _runner;
|
||||
private volatile boolean _warned;
|
||||
|
||||
/**
|
||||
* Stop BOB gracefully
|
||||
@@ -342,6 +346,12 @@ public class BOB implements Runnable, ClientApp {
|
||||
}
|
||||
|
||||
if (g) {
|
||||
if (!_warned) {
|
||||
_warned = true;
|
||||
String s = "BOB is deprecated. Please port applications to SAMv3.";
|
||||
_context.logManager().getLog(BOB.class).logAlways(Log.WARN, s);
|
||||
_log.warn(s);
|
||||
}
|
||||
DoCMDS conn_c = new DoCMDS(spin, lock, server, props, database, _log);
|
||||
Thread t = new I2PAppThread(conn_c);
|
||||
t.setName("BOB.DoCMDS " + i);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>BOB, the Basic Open Bridge, allows TCP applications to talk over I2P.</p>
|
||||
<p>BOB, the Basic Open Bridge, allows TCP applications to talk over I2P - DEPRECATED - Please port applications to SAMv3.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,43 +0,0 @@
|
||||
addressbook v2.0.2 - A simple name resolution mechanism for I2P
|
||||
|
||||
addressbook is a simple implementation of subscribable address books for I2P.
|
||||
Addresses are stored in userhosts.txt and a second copy of the address book is
|
||||
placed on your eepsite as hosts.txt.
|
||||
|
||||
subscriptions.txt contains a list of urls to check for new addresses.
|
||||
Since the urls are checked in order, and conflicting addresses are not added,
|
||||
addressbook.subscriptions can be considered to be ranked in order of trust.
|
||||
|
||||
The system created by addressbook is similar to the early days of DNS,
|
||||
when everyone ran a local name server. The major difference is the lack of
|
||||
authority. Name cannot be guaranteed to be globally unique, but in practise
|
||||
they probably will be, for a variety of social reasons.
|
||||
|
||||
Requirements
|
||||
************
|
||||
|
||||
i2p with a running http proxy
|
||||
|
||||
Installation and Usage
|
||||
**********************
|
||||
|
||||
1. Unzip addressbook-%ver.zip into your i2p directory.
|
||||
2. Restart your router.
|
||||
|
||||
The addressbook daemon will automatically run while the router is up.
|
||||
|
||||
Aside from the daemon itself, the other elements of the addressbook interface
|
||||
are the config.txt, myhosts.txt, and subscriptions.txt files found in the addressbook
|
||||
directory.
|
||||
|
||||
config.txt is the configuration file for addressbook.
|
||||
|
||||
myhosts.txt is the addressbook master address book. Addresses placed in this file
|
||||
take precidence over those in the router address book and in remote address books.
|
||||
If changes are made to this file, they will be reflected in the router address book
|
||||
and published address book after the next update. Do not make changes directly to the
|
||||
router address book, as they could be lost during an update.
|
||||
|
||||
subscriptions.txt is the subscription list for addressbook. Each entry is an absolute
|
||||
url to a file in hosts.txt format. Since the list is checked in order, url's should be
|
||||
listed in order of trust.
|
@@ -7,7 +7,8 @@
|
||||
<property name="jar" value="addressbook.jar"/>
|
||||
<property name="war" value="addressbook.war"/>
|
||||
<property name="javac.compilerargs" value="" />
|
||||
<property name="javac.version" value="1.7" />
|
||||
<property name="javac.version" value="1.8" />
|
||||
<property name="javac.release" value="8" />
|
||||
|
||||
<target name="all" depends="jar, emptyWar"/>
|
||||
|
||||
@@ -40,7 +41,9 @@
|
||||
|
||||
<target name="compile" depends="init, depend, warUpToDate">
|
||||
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
includeAntRuntime="false"
|
||||
encoding="UTF-8"
|
||||
srcdir="${src}" destdir="${build}">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
<classpath>
|
||||
|
@@ -1,48 +0,0 @@
|
||||
# This is the configuration file for addressbook.
|
||||
#
|
||||
# Options
|
||||
# *******
|
||||
# All paths are realitive to i2p/addressbook. Default value for
|
||||
# each option is given in parentheses.
|
||||
#
|
||||
# proxy_host The hostname of your I2P http proxy.
|
||||
# (localhost)
|
||||
#
|
||||
# proxy_port The port of your I2P http proxy. (4444)
|
||||
#
|
||||
# master_addressbook The path to your master address book, used for local
|
||||
# changes only. (myhosts.txt)
|
||||
#
|
||||
# router_addressbook The path to the address book used by the router.
|
||||
# Contains the addresses from your master address book
|
||||
# and your subscribed address books. (../userhosts.txt)
|
||||
#
|
||||
# private_addressbook The path to the private address book used by the router.
|
||||
# This is used only by the router and SusiDNS.
|
||||
# It is not published by addressbook. (../privatehosts.txt)
|
||||
#
|
||||
# published_addressbook The path to the copy of your address book made
|
||||
# available on i2p. (../eepsite/docroot/hosts.txt)
|
||||
#
|
||||
# log The path to your addressbook log. (log.txt)
|
||||
#
|
||||
# subscriptions The path to your subscription file. (subscriptions.txt)
|
||||
#
|
||||
# etags The path to the etags header storage file. (etags)
|
||||
#
|
||||
# last_modified The path to the last-modified header storage file.
|
||||
# (last_modified)
|
||||
#
|
||||
# update_delay The time (in hours) between each update. (1)
|
||||
|
||||
proxy_host=localhost
|
||||
proxy_port=4444
|
||||
master_addressbook=myhosts.txt
|
||||
router_addressbook=../userhosts.txt
|
||||
private_addressbook=../privatehosts.txt
|
||||
published_addressbook=../eepsite/docroot/hosts.txt
|
||||
log=log.txt
|
||||
subscriptions=subscriptions.txt
|
||||
etags=etags
|
||||
last_modified=last_modified
|
||||
update_delay=1
|
@@ -246,19 +246,19 @@ class AddressBook implements Iterable<Map.Entry<String, HostTxtEntry>> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Do basic validation of the hostname
|
||||
* hostname was already converted to lower case by HostTxtParser.parse()
|
||||
* Do basic validation of the address
|
||||
* address was already converted to lower case by HostTxtParser.parse()
|
||||
*/
|
||||
public static boolean isValidKey(String host) {
|
||||
return
|
||||
host.endsWith(".i2p") &&
|
||||
host.length() > 4 &&
|
||||
host.length() <= 67 && // 63 + ".i2p"
|
||||
host.endsWith(".i2p") &&
|
||||
host.length() > 4 &&
|
||||
host.length() <= 67 && // 63 + ".i2p"
|
||||
(! host.startsWith(".")) &&
|
||||
(! host.startsWith("-")) &&
|
||||
host.indexOf(".-") < 0 &&
|
||||
host.indexOf("-.") < 0 &&
|
||||
host.indexOf("..") < 0 &&
|
||||
host.indexOf("..") < 0 &&
|
||||
// IDN - basic check, not complete validation
|
||||
(host.indexOf("--") < 0 || host.startsWith("xn--") || host.indexOf(".xn--") > 0) &&
|
||||
HOST_PATTERN.matcher(host).matches() &&
|
||||
@@ -275,19 +275,19 @@ class AddressBook implements Iterable<Map.Entry<String, HostTxtEntry>> {
|
||||
(! host.endsWith(".proxy.i2p")) &&
|
||||
(! host.endsWith(".router.i2p")) &&
|
||||
(! host.endsWith(".console.i2p"))
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do basic validation of the b64 dest, without bothering to instantiate it
|
||||
*/
|
||||
private static boolean isValidDest(String dest) {
|
||||
return
|
||||
return
|
||||
// null cert ends with AAAA but other zero-length certs would be AA
|
||||
((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AA")) ||
|
||||
(dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) &&
|
||||
// B64 comes in groups of 2, 3, or 4 chars, but never 1
|
||||
((dest.length() % 4) != 1) &&
|
||||
((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AA")) ||
|
||||
(dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) &&
|
||||
// B64 comes in groups of 2, 3, or 4 chars, but never 1
|
||||
((dest.length() % 4) != 1) &&
|
||||
B64_PATTERN.matcher(dest).matches()
|
||||
;
|
||||
}
|
||||
|
@@ -166,6 +166,10 @@ class ConfigParser {
|
||||
Map<String, String> result;
|
||||
try {
|
||||
result = parse(file);
|
||||
// migrate
|
||||
String local = result.remove("master_addressbook");
|
||||
if (local != null)
|
||||
result.put("local_addressbook", local);
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
if (!result.containsKey(entry.getKey()))
|
||||
result.put(entry.getKey(), entry.getValue());
|
||||
|
@@ -67,8 +67,8 @@ class Daemon {
|
||||
* Update the router and published address books using remote data from the
|
||||
* subscribed address books listed in subscriptions.
|
||||
*
|
||||
* @param master
|
||||
* The master AddressBook. This address book is never
|
||||
* @param local
|
||||
* The local AddressBook. This address book is never
|
||||
* overwritten, so it is safe for the user to write to.
|
||||
* It is only merged to the published addressbook.
|
||||
* May be null.
|
||||
@@ -77,7 +77,7 @@ class Daemon {
|
||||
* client applications.
|
||||
* @param published
|
||||
* The published AddressBook. This address book is published on
|
||||
* the user's eepsite so that others may subscribe to it.
|
||||
* the user's I2P Site so that others may subscribe to it.
|
||||
* May be null.
|
||||
* If non-null, overwrite with the new addressbook.
|
||||
* @param subscriptions
|
||||
@@ -87,7 +87,7 @@ class Daemon {
|
||||
* The log to write changes and conflicts to.
|
||||
* May be null.
|
||||
*/
|
||||
public static void update(AddressBook master, AddressBook router,
|
||||
public static void update(AddressBook local, AddressBook router,
|
||||
File published, SubscriptionList subscriptions, Log log) {
|
||||
for (AddressBook book : subscriptions) {
|
||||
// yes, the EepGet fetch() is done in next()
|
||||
@@ -95,8 +95,8 @@ class Daemon {
|
||||
}
|
||||
router.write();
|
||||
if (published != null) {
|
||||
if (master != null)
|
||||
router.merge(master, true, null);
|
||||
if (local != null)
|
||||
router.merge(local, true, null);
|
||||
router.write(published);
|
||||
}
|
||||
subscriptions.write();
|
||||
@@ -105,13 +105,13 @@ class Daemon {
|
||||
/**
|
||||
* Update the router and published address books using remote data from the
|
||||
* subscribed address books listed in subscriptions.
|
||||
* Merging of the "master" addressbook is NOT supported.
|
||||
* Merging of the "local" addressbook is NOT supported.
|
||||
*
|
||||
* @param router
|
||||
* The NamingService to update, generally the root NamingService from the context.
|
||||
* @param published
|
||||
* The published AddressBook. This address book is published on
|
||||
* the user's eepsite so that others may subscribe to it.
|
||||
* the user's I2P Site so that others may subscribe to it.
|
||||
* May be null.
|
||||
* If non-null, overwrite with the new addressbook.
|
||||
* @param subscriptions
|
||||
@@ -751,17 +751,17 @@ class Daemon {
|
||||
if (Boolean.parseBoolean(settings.get("update_direct"))) {
|
||||
// Direct hosts.txt access
|
||||
File routerFile = new File(home, settings.get("router_addressbook"));
|
||||
AddressBook master;
|
||||
AddressBook local;
|
||||
if (should_publish) {
|
||||
File masterFile = new File(home, settings.get("master_addressbook"));
|
||||
master = new AddressBook(masterFile);
|
||||
File localFile = new File(home, settings.get("local_addressbook"));
|
||||
local = new AddressBook(localFile);
|
||||
} else {
|
||||
master = null;
|
||||
local = null;
|
||||
}
|
||||
AddressBook router = new AddressBook(routerFile);
|
||||
update(master, router, published, subscriptions, log);
|
||||
update(local, router, published, subscriptions, log);
|
||||
} else {
|
||||
// Naming service - no merging of master to router and published is supported.
|
||||
// Naming service - no merging of local to router and published is supported.
|
||||
update(getNamingService(settings.get("naming_service")), published, subscriptions, log);
|
||||
}
|
||||
}
|
||||
@@ -841,7 +841,7 @@ class Daemon {
|
||||
Map<String, String> defaultSettings = new HashMap<String, String>();
|
||||
defaultSettings.put("proxy_host", "127.0.0.1");
|
||||
defaultSettings.put("proxy_port", "4444");
|
||||
defaultSettings.put("master_addressbook", "../userhosts.txt");
|
||||
defaultSettings.put("local_addressbook", "../userhosts.txt");
|
||||
defaultSettings.put("router_addressbook", "../hosts.txt");
|
||||
defaultSettings.put("published_addressbook", "../eepsite/docroot/hosts.txt");
|
||||
defaultSettings.put("should_publish", "false");
|
||||
@@ -868,7 +868,7 @@ class Daemon {
|
||||
// wait
|
||||
try {
|
||||
Thread.sleep(5*60*1000 + I2PAppContext.getGlobalContext().random().nextLong(5*60*1000));
|
||||
// Static method, and redundent Thread.currentThread().sleep(5*60*1000);
|
||||
// Static method, and redundant Thread.currentThread().sleep(5*60*1000);
|
||||
} catch (InterruptedException ie) {}
|
||||
|
||||
while (_running) {
|
||||
|
@@ -98,7 +98,7 @@ import net.metanotion.util.skiplist.SkipList;
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* All host names are converted to lower case.
|
||||
* All hostnames are converted to lower case.
|
||||
*
|
||||
* @since 0.8.7, moved from core to addressbook in 0.9.31
|
||||
*/
|
||||
@@ -138,9 +138,11 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
private static final String VERSION = "4";
|
||||
|
||||
private static final String PROP_ADDED = "a";
|
||||
private static final String PROP_MODDED = "m";
|
||||
// See susidns
|
||||
//private static final String PROP_MODDED = "m";
|
||||
private static final String PROP_SOURCE = "s";
|
||||
private static final String PROP_VALIDATED = "v";
|
||||
// See susidns
|
||||
//private static final String PROP_VALIDATED = "v";
|
||||
|
||||
private static final String DUMMY = "";
|
||||
private static final int NEGATIVE_CACHE_SIZE = 32;
|
||||
@@ -1395,6 +1397,11 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
p = de.propsList.get(i);
|
||||
d = de.destList.get(i);
|
||||
}
|
||||
out.write("# ");
|
||||
out.write(key);
|
||||
out.write(": ");
|
||||
out.write(d.toBase32());
|
||||
out.write(nl);
|
||||
out.write(key);
|
||||
out.write('=');
|
||||
out.write(d.toBase64());
|
||||
@@ -2062,9 +2069,8 @@ public class BlockfileNamingService extends DummyNamingService {
|
||||
}
|
||||
if (baos.size() > 65535)
|
||||
throw new DataFormatException("Properties too big (65535 max): " + baos.size());
|
||||
byte propBytes[] = baos.toByteArray();
|
||||
DataHelper.writeLong(rawStream, 2, propBytes.length);
|
||||
rawStream.write(propBytes);
|
||||
DataHelper.writeLong(rawStream, 2, baos.size());
|
||||
baos.writeTo(rawStream);
|
||||
} else {
|
||||
DataHelper.writeLong(rawStream, 2, 0);
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ the API may be subject to change.
|
||||
Contact I2P developers if you are considering use in another application.
|
||||
Following is the original documentation copied from metanotion website.
|
||||
</p>
|
||||
<h1>Metanotion BlockFile Database</h1>
|
||||
<h2>Metanotion BlockFile Database</h2>
|
||||
<p>A 100% Java 1.3, BSD Licensed, embeddable single file database engine in 32KB. This database was designed for PDA based and J2ME applications.</p>
|
||||
|
||||
<h2>Table of Contents</h2>
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# addressbook master address book. Addresses placed in this file take precidence
|
||||
# over those in the router address book and in remote address books. If changes
|
||||
# are made to this file, they will be reflected in the router address book and
|
||||
# published address book after the next update.
|
||||
#
|
||||
# Do not make changes directly to the router address book, as they could be lost
|
||||
# during an update.
|
||||
#
|
||||
# This file takes addresses in the hosts.txt format, i.e.
|
||||
# example.i2p=somereallylongbase64thingAAAA
|
@@ -1,7 +0,0 @@
|
||||
# Subscription list for addressbook
|
||||
#
|
||||
# Each entry is an absolute url to a file in hosts.txt format.
|
||||
# Since the list is checked in order, url's should be listed in order of trust.
|
||||
#
|
||||
http://dev.i2p/i2p/hosts.txt
|
||||
http://duck.i2p/hosts.txt
|
@@ -2,6 +2,7 @@ sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'src'
|
||||
srcDir 'build/messages-src'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,3 +13,14 @@ dependencies {
|
||||
compile project(':installer')
|
||||
compile project(':apps:systray')
|
||||
}
|
||||
|
||||
// Create the java files from the po files. The jar task will compile them.
|
||||
// This requires gettext 0.19 or higher.
|
||||
// We don't support the "slow way"
|
||||
task bundle {
|
||||
doLast {
|
||||
if (!(new File("$buildDir/classes/java/main/net/i2p/desktopgui/messages_de.class")).exists())
|
||||
println "apps/desktopgui/bundle-messages.sh".execute().text
|
||||
}
|
||||
}
|
||||
jar.dependsOn bundle
|
||||
|
@@ -7,7 +7,8 @@
|
||||
<property name="jar" value="desktopgui.jar"/>
|
||||
<property name="javadoc" value="javadoc"/>
|
||||
<property name="javac.compilerargs" value=""/>
|
||||
<property name="javac.version" value="1.7" />
|
||||
<property name="javac.version" value="1.8" />
|
||||
<property name="javac.release" value="8" />
|
||||
<property name="require.gettext" value="true" />
|
||||
|
||||
<condition property="no.bundle">
|
||||
@@ -27,7 +28,9 @@
|
||||
|
||||
<target name="compile" depends="init">
|
||||
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
includeAntRuntime="false"
|
||||
encoding="UTF-8"
|
||||
srcdir="${src}" destdir="${build}">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
<classpath>
|
||||
@@ -51,7 +54,9 @@
|
||||
<arg value="./bundle-messages.sh" />
|
||||
</exec>
|
||||
<javac source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
includeAntRuntime="false"
|
||||
encoding="UTF-8"
|
||||
srcdir="${build}/messages-src" destdir="${build}">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
</javac>
|
||||
@@ -75,12 +80,14 @@
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.tr" value="" />
|
||||
<!-- ideal for linux: 24x24, but transparency doesn't work -->
|
||||
<copy tofile="${build}/desktopgui/resources/images/logo.png" file="../../installer/resources/themes/console/images/itoopie_xsm.png" />
|
||||
<copy tofile="${build}/desktopgui/resources/images/logo.png" file="../../apps/routerconsole/jsp/themes/console/images/itoopie_xsm.png" />
|
||||
<copy todir="${build}/desktopgui/resources/images" file="images/itoopie_black_24.png" />
|
||||
<copy todir="${build}/desktopgui/resources/images" file="images/itoopie_white_24.png" />
|
||||
<jar basedir="${build}" excludes="messages-src/**" destfile="${dist}/${jar}">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
|
||||
<attribute name="Implementation-Version" value="${full.version}" />
|
||||
<attribute name="Built-By" value="${build.built-by}" />
|
||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||
<attribute name="Base-Revision" value="${workspace.version}" />
|
||||
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
|
||||
|
5
apps/desktopgui/bundle-messages.sh
Normal file → Executable file
5
apps/desktopgui/bundle-messages.sh
Normal file → Executable file
@@ -11,6 +11,7 @@
|
||||
# zzz - public domain
|
||||
# Mathiasdm - modifications for desktopgui
|
||||
#
|
||||
cd `dirname $0`
|
||||
CLASS=net.i2p.desktopgui.messages
|
||||
TMPFILE=build/javafiles.txt
|
||||
export TZ=UTC
|
||||
@@ -110,7 +111,7 @@ do
|
||||
then
|
||||
# slow way
|
||||
# convert to class files in build
|
||||
msgfmt --java --statistics -r $CLASS -l $LG -d build $i
|
||||
msgfmt --java2 --statistics -r $CLASS -l $LG -d build $i
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "ERROR - msgfmt failed on ${i}, not updating translations"
|
||||
@@ -128,7 +129,7 @@ do
|
||||
TDY=$TD2/net/i2p/desktopgui
|
||||
rm -rf $TD
|
||||
mkdir -p $TD $TDY
|
||||
msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i
|
||||
msgfmt --java2 --statistics --source -r $CLASS -l $LG -d $TD $i
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "ERROR - msgfmt failed on ${i}, not updating translations"
|
||||
|
94
apps/desktopgui/locale/messages_es_AR.po
Normal file
94
apps/desktopgui/locale/messages_es_AR.po
Normal file
@@ -0,0 +1,94 @@
|
||||
# I2P
|
||||
# Copyright (C) 2009 The I2P Project
|
||||
# This file is distributed under the same license as the desktopgui package.
|
||||
# To contribute translations, see http://www.i2p2.de/newdevelopers
|
||||
#
|
||||
# Translators:
|
||||
# kaze kaze <kaze@rlab.be>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-05-25 12:29+0000\n"
|
||||
"PO-Revision-Date: 2017-11-16 15:29+0000\n"
|
||||
"Last-Translator: kaze kaze <kaze@rlab.be>\n"
|
||||
"Language-Team: Spanish (Argentina) (http://www.transifex.com/otf/I2P/language/es_AR/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es_AR\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:31
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:59
|
||||
msgid "Start I2P"
|
||||
msgstr "Iniciando I2P..."
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "I2P is starting!"
|
||||
msgstr "I2P esta iniciando!"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "Starting"
|
||||
msgstr "Iniciando"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:55
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:207
|
||||
msgid "Launch I2P Browser"
|
||||
msgstr "Lanzar el Navegador I2P"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:76
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:228
|
||||
msgid "Configure I2P System Tray"
|
||||
msgstr "Configurar la Bandeja de Sistema de I2P"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:77
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:229
|
||||
msgid "Disable"
|
||||
msgstr "Deshabilitar"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:93
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:245
|
||||
msgid "Restart I2P"
|
||||
msgstr "Riniciar I2P"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:110
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:262
|
||||
msgid "Stop I2P"
|
||||
msgstr "Detener I2P"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:126
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:278
|
||||
msgid "Restart I2P Immediately"
|
||||
msgstr " Reiniciar I2P inmediatamente "
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:143
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:295
|
||||
msgid "Stop I2P Immediately"
|
||||
msgstr " Detener I2P inmediatamente "
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:157
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:309
|
||||
msgid "Cancel I2P Shutdown"
|
||||
msgstr "Cancelar el Apagado de I2P"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:363
|
||||
#, java-format
|
||||
msgid "Shutdown in {0}"
|
||||
msgstr "Apagar en {0}"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:365
|
||||
msgid "Shutdown imminent"
|
||||
msgstr "Apagado inminente"
|
||||
|
||||
#. status translations are in the console bundle
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:370
|
||||
msgid "Network"
|
||||
msgstr "Red"
|
||||
|
||||
#. Windows typically has tooltips; Linux (at least Ubuntu) doesn't
|
||||
#: src/net/i2p/desktopgui/TrayManager.java:63
|
||||
msgid "I2P: Right-click for menu"
|
||||
msgstr "I2P Clic derecho para el menú"
|
@@ -18,7 +18,7 @@ msgstr ""
|
||||
"Project-Id-Version: I2P\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-05-25 12:29+0000\n"
|
||||
"PO-Revision-Date: 2019-10-28 16:56+0000\n"
|
||||
"PO-Revision-Date: 2019-12-03 16:10+0000\n"
|
||||
"Last-Translator: AO <ao@localizationlab.org>\n"
|
||||
"Language-Team: French (http://www.transifex.com/otf/I2P/language/fr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -35,7 +35,7 @@ msgstr "Démarrer I2P"
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "I2P is starting!"
|
||||
msgstr "I2P démarre !"
|
||||
msgstr "I2P démarre !"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
|
94
apps/desktopgui/locale/messages_ku.po
Normal file
94
apps/desktopgui/locale/messages_ku.po
Normal file
@@ -0,0 +1,94 @@
|
||||
# I2P
|
||||
# Copyright (C) 2009 The I2P Project
|
||||
# This file is distributed under the same license as the desktopgui package.
|
||||
# To contribute translations, see http://www.i2p2.de/newdevelopers
|
||||
#
|
||||
# Translators:
|
||||
# Zagros <zagros21@cmail.nu>, 2020
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-05-25 12:29+0000\n"
|
||||
"PO-Revision-Date: 2020-09-23 21:02+0000\n"
|
||||
"Last-Translator: Zagros <zagros21@cmail.nu>\n"
|
||||
"Language-Team: Kurdish (http://www.transifex.com/otf/I2P/language/ku/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ku\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:31
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:59
|
||||
msgid "Start I2P"
|
||||
msgstr "I2P بەکاربخە"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "I2P is starting!"
|
||||
msgstr "وا I2P دەستپێدەکات!"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "Starting"
|
||||
msgstr "دەستپێکردن"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:55
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:207
|
||||
msgid "Launch I2P Browser"
|
||||
msgstr "وێبگەڕی I2P بکەوە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:76
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:228
|
||||
msgid "Configure I2P System Tray"
|
||||
msgstr ""
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:77
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:229
|
||||
msgid "Disable"
|
||||
msgstr "ناچالاکبکە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:93
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:245
|
||||
msgid "Restart I2P"
|
||||
msgstr "I2P بەکاربخەوە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:110
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:262
|
||||
msgid "Stop I2P"
|
||||
msgstr "I2P بوەستێنە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:126
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:278
|
||||
msgid "Restart I2P Immediately"
|
||||
msgstr "دەستبەجێ I2P بەکاربخەوە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:143
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:295
|
||||
msgid "Stop I2P Immediately"
|
||||
msgstr "دەستبەجێ I2P بوەستێنە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:157
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:309
|
||||
msgid "Cancel I2P Shutdown"
|
||||
msgstr "کووژاندنەوە I2P هەڵبوەشێنەوە"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:363
|
||||
#, java-format
|
||||
msgid "Shutdown in {0}"
|
||||
msgstr "دەکووژێتەوە لە {0}"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:365
|
||||
msgid "Shutdown imminent"
|
||||
msgstr "دەستبەجێ کووژانەوە"
|
||||
|
||||
#. status translations are in the console bundle
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:370
|
||||
msgid "Network"
|
||||
msgstr "ڕایەڵە"
|
||||
|
||||
#. Windows typically has tooltips; Linux (at least Ubuntu) doesn't
|
||||
#: src/net/i2p/desktopgui/TrayManager.java:63
|
||||
msgid "I2P: Right-click for menu"
|
||||
msgstr "I2P: کرتەی ڕاست بکە بۆ لیستەکان"
|
94
apps/desktopgui/locale/messages_sr.po
Normal file
94
apps/desktopgui/locale/messages_sr.po
Normal file
@@ -0,0 +1,94 @@
|
||||
# I2P
|
||||
# Copyright (C) 2009 The I2P Project
|
||||
# This file is distributed under the same license as the desktopgui package.
|
||||
# To contribute translations, see http://www.i2p2.de/newdevelopers
|
||||
#
|
||||
# Translators:
|
||||
# Slobodan Simić <slsimic@gmail.com>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-05-25 12:29+0000\n"
|
||||
"PO-Revision-Date: 2019-07-11 00:36+0000\n"
|
||||
"Last-Translator: Aleksa Ristić\n"
|
||||
"Language-Team: Serbian (http://www.transifex.com/otf/I2P/language/sr/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: sr\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:31
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:59
|
||||
msgid "Start I2P"
|
||||
msgstr "Покрени И2П"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "I2P is starting!"
|
||||
msgstr "И2П се покреће!"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "Starting"
|
||||
msgstr "Покрећем"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:55
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:207
|
||||
msgid "Launch I2P Browser"
|
||||
msgstr "Покрени И2П прегледач"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:76
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:228
|
||||
msgid "Configure I2P System Tray"
|
||||
msgstr "Подеси И2П системску касету"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:77
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:229
|
||||
msgid "Disable"
|
||||
msgstr "Искључи"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:93
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:245
|
||||
msgid "Restart I2P"
|
||||
msgstr "Поново покрени И2П"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:110
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:262
|
||||
msgid "Stop I2P"
|
||||
msgstr "Заустави И2П"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:126
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:278
|
||||
msgid "Restart I2P Immediately"
|
||||
msgstr "Рестартуј И2П одмах"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:143
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:295
|
||||
msgid "Stop I2P Immediately"
|
||||
msgstr "Заустави И2П одмах"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:157
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:309
|
||||
msgid "Cancel I2P Shutdown"
|
||||
msgstr "Откажи И2П гашење"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:363
|
||||
#, java-format
|
||||
msgid "Shutdown in {0}"
|
||||
msgstr "Гашење за {0}"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:365
|
||||
msgid "Shutdown imminent"
|
||||
msgstr "Гашење неизбежно"
|
||||
|
||||
#. status translations are in the console bundle
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:370
|
||||
msgid "Network"
|
||||
msgstr "Мрежа"
|
||||
|
||||
#. Windows typically has tooltips; Linux (at least Ubuntu) doesn't
|
||||
#: src/net/i2p/desktopgui/TrayManager.java:63
|
||||
msgid "I2P: Right-click for menu"
|
||||
msgstr "И2П: десни клик за мени"
|
94
apps/desktopgui/locale/messages_tk.po
Normal file
94
apps/desktopgui/locale/messages_tk.po
Normal file
@@ -0,0 +1,94 @@
|
||||
# I2P
|
||||
# Copyright (C) 2009 The I2P Project
|
||||
# This file is distributed under the same license as the desktopgui package.
|
||||
# To contribute translations, see http://www.i2p2.de/newdevelopers
|
||||
#
|
||||
# Translators:
|
||||
# Alperen Yavuz <mingyu@yaani.com>, 2020
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-05-25 12:29+0000\n"
|
||||
"PO-Revision-Date: 2020-08-26 20:48+0000\n"
|
||||
"Last-Translator: Alperen Yavuz <mingyu@yaani.com>\n"
|
||||
"Language-Team: Turkmen (http://www.transifex.com/otf/I2P/language/tk/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: tk\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:31
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:59
|
||||
msgid "Start I2P"
|
||||
msgstr "I2P başlaň"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "I2P is starting!"
|
||||
msgstr "I2P başlaýar!"
|
||||
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:44
|
||||
#: src/net/i2p/desktopgui/ExternalTrayManager.java:72
|
||||
msgid "Starting"
|
||||
msgstr "Başlamak"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:55
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:207
|
||||
msgid "Launch I2P Browser"
|
||||
msgstr "I2P brauzerini işe giriziň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:76
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:228
|
||||
msgid "Configure I2P System Tray"
|
||||
msgstr "I2P ulgam lýubkasyny sazlaň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:77
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:229
|
||||
msgid "Disable"
|
||||
msgstr "Öçüriň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:93
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:245
|
||||
msgid "Restart I2P"
|
||||
msgstr "I2P-i täzeden açyň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:110
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:262
|
||||
msgid "Stop I2P"
|
||||
msgstr "I2P bes et"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:126
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:278
|
||||
msgid "Restart I2P Immediately"
|
||||
msgstr "I2P derrew täzeden açyň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:143
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:295
|
||||
msgid "Stop I2P Immediately"
|
||||
msgstr "Derrew I2P duruzyň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:157
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:309
|
||||
msgid "Cancel I2P Shutdown"
|
||||
msgstr "I2P ýapmagy ýatyryň"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:363
|
||||
#, java-format
|
||||
msgid "Shutdown in {0}"
|
||||
msgstr "{0} in ýapmak"
|
||||
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:365
|
||||
msgid "Shutdown imminent"
|
||||
msgstr "Öçürmek ýakyn"
|
||||
|
||||
#. status translations are in the console bundle
|
||||
#: src/net/i2p/desktopgui/InternalTrayManager.java:370
|
||||
msgid "Network"
|
||||
msgstr "Tor"
|
||||
|
||||
#. Windows typically has tooltips; Linux (at least Ubuntu) doesn't
|
||||
#: src/net/i2p/desktopgui/TrayManager.java:63
|
||||
msgid "I2P: Right-click for menu"
|
||||
msgstr "I2P: Menýu üçin sag basyň"
|
22
apps/i2pcontrol/build.gradle
Normal file
22
apps/i2pcontrol/build.gradle
Normal file
@@ -0,0 +1,22 @@
|
||||
plugins {
|
||||
id 'war'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'java'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
providedCompile project(':router')
|
||||
providedCompile project(':apps:jetty')
|
||||
providedCompile files('../../installer/lib/wrapper/all/wrapper.jar')
|
||||
}
|
||||
|
||||
war {
|
||||
archiveName 'jsonrpc.war'
|
||||
webXml = file('web.xml')
|
||||
}
|
@@ -50,7 +50,8 @@
|
||||
</target>
|
||||
|
||||
<property name="javac.compilerargs" value="" />
|
||||
<property name="javac.version" value="1.7" />
|
||||
<property name="javac.version" value="1.8" />
|
||||
<property name="javac.release" value="8" />
|
||||
|
||||
<target name="compile" depends="builddep" >
|
||||
<mkdir dir="./build" />
|
||||
@@ -58,7 +59,9 @@
|
||||
<javac
|
||||
srcdir="./java"
|
||||
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
includeAntRuntime="false"
|
||||
encoding="UTF-8"
|
||||
destdir="./build/obj"
|
||||
classpath="${cp}">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
@@ -76,7 +79,9 @@
|
||||
sourcepath=""
|
||||
srcdir="./java"
|
||||
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
includeAntRuntime="false"
|
||||
encoding="UTF-8"
|
||||
destdir="./build/obj"
|
||||
classpath="${cpSocket}">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
@@ -88,6 +93,8 @@
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile">
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.tr" value="" />
|
||||
<jar destfile="build/i2pcontrol.jar" basedir="./build/obj" includes="**/*.class" >
|
||||
<manifest>
|
||||
<attribute name="Implementation-Version" value="${full.version}" />
|
||||
@@ -102,6 +109,8 @@
|
||||
</target>
|
||||
|
||||
<target name="socketJar" depends="compileSocketJar">
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.tr" value="" />
|
||||
<jar destfile="build/i2pcontrol.jar" basedir="./build/obj" includes="**/*.class" >
|
||||
<manifest>
|
||||
<attribute name="Implementation-Version" value="${full.version}" />
|
||||
@@ -116,6 +125,8 @@
|
||||
</target>
|
||||
|
||||
<target name="war" depends="compile" >
|
||||
<!-- set if unset -->
|
||||
<property name="workspace.changes.tr" value="" />
|
||||
<war destfile="build/jsonrpc.war" webxml="web.xml" >
|
||||
<classes dir="./build/obj" excludes="net/i2p/i2pcontrol/I2PControlController.class net/i2p/i2pcontrol/HostCheckHandler.class net/i2p/i2pcontrol/SocketController*.class" />
|
||||
<manifest>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.thetransactioncompany.jsonrpc2;
|
||||
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JsonObject;
|
||||
|
||||
|
||||
/**
|
||||
@@ -220,7 +220,7 @@ public class JSONRPC2Error extends Exception {
|
||||
* @see #toJSONObject
|
||||
*/
|
||||
@Deprecated
|
||||
public JSONObject toJSON() {
|
||||
public JsonObject toJSON() {
|
||||
|
||||
return toJSONObject();
|
||||
}
|
||||
@@ -231,9 +231,9 @@ public class JSONRPC2Error extends Exception {
|
||||
*
|
||||
* @return A JSON object representing this error object.
|
||||
*/
|
||||
public JSONObject toJSONObject() {
|
||||
public JsonObject toJSONObject() {
|
||||
|
||||
JSONObject out = new JSONObject();
|
||||
JsonObject out = new JsonObject();
|
||||
|
||||
out.put("code", code);
|
||||
out.put("message", super.getMessage());
|
||||
|
@@ -5,8 +5,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONAware;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JsonObject;
|
||||
|
||||
|
||||
/**
|
||||
@@ -54,7 +53,7 @@ import org.json.simple.JSONObject;
|
||||
*
|
||||
* @author Vladimir Dzhuvinov
|
||||
*/
|
||||
public abstract class JSONRPC2Message implements JSONAware {
|
||||
public abstract class JSONRPC2Message {
|
||||
|
||||
|
||||
/**
|
||||
@@ -220,7 +219,7 @@ public abstract class JSONRPC2Message implements JSONAware {
|
||||
*
|
||||
* @return The JSON object.
|
||||
*/
|
||||
public abstract JSONObject toJSONObject();
|
||||
public abstract JsonObject toJSONObject();
|
||||
|
||||
|
||||
/**
|
||||
@@ -246,6 +245,6 @@ public abstract class JSONRPC2Message implements JSONAware {
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
return toJSONObject().toString();
|
||||
return toJSONObject().toJson();
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ package com.thetransactioncompany.jsonrpc2;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JsonObject;
|
||||
|
||||
|
||||
/**
|
||||
@@ -414,9 +414,9 @@ public class JSONRPC2Notification extends JSONRPC2Message {
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject toJSONObject() {
|
||||
public JsonObject toJSONObject() {
|
||||
|
||||
JSONObject notf = new JSONObject();
|
||||
JsonObject notf = new JsonObject();
|
||||
|
||||
notf.put("method", method);
|
||||
|
||||
|
@@ -4,9 +4,8 @@ package com.thetransactioncompany.jsonrpc2;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.parser.ContainerFactory;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
import org.json.simple.Jsoner;
|
||||
import org.json.simple.DeserializationException;
|
||||
|
||||
|
||||
/**
|
||||
@@ -56,12 +55,6 @@ import org.json.simple.parser.ParseException;
|
||||
public class JSONRPC2Parser {
|
||||
|
||||
|
||||
/**
|
||||
* Reusable JSON parser. Not thread-safe!
|
||||
*/
|
||||
private final JSONParser parser;
|
||||
|
||||
|
||||
/**
|
||||
* If {@code true} the order of the parsed JSON object members must be
|
||||
* preserved.
|
||||
@@ -153,10 +146,7 @@ public class JSONRPC2Parser {
|
||||
public JSONRPC2Parser(final boolean preserveOrder,
|
||||
final boolean ignoreVersion,
|
||||
final boolean parseNonStdAttributes) {
|
||||
|
||||
// Numbers parsed as long/double, requires JSON Smart 1.0.9+
|
||||
parser = new JSONParser();
|
||||
|
||||
|
||||
this.preserveOrder = preserveOrder;
|
||||
this.ignoreVersion = ignoreVersion;
|
||||
this.parseNonStdAttributes = parseNonStdAttributes;
|
||||
@@ -189,13 +179,9 @@ public class JSONRPC2Parser {
|
||||
|
||||
// Parse the JSON string
|
||||
try {
|
||||
//if (preserveOrder)
|
||||
// json = parser.parse(jsonString, ContainerFactory.FACTORY_ORDERED);
|
||||
|
||||
//else
|
||||
json = parser.parse(jsonString);
|
||||
json = Jsoner.deserialize(jsonString);
|
||||
|
||||
} catch (ParseException e) {
|
||||
} catch (DeserializationException e) {
|
||||
|
||||
// Terse message, do not include full parse exception message
|
||||
throw new JSONRPC2ParseException("Invalid JSON",
|
||||
|
@@ -4,7 +4,7 @@ package com.thetransactioncompany.jsonrpc2;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JsonObject;
|
||||
|
||||
|
||||
/**
|
||||
@@ -472,9 +472,9 @@ public class JSONRPC2Request extends JSONRPC2Message {
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject toJSONObject() {
|
||||
public JsonObject toJSONObject() {
|
||||
|
||||
JSONObject req = new JSONObject();
|
||||
JsonObject req = new JsonObject();
|
||||
|
||||
req.put("method", method);
|
||||
|
||||
|
@@ -3,7 +3,7 @@ package com.thetransactioncompany.jsonrpc2;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.JsonObject;
|
||||
|
||||
|
||||
/**
|
||||
@@ -384,9 +384,9 @@ public class JSONRPC2Response extends JSONRPC2Message {
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject toJSONObject() {
|
||||
public JsonObject toJSONObject() {
|
||||
|
||||
JSONObject out = new JSONObject();
|
||||
JsonObject out = new JsonObject();
|
||||
|
||||
// Result and error are mutually exclusive
|
||||
if (error != null) {
|
||||
|
@@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* This class is immutable.
|
||||
*
|
||||
* <ul>
|
||||
* <li>The client's host name.
|
||||
* <li>The client's hostname.
|
||||
* <li>The client's IP address.
|
||||
* <li>Whether the request / notification was transmitted securely (e.g.
|
||||
* via HTTPS).
|
||||
@@ -122,7 +122,7 @@ public class MessageContext {
|
||||
/**
|
||||
* Creates a new JSON-RPC 2.0 request / notification context.
|
||||
*
|
||||
* @param clientHostName The client host name, {@code null} if
|
||||
* @param clientHostName The client hostname, {@code null} if
|
||||
* unknown.
|
||||
* @param clientInetAddress The client IP address, {@code null} if
|
||||
* unknown.
|
||||
@@ -150,7 +150,7 @@ public class MessageContext {
|
||||
/**
|
||||
* Creates a new JSON-RPC 2.0 request / notification context.
|
||||
*
|
||||
* @param clientHostName The client host name, {@code null} if
|
||||
* @param clientHostName The client hostname, {@code null} if
|
||||
* unknown.
|
||||
* @param clientInetAddress The client IP address, {@code null} if
|
||||
* unknown.
|
||||
@@ -181,7 +181,7 @@ public class MessageContext {
|
||||
* Creates a new JSON-RPC 2.0 request / notification context. No
|
||||
* authenticated client principal is specified.
|
||||
*
|
||||
* @param clientHostName The client host name, {@code null} if
|
||||
* @param clientHostName The client hostname, {@code null} if
|
||||
* unknown.
|
||||
* @param clientInetAddress The client IP address, {@code null} if
|
||||
* unknown.
|
||||
@@ -202,7 +202,7 @@ public class MessageContext {
|
||||
* an insecure transport (plain HTTP) and no authenticated client
|
||||
* principal.
|
||||
*
|
||||
* @param clientHostName The client host name, {@code null} if
|
||||
* @param clientHostName The client hostname, {@code null} if
|
||||
* unknown.
|
||||
* @param clientInetAddress The client IP address, {@code null} if
|
||||
* unknown.
|
||||
@@ -219,7 +219,7 @@ public class MessageContext {
|
||||
/**
|
||||
* Creates a new JSON-RPC 2.0 request / notification context. Indicates
|
||||
* an insecure transport (plain HTTP) and no authenticated client
|
||||
* principal. Not client host name / IP is specified.
|
||||
* principal. Not client hostname / IP is specified.
|
||||
*/
|
||||
public MessageContext() {
|
||||
|
||||
@@ -315,10 +315,10 @@ public class MessageContext {
|
||||
|
||||
|
||||
/**
|
||||
* Gets the host name of the client that sent the request /
|
||||
* Gets the hostname of the client that sent the request /
|
||||
* notification.
|
||||
*
|
||||
* @return The client host name, {@code null} if unknown.
|
||||
* @return The client hostname, {@code null} if unknown.
|
||||
*/
|
||||
public String getClientHostName() {
|
||||
|
||||
|
@@ -55,7 +55,7 @@ import java.util.StringTokenizer;
|
||||
* This handles the starting and stopping of Jetty
|
||||
* from a single static class so it can be called via clients.config.
|
||||
*
|
||||
* This makes installation of a new eepsite a turnkey operation.
|
||||
* This makes installation of a new I2P Site a turnkey operation.
|
||||
*
|
||||
* Usage: I2PControlController -d $PLUGIN [start|stop]
|
||||
*
|
||||
|
@@ -37,8 +37,8 @@ import net.i2p.util.I2PSSLSocketFactory;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.util.PortMapper;
|
||||
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
import org.json.simple.Jsoner;
|
||||
import org.json.simple.DeserializationException;
|
||||
|
||||
import net.i2p.i2pcontrol.security.KeyStoreProvider;
|
||||
import net.i2p.i2pcontrol.security.SecurityManager;
|
||||
@@ -194,13 +194,12 @@ public class SocketController implements RouterApp {
|
||||
public void run() {
|
||||
try {
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(s.getInputStream(), "UTF-8"));
|
||||
final JSONParser parser = new JSONParser();
|
||||
while (true) {
|
||||
Object o = parser.parse(reader);
|
||||
Object o = Jsoner.deserialize(reader);
|
||||
// TODO
|
||||
System.out.println("i2pcontrol got: " + o);
|
||||
}
|
||||
} catch (ParseException pe) {
|
||||
} catch (DeserializationException pe) {
|
||||
_log.error("i2pcontrol handler", pe);
|
||||
return;
|
||||
} catch (IOException ioe) {
|
||||
|
@@ -186,17 +186,18 @@ public class KeyStoreProvider {
|
||||
if (_keystore == null) {
|
||||
File keyStoreFile = new File(getKeyStoreLocation());
|
||||
|
||||
InputStream is = null;
|
||||
try {
|
||||
_keystore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||
if (keyStoreFile.exists()) {
|
||||
InputStream is = new FileInputStream(keyStoreFile);
|
||||
is = new FileInputStream(keyStoreFile);
|
||||
_keystore.load(is, DEFAULT_KEYSTORE_PASSWORD.toCharArray());
|
||||
return _keystore;
|
||||
}
|
||||
|
||||
initialize();
|
||||
if (keyStoreFile.exists()) {
|
||||
InputStream is = new FileInputStream(keyStoreFile);
|
||||
is = new FileInputStream(keyStoreFile);
|
||||
_keystore.load(is, DEFAULT_KEYSTORE_PASSWORD.toCharArray());
|
||||
return _keystore;
|
||||
} else {
|
||||
@@ -204,6 +205,8 @@ public class KeyStoreProvider {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// Ignore. Not an issue. Let's just create a new keystore instead.
|
||||
} finally {
|
||||
if (is != null) try { is.close(); } catch (IOException ioe) {}
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
|
@@ -145,8 +145,9 @@ public class JSONRPC2Servlet extends HttpServlet {
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
|
||||
httpServletResponse.setContentType("text/html");
|
||||
setHeaders(httpServletResponse);
|
||||
PrintWriter out = httpServletResponse.getWriter();
|
||||
out.println("<html><head></head><body>");
|
||||
out.println("<p>I2PControl RPC Service version " + I2PControlVersion.VERSION + " : Running");
|
||||
if ("/password".equals(httpServletRequest.getServletPath())) {
|
||||
out.println("<form method=\"POST\" action=\"password\">");
|
||||
@@ -160,16 +161,19 @@ public class JSONRPC2Servlet extends HttpServlet {
|
||||
"<input name=\"save\" type=\"submit\" value=\"Change API Password\">" +
|
||||
"<p>If you forget the API password, stop i2pcontrol, delete the file <tt>" + _conf.getConfFile() +
|
||||
"</tt>, and restart i2pcontrol.");
|
||||
out.println("</form>");
|
||||
} else {
|
||||
out.println("<p><a href=\"password\">Change API Password</a>");
|
||||
}
|
||||
out.println("</body></html>");
|
||||
out.close();
|
||||
}
|
||||
|
||||
/** @since 0.12 */
|
||||
private void doPasswordChange(HttpServletRequest req, HttpServletResponse httpServletResponse) throws ServletException, IOException {
|
||||
httpServletResponse.setContentType("text/html");
|
||||
setHeaders(httpServletResponse);
|
||||
PrintWriter out = httpServletResponse.getWriter();
|
||||
out.println("<html><head></head><body>");
|
||||
String pw = req.getParameter("password");
|
||||
if (pw == null)
|
||||
pw = _secMan.DEFAULT_AUTH_PASSWORD;
|
||||
@@ -194,6 +198,21 @@ public class JSONRPC2Servlet extends HttpServlet {
|
||||
}
|
||||
}
|
||||
out.println("<p><a href=\"password\">Change API Password</a>");
|
||||
out.println("</body></html>");
|
||||
out.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.48
|
||||
*/
|
||||
private static void setHeaders(HttpServletResponse resp) {
|
||||
resp.setContentType("text/html");
|
||||
resp.setHeader("X-Frame-Options", "SAMEORIGIN");
|
||||
resp.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self'; script-src 'self'; form-action 'self'; frame-ancestors 'self'; object-src 'none'; media-src 'none'");
|
||||
resp.setHeader("X-XSS-Protection", "1; mode=block");
|
||||
resp.setHeader("X-Content-Type-Options", "nosniff");
|
||||
resp.setHeader("Pragma", "no-cache");
|
||||
resp.setHeader("Cache-Control","no-cache");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -86,7 +86,7 @@ public class AuthenticateHandler implements RequestHandler {
|
||||
|
||||
Integer apiVersion;
|
||||
try {
|
||||
apiVersion = ((Long) api).intValue();
|
||||
apiVersion = ((Number) api).intValue();
|
||||
} catch (ClassCastException e) {
|
||||
e.printStackTrace();
|
||||
return JSONRPC2ExtendedError.UNSPECIFIED_API_VERSION;
|
||||
|
@@ -56,12 +56,10 @@ public class GetRateHandler implements RequestHandler {
|
||||
if (input == null) {
|
||||
return new JSONRPC2Response(JSONRPC2Error.INVALID_PARAMS, req.getID());
|
||||
}
|
||||
long period;
|
||||
try {
|
||||
period = (Long) inParams.get("Period");
|
||||
} catch (NumberFormatException e) {
|
||||
Number p = (Number) inParams.get("Period");
|
||||
if (p == null)
|
||||
return new JSONRPC2Response(JSONRPC2Error.INVALID_PARAMS, req.getID());
|
||||
}
|
||||
long period = p.longValue();
|
||||
|
||||
RateStat rateStat = I2PAppContext.getGlobalContext().statManager().getRate(input);
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package net.i2p.i2pcontrol.servlets.jsonrpc2handlers;
|
||||
|
||||
import com.thetransactioncompany.jsonrpc2.JSONRPC2Error;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
/*
|
||||
* Copyright 2011 hottuna (dev@robertfoss.se)
|
||||
|
@@ -6,13 +6,14 @@ sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir 'java/src'
|
||||
srcDir 'java/build/messages-src'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
compile project(':apps:systray')
|
||||
providedCompile project(':apps:systray')
|
||||
compile 'gnu.getopt:java-getopt:1.0.13'
|
||||
providedCompile project(':apps:ministreaming')
|
||||
providedCompile project(':apps:jetty')
|
||||
@@ -34,10 +35,26 @@ artifacts {
|
||||
archives i2psnarkJar
|
||||
}
|
||||
|
||||
war {
|
||||
into '.icons', {
|
||||
from 'icons'
|
||||
// Create the java files from the po files. The jar task will compile them.
|
||||
// This requires gettext 0.19 or higher.
|
||||
// We don't support the "slow way"
|
||||
task bundle {
|
||||
doLast {
|
||||
if (!(new File("$buildDir/classes/java/main/org/klomp/snark/web/messages_de.class")).exists())
|
||||
println "apps/i2psnark/java/bundle-messages.sh".execute().text
|
||||
}
|
||||
}
|
||||
war.dependsOn bundle
|
||||
|
||||
war {
|
||||
rootSpec.exclude('/org/klomp/snark/*.class')
|
||||
rootSpec.exclude('/org/klomp/snark/bencode/**')
|
||||
rootSpec.exclude('/org/klomp/snark/comments/**')
|
||||
rootSpec.exclude('/org/klomp/snark/dht/**')
|
||||
rootSpec.exclude('/org/klomp/snark/standalone/**')
|
||||
from ('resources', {
|
||||
into ".resources"
|
||||
})
|
||||
webInf {
|
||||
into 'classes/org/klomp/snark/web'
|
||||
from 'mime.properties'
|
||||
|
@@ -27,7 +27,8 @@
|
||||
|
||||
<!-- only used if not set by a higher build.xml -->
|
||||
<property name="javac.compilerargs" value="" />
|
||||
<property name="javac.version" value="1.7" />
|
||||
<property name="javac.version" value="1.8" />
|
||||
<property name="javac.release" value="8" />
|
||||
<property name="require.gettext" value="true" />
|
||||
<property name="manifest.classpath.name" value="Class-Path" />
|
||||
|
||||
@@ -41,7 +42,9 @@
|
||||
<javac
|
||||
srcdir="./src"
|
||||
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
destdir="./build/obj"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false" >
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
<classpath>
|
||||
@@ -163,7 +166,9 @@
|
||||
<arg value="./bundle-messages.sh" />
|
||||
</exec>
|
||||
<javac source="${javac.version}" target="${javac.version}"
|
||||
release="${javac.release}"
|
||||
includeAntRuntime="false"
|
||||
encoding="UTF-8"
|
||||
srcdir="build/messages-src" destdir="build/obj">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
</javac>
|
||||
@@ -245,53 +250,51 @@
|
||||
|
||||
<!-- add css, image, and js files for standalone snark to the war -->
|
||||
<target name="standalone_war" depends="war">
|
||||
<mkdir dir="build/standalone-resources/.resources/themes/snark" />
|
||||
<copy todir="build/standalone-resources/.resources/themes/snark" >
|
||||
<fileset dir="../../../installer/resources/themes/snark/" />
|
||||
<mkdir dir="build/standalone-resources/.resources/themes/" />
|
||||
<copy todir="build/standalone-resources/.resources/themes/" >
|
||||
<fileset dir="../resources/themes/" />
|
||||
</copy>
|
||||
|
||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||
<replace dir="build/standalone-resources/.resources/themes"
|
||||
summary="true"
|
||||
token="url(/themes/console/dark/images/"
|
||||
value="url(/i2psnark/.resources/themes/snark/dark/images/" >
|
||||
value="url(/i2psnark/.resources/themes/dark/images/" >
|
||||
<include name="**/*.css" />
|
||||
</replace>
|
||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||
<replace dir="build/standalone-resources/.resources/themes"
|
||||
summary="true"
|
||||
token="url(../../console/light/images/"
|
||||
value="url(/i2psnark/.resources/themes/snark/light/images/" >
|
||||
value="url(/i2psnark/.resources/themes/light/images/" >
|
||||
<include name="**/*.css" />
|
||||
</replace>
|
||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||
<replace dir="build/standalone-resources/.resources/themes"
|
||||
summary="true"
|
||||
token="url(/themes/console/light/images/"
|
||||
value="url(/i2psnark/.resources/themes/snark/light/images/" >
|
||||
value="url(/i2psnark/.resources/themes/light/images/" >
|
||||
<include name="**/*.css" />
|
||||
</replace>
|
||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||
<replace dir="build/standalone-resources/.resources/themes"
|
||||
summary="true"
|
||||
token="url(/themes/console/images/transparent.gif"
|
||||
value="url(/i2psnark/.resources/themes/snark/ubergine/images/transparent.gif" >
|
||||
value="url(/i2psnark/.resources/themes/ubergine/images/transparent.gif" >
|
||||
<include name="**/*.css" />
|
||||
</replace>
|
||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||
<replace dir="build/standalone-resources/.resources/themes"
|
||||
summary="true"
|
||||
token="url(/themes/console/images/info/"
|
||||
value="url(/i2psnark/.resources/themes/snark/ubergine/images/" >
|
||||
value="url(/i2psnark/.resources/themes/ubergine/images/" >
|
||||
<include name="**/*.css" />
|
||||
</replace>
|
||||
|
||||
<!-- Rather than pulling in all the console theme images, let's just specify the ones we need -->
|
||||
<copy file="../../../installer/resources/themes/console/images/transparent.gif"
|
||||
todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
|
||||
<copy file="../../../installer/resources/themes/console/dark/images/header.png"
|
||||
todir="build/standalone-resources/.resources/themes/snark/dark/images" />
|
||||
<copy file="../../../installer/resources/themes/console/light/images/header.png"
|
||||
todir="build/standalone-resources/.resources/themes/snark/light/images" />
|
||||
<copy file="../../../installer/resources/themes/console/dark/images/camotile2.png"
|
||||
todir="build/standalone-resources/.resources/themes/snark/dark/images" />
|
||||
<copy file="../../../installer/resources/themes/console/images/info/errortriangle.png"
|
||||
todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
|
||||
<copy file="../../routerconsole/jsp/themes/console/images/transparent.gif"
|
||||
todir="build/standalone-resources/.resources/themes/ubergine/images" />
|
||||
<copy file="../../routerconsole/jsp/themes/console/dark/images/header.png"
|
||||
todir="build/standalone-resources/.resources/themes/dark/images" />
|
||||
<copy file="../../routerconsole/jsp/themes/console/light/images/header.png"
|
||||
todir="build/standalone-resources/.resources/themes/light/images" />
|
||||
<copy file="../../routerconsole/jsp/themes/console/images/info/errortriangle.png"
|
||||
todir="build/standalone-resources/.resources/themes/ubergine/images" />
|
||||
|
||||
<mkdir dir="build/standalone-resources/.resources/js" />
|
||||
<copy file="../../routerconsole/jsp/js/ajax.js" todir="build/standalone-resources/.resources/js" />
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#
|
||||
# zzz - public domain
|
||||
#
|
||||
cd `dirname $0`
|
||||
CLASS=org.klomp.snark.web.messages
|
||||
TMPFILE=build/javafiles.txt
|
||||
export TZ=UTC
|
||||
@@ -101,7 +102,7 @@ do
|
||||
then
|
||||
# slow way
|
||||
# convert to class files in build/obj
|
||||
msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i
|
||||
msgfmt --java2 --statistics -r $CLASS -l $LG -d build/obj $i
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "ERROR - msgfmt failed on ${i}, not updating translations"
|
||||
@@ -119,7 +120,7 @@ do
|
||||
TDY=$TD2/org/klomp/snark/web
|
||||
rm -rf $TD
|
||||
mkdir -p $TD $TDY
|
||||
msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i
|
||||
msgfmt --java2 --statistics --source -r $CLASS -l $LG -d $TD $i
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "ERROR - msgfmt failed on ${i}, not updating translations"
|
||||
|
@@ -43,12 +43,12 @@ interface CoordinatorListener
|
||||
public boolean overUploadLimit(int uploaders);
|
||||
|
||||
/**
|
||||
* Are we currently over the upstream bandwidth limit?
|
||||
* Is i2psnark as a whole over its limit?
|
||||
*/
|
||||
public boolean overUpBWLimit();
|
||||
|
||||
/**
|
||||
* Is the total (in Bps) over the upstream bandwidth limit?
|
||||
* Is a particular peer who has this recent download rate (in Bps) over our upstream bandwidth limit?
|
||||
*/
|
||||
public boolean overUpBWLimit(long total);
|
||||
|
||||
|
@@ -68,7 +68,7 @@ abstract class ExtensionHandler {
|
||||
handshake.put("m", m);
|
||||
handshake.put("p", Integer.valueOf(TrackerClient.PORT));
|
||||
handshake.put("v", "I2PSnark");
|
||||
handshake.put("reqq", Integer.valueOf(5));
|
||||
handshake.put("reqq", Integer.valueOf(PeerState.MAX_PIPELINE));
|
||||
// BEP 21
|
||||
if (uploadOnly)
|
||||
handshake.put("upload_only", Integer.valueOf(1));
|
||||
|
@@ -5,8 +5,10 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -57,7 +59,6 @@ public class I2PSnarkUtil {
|
||||
private int _i2cpPort;
|
||||
private final Map<String, String> _opts;
|
||||
private volatile I2PSocketManager _manager;
|
||||
private boolean _configured;
|
||||
private volatile boolean _connecting;
|
||||
private final Set<Hash> _banlist;
|
||||
private int _maxUploaders;
|
||||
@@ -84,6 +85,10 @@ public class I2PSnarkUtil {
|
||||
public static final String PROP_MAX_BW = "i2cp.outboundBytesPerSecond";
|
||||
public static final boolean DEFAULT_USE_DHT = true;
|
||||
public static final String EEPGET_USER_AGENT = "I2PSnark";
|
||||
private static final List<String> HIDDEN_I2CP_OPTS = Arrays.asList(new String[] {
|
||||
PROP_MAX_BW, "inbound.length", "outbound.length", "inbound.quantity", "outbound.quantity"
|
||||
});
|
||||
|
||||
|
||||
public I2PSnarkUtil(I2PAppContext ctx) {
|
||||
this(ctx, "i2psnark");
|
||||
@@ -142,25 +147,34 @@ public class I2PSnarkUtil {
|
||||
/** @since 0.9.1 */
|
||||
public I2PAppContext getContext() { return _context; }
|
||||
|
||||
public boolean configured() { return _configured; }
|
||||
|
||||
/**
|
||||
* @param i2cpHost may be null for no change
|
||||
* @param i2cpPort may be 0 for no change
|
||||
* @param opts may be null for no change
|
||||
*/
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void setI2CPConfig(String i2cpHost, int i2cpPort, Map opts) {
|
||||
if (i2cpHost != null)
|
||||
_i2cpHost = i2cpHost;
|
||||
if (i2cpPort > 0)
|
||||
_i2cpPort = i2cpPort;
|
||||
// can't remove any options this way...
|
||||
if (opts != null)
|
||||
_opts.putAll(opts);
|
||||
if (opts != null) {
|
||||
synchronized(_opts) {
|
||||
// removed options...
|
||||
for (Iterator<String> iter = _opts.keySet().iterator(); iter.hasNext(); ) {
|
||||
String k = iter.next();
|
||||
if (!HIDDEN_I2CP_OPTS.contains(k) && !opts.containsKey(k))
|
||||
iter.remove();
|
||||
}
|
||||
_opts.putAll(opts);
|
||||
}
|
||||
}
|
||||
// this updates the session options and tells the router
|
||||
setMaxUpBW(_maxUpBW);
|
||||
_configured = true;
|
||||
}
|
||||
|
||||
public void setMaxUploaders(int limit) {
|
||||
_maxUploaders = limit;
|
||||
_configured = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,13 +183,16 @@ public class I2PSnarkUtil {
|
||||
*/
|
||||
public void setMaxUpBW(int limit) {
|
||||
_maxUpBW = limit;
|
||||
_opts.put(PROP_MAX_BW, Integer.toString(limit * (1024 * 6 / 5))); // add a little for overhead
|
||||
_configured = true;
|
||||
synchronized(_opts) {
|
||||
_opts.put(PROP_MAX_BW, Integer.toString(limit * (1024 * 6 / 5))); // add a little for overhead
|
||||
}
|
||||
if (_manager != null) {
|
||||
I2PSession sess = _manager.getSession();
|
||||
if (sess != null) {
|
||||
Properties newProps = new Properties();
|
||||
newProps.putAll(_opts);
|
||||
synchronized(_opts) {
|
||||
newProps.putAll(_opts);
|
||||
}
|
||||
sess.updateOptions(newProps);
|
||||
}
|
||||
}
|
||||
@@ -183,17 +200,24 @@ public class I2PSnarkUtil {
|
||||
|
||||
public void setMaxConnections(int limit) {
|
||||
_maxConnections = limit;
|
||||
_configured = true;
|
||||
}
|
||||
|
||||
public void setStartupDelay(int minutes) {
|
||||
_startupDelay = minutes;
|
||||
_configured = true;
|
||||
}
|
||||
|
||||
public String getI2CPHost() { return _i2cpHost; }
|
||||
public int getI2CPPort() { return _i2cpPort; }
|
||||
public Map<String, String> getI2CPOptions() { return _opts; }
|
||||
|
||||
/**
|
||||
* @return a copy
|
||||
*/
|
||||
public Map<String, String> getI2CPOptions() {
|
||||
synchronized(_opts) {
|
||||
return new HashMap<String, String>(_opts);
|
||||
}
|
||||
}
|
||||
|
||||
public String getEepProxyHost() { return _proxyHost; }
|
||||
public int getEepProxyPort() { return _proxyPort; }
|
||||
public boolean getEepProxySet() { return _shouldProxy; }
|
||||
@@ -225,9 +249,8 @@ public class I2PSnarkUtil {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Connecting to I2P", new Exception("I did it"));
|
||||
Properties opts = _context.getProperties();
|
||||
if (_opts != null) {
|
||||
for (Map.Entry<String, String> entry : _opts.entrySet() )
|
||||
opts.setProperty(entry.getKey(), entry.getValue());
|
||||
synchronized(_opts) {
|
||||
opts.putAll(_opts);
|
||||
}
|
||||
// override preference and start with two tunnels. IdleChecker will ramp up/down as necessary
|
||||
String sin = opts.getProperty("inbound.quantity");
|
||||
@@ -295,6 +318,11 @@ public class I2PSnarkUtil {
|
||||
opts.setProperty("i2p.streaming.answerPings", "false");
|
||||
if (opts.getProperty(I2PClient.PROP_SIGTYPE) == null)
|
||||
opts.setProperty(I2PClient.PROP_SIGTYPE, "EdDSA_SHA512_Ed25519");
|
||||
if (opts.getProperty("i2cp.leaseSetEncType") == null)
|
||||
opts.setProperty("i2cp.leaseSetEncType", "4,0");
|
||||
// assume compressed content
|
||||
if (opts.getProperty(I2PClient.PROP_GZIP) == null)
|
||||
opts.setProperty(I2PClient.PROP_GZIP, "false");
|
||||
_manager = I2PSocketManagerFactory.createManager(_i2cpHost, _i2cpPort, opts);
|
||||
if (_manager != null)
|
||||
_startedTime = _context.clock().now();
|
||||
|
@@ -49,7 +49,7 @@ class MagnetState {
|
||||
infohash = iHash;
|
||||
if (meta != null) {
|
||||
metainfo = meta;
|
||||
initialize(meta.getInfoBytes().length);
|
||||
initialize(meta.getInfoBytesLength());
|
||||
complete = true;
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,13 @@ public class MagnetURI {
|
||||
public static final String MAGNET_FULL = MAGNET + "?xt=urn:btih:";
|
||||
/** http://sponge.i2p/files/maggotspec.txt */
|
||||
public static final String MAGGOT = "maggot://";
|
||||
/**
|
||||
* https://blog.libtorrent.org/2020/09/bittorrent-v2/
|
||||
* TODO, dup param parsing, as a dual v1/v2 link
|
||||
* will contain two xt params
|
||||
* @since 0.9.48
|
||||
*/
|
||||
public static final String MAGNET_FULL_V2 = MAGNET + "?xt=urn:btmh:";
|
||||
|
||||
/**
|
||||
* @param url non-null
|
||||
@@ -35,6 +42,7 @@ public class MagnetURI {
|
||||
if (url.startsWith(MAGNET)) {
|
||||
// magnet:?xt=urn:btih:0691e40aae02e552cfcb57af1dca56214680c0c5&tr=http://tracker2.postman.i2p/announce.php
|
||||
String xt = getParam("xt", url);
|
||||
// TODO btmh
|
||||
if (xt == null || !xt.startsWith("urn:btih:"))
|
||||
throw new IllegalArgumentException();
|
||||
ihash = xt.substring("urn:btih:".length());
|
||||
|
@@ -49,6 +49,9 @@ class Message
|
||||
final static byte REJECT = 16; // Fast (BEP 6)
|
||||
final static byte ALLOWED_FAST = 17; // Fast (BEP 6)
|
||||
final static byte EXTENSION = 20; // BEP 10
|
||||
final static byte HASH_REQUEST = 21; // BEP 52
|
||||
final static byte HASHES = 22; // BEP 52
|
||||
final static byte HASH_REJECT = 23; // BEP 52
|
||||
|
||||
// Not all fields are used for every message.
|
||||
// KEEP_ALIVE doesn't have a real wire representation
|
||||
@@ -278,6 +281,13 @@ class Message
|
||||
return "REJECT(" + piece + ',' + begin + ',' + length + ')';
|
||||
case ALLOWED_FAST:
|
||||
return "ALLOWED_FAST(" + piece + ')';
|
||||
// BEP 52 below here
|
||||
case HASH_REQUEST:
|
||||
return "HASH_REQUEST";
|
||||
case HASHES:
|
||||
return "HASHES";
|
||||
case HASH_REJECT:
|
||||
return "HASH_REJECT";
|
||||
default:
|
||||
return "UNKNOWN (" + type + ')';
|
||||
}
|
||||
|
@@ -31,6 +31,8 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import gnu.getopt.Getopt;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.crypto.SHA1;
|
||||
import net.i2p.data.DataHelper;
|
||||
@@ -56,6 +58,7 @@ public class MetaInfo
|
||||
private final String name_utf8;
|
||||
private final List<List<String>> files;
|
||||
private final List<List<String>> files_utf8;
|
||||
private final List<String> attributes;
|
||||
private final List<Long> lengths;
|
||||
private final int piece_length;
|
||||
private final byte[] piece_hashes;
|
||||
@@ -65,7 +68,9 @@ public class MetaInfo
|
||||
private final String comment;
|
||||
private final String created_by;
|
||||
private final long creation_date;
|
||||
private final List<String> url_list;
|
||||
private Map<String, BEValue> infoMap;
|
||||
private int infoBytesLength;
|
||||
|
||||
/**
|
||||
* Called by Storage when creating a new torrent from local data
|
||||
@@ -75,10 +80,12 @@ public class MetaInfo
|
||||
* @param lengths null for single-file torrent
|
||||
* @param announce_list may be null
|
||||
* @param created_by may be null
|
||||
* @param url_list may be null
|
||||
* @param comment may be null
|
||||
*/
|
||||
MetaInfo(String announce, String name, String name_utf8, List<List<String>> files, List<Long> lengths,
|
||||
int piece_length, byte[] piece_hashes, long length, boolean privateTorrent,
|
||||
List<List<String>> announce_list, String created_by)
|
||||
List<List<String>> announce_list, String created_by, List<String> url_list, String comment)
|
||||
{
|
||||
this.announce = announce;
|
||||
this.name = name;
|
||||
@@ -91,9 +98,13 @@ public class MetaInfo
|
||||
this.length = length;
|
||||
this.privateTorrent = privateTorrent;
|
||||
this.announce_list = announce_list;
|
||||
this.comment = null;
|
||||
this.comment = comment;
|
||||
this.created_by = created_by;
|
||||
this.creation_date = I2PAppContext.getGlobalContext().clock().now();
|
||||
this.url_list = url_list;
|
||||
|
||||
// TODO BEP 52 hybrid torrent with piece layers, meta version and file tree
|
||||
this.attributes = null;
|
||||
|
||||
// TODO if we add a parameter for other keys
|
||||
//if (other != null) {
|
||||
@@ -169,6 +180,18 @@ public class MetaInfo
|
||||
}
|
||||
}
|
||||
|
||||
// BEP 19
|
||||
val = m.get("url-list");
|
||||
if (val == null) {
|
||||
this.url_list = null;
|
||||
} else {
|
||||
List<BEValue> bl1 = val.getList();
|
||||
this.url_list = new ArrayList<String>(bl1.size());
|
||||
for (BEValue bev : bl1) {
|
||||
this.url_list.add(bev.getString());
|
||||
}
|
||||
}
|
||||
|
||||
// misc. optional top-level stuff
|
||||
val = m.get("comment");
|
||||
String st = null;
|
||||
@@ -236,8 +259,18 @@ public class MetaInfo
|
||||
piece_length = val.getInt();
|
||||
|
||||
val = info.get("pieces");
|
||||
if (val == null)
|
||||
if (val == null) {
|
||||
// BEP 52
|
||||
// We do the check here because a torrent file could be combined v1/v2,
|
||||
// so a version 2 value isn't by itself fatal
|
||||
val = info.get("meta version");
|
||||
if (val != null) {
|
||||
int version = val.getInt();
|
||||
if (version != 1)
|
||||
throw new InvalidBEncodingException("Version " + version + " torrent file not supported");
|
||||
}
|
||||
throw new InvalidBEncodingException("Missing piece bytes");
|
||||
}
|
||||
piece_hashes = val.getBytes();
|
||||
|
||||
val = info.get("length");
|
||||
@@ -248,6 +281,7 @@ public class MetaInfo
|
||||
files = null;
|
||||
files_utf8 = null;
|
||||
lengths = null;
|
||||
attributes = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -263,8 +297,9 @@ public class MetaInfo
|
||||
throw new InvalidBEncodingException("zero size files list");
|
||||
|
||||
List<List<String>> m_files = new ArrayList<List<String>>(size);
|
||||
List<List<String>> m_files_utf8 = new ArrayList<List<String>>(size);
|
||||
List<List<String>> m_files_utf8 = null;
|
||||
List<Long> m_lengths = new ArrayList<Long>(size);
|
||||
List<String> m_attributes = null;
|
||||
long l = 0;
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
{
|
||||
@@ -310,6 +345,7 @@ public class MetaInfo
|
||||
|
||||
val = desc.get("path.utf-8");
|
||||
if (val != null) {
|
||||
m_files_utf8 = new ArrayList<List<String>>(size);
|
||||
path_list = val.getList();
|
||||
path_length = path_list.size();
|
||||
if (path_length > 0) {
|
||||
@@ -320,11 +356,28 @@ public class MetaInfo
|
||||
m_files_utf8.add(Collections.unmodifiableList(file));
|
||||
}
|
||||
}
|
||||
|
||||
// BEP 47
|
||||
val = desc.get("attr");
|
||||
if (val != null) {
|
||||
String s = val.getString();
|
||||
if (m_attributes == null) {
|
||||
m_attributes = new ArrayList<String>(size);
|
||||
for (int j = 0; j < i; j++) {
|
||||
m_attributes.add("");
|
||||
}
|
||||
m_attributes.add(s);
|
||||
}
|
||||
} else {
|
||||
if (m_attributes != null)
|
||||
m_attributes.add("");
|
||||
}
|
||||
}
|
||||
files = Collections.unmodifiableList(m_files);
|
||||
files_utf8 = Collections.unmodifiableList(m_files_utf8);
|
||||
files_utf8 = m_files_utf8 != null ? Collections.unmodifiableList(m_files_utf8) : null;
|
||||
lengths = Collections.unmodifiableList(m_lengths);
|
||||
length = l;
|
||||
attributes = m_attributes;
|
||||
}
|
||||
|
||||
info_hash = calculateInfoHash();
|
||||
@@ -370,6 +423,15 @@ public class MetaInfo
|
||||
return announce_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of urls or null.
|
||||
*
|
||||
* @since 0.9.48
|
||||
*/
|
||||
public List<String> getWebSeedURLs() {
|
||||
return url_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the original 20 byte SHA1 hash over the bencoded info map.
|
||||
*/
|
||||
@@ -415,6 +477,16 @@ public class MetaInfo
|
||||
return files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this file a padding file?
|
||||
* @since 0.9.48
|
||||
*/
|
||||
public boolean isPaddingFile(int filenum) {
|
||||
if (attributes == null)
|
||||
return false;
|
||||
return attributes.get(filenum).indexOf('p') >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of Longs indication the size of the individual
|
||||
* files, or null if it is a single file. It has the same size as
|
||||
@@ -550,6 +622,7 @@ public class MetaInfo
|
||||
|
||||
/**
|
||||
* Returns the total length of the torrent in bytes.
|
||||
* This includes any padding files.
|
||||
*/
|
||||
public long getTotalLength()
|
||||
{
|
||||
@@ -597,6 +670,8 @@ public class MetaInfo
|
||||
if (announce_list != null)
|
||||
m.put("announce-list", announce_list);
|
||||
// misc. optional top-level stuff
|
||||
if (url_list != null)
|
||||
m.put("url-list", url_list);
|
||||
if (comment != null)
|
||||
m.put("comment", comment);
|
||||
if (created_by != null)
|
||||
@@ -610,11 +685,27 @@ public class MetaInfo
|
||||
return BEncoder.bencode(m);
|
||||
}
|
||||
|
||||
/** @since 0.8.4 */
|
||||
/**
|
||||
* Side effect: Caches infoBytesLength.
|
||||
* @since 0.8.4
|
||||
*/
|
||||
public synchronized byte[] getInfoBytes() {
|
||||
if (infoMap == null)
|
||||
createInfoMap();
|
||||
return BEncoder.bencode(infoMap);
|
||||
byte[] rv = BEncoder.bencode(infoMap);
|
||||
infoBytesLength = rv.length;
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
* The size of getInfoBytes().
|
||||
* Cached.
|
||||
* @since 0.9.48
|
||||
*/
|
||||
public synchronized int getInfoBytesLength() {
|
||||
if (infoBytesLength > 0)
|
||||
return infoBytesLength;
|
||||
return getInfoBytes().length;
|
||||
}
|
||||
|
||||
/** @return an unmodifiable view of the Map */
|
||||
@@ -663,11 +754,19 @@ public class MetaInfo
|
||||
file.put("path.utf-8", new BEValue(beufiles));
|
||||
}
|
||||
file.put("length", new BEValue(lengths.get(i)));
|
||||
String attr = null;
|
||||
if (attributes != null) {
|
||||
attr = attributes.get(i);
|
||||
if (attr.length() > 0)
|
||||
file.put("attr", new BEValue(DataHelper.getASCII(attr)));
|
||||
}
|
||||
l.add(new BEValue(file));
|
||||
}
|
||||
info.put("files", new BEValue(l));
|
||||
}
|
||||
|
||||
// TODO BEP 52 meta version and file tree
|
||||
|
||||
// TODO if we add the ability for other keys in the first constructor
|
||||
//if (otherInfo != null)
|
||||
// info.putAll(otherInfo);
|
||||
@@ -701,20 +800,92 @@ public class MetaInfo
|
||||
|
||||
/** @since 0.8.5 */
|
||||
public static void main(String[] args) {
|
||||
if (args.length <= 0) {
|
||||
System.err.println("Usage: MetaInfo files...");
|
||||
return;
|
||||
boolean error = false;
|
||||
String created_by = null;
|
||||
String announce = null;
|
||||
List<String> url_list = null;
|
||||
String comment = null;
|
||||
Getopt g = new Getopt("Storage", args, "a:c:m:w:");
|
||||
try {
|
||||
int c;
|
||||
while ((c = g.getopt()) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
announce = g.getOptarg();
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
created_by = g.getOptarg();
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
comment = g.getOptarg();
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
if (url_list == null)
|
||||
url_list = new ArrayList<String>();
|
||||
url_list.add(g.getOptarg());
|
||||
break;
|
||||
|
||||
case '?':
|
||||
case ':':
|
||||
default:
|
||||
error = true;
|
||||
break;
|
||||
} // switch
|
||||
} // while
|
||||
} catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
error = true;
|
||||
}
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (error || args.length - g.getOptind() <= 0) {
|
||||
System.err.println("Usage: MetaInfo [-a announceURL] [-c created-by] [-m comment] [-w webseed-url]* file.torrent [file2.torrent...]");
|
||||
System.exit(1);
|
||||
}
|
||||
for (int i = g.getOptind(); i < args.length; i++) {
|
||||
InputStream in = null;
|
||||
java.io.OutputStream out = null;
|
||||
try {
|
||||
in = new FileInputStream(args[i]);
|
||||
MetaInfo meta = new MetaInfo(in);
|
||||
System.out.println(args[i] + " InfoHash: " + I2PSnarkUtil.toHex(meta.getInfoHash()));
|
||||
System.out.println(args[i] +
|
||||
"\nInfoHash: " + I2PSnarkUtil.toHex(meta.getInfoHash()) +
|
||||
"\nAnnounce: " + meta.getAnnounce() +
|
||||
"\nWebSeed URLs: " + meta.getWebSeedURLs() +
|
||||
"\nCreated By: " + meta.getCreatedBy() +
|
||||
"\nComment: " + meta.getComment());
|
||||
if (created_by != null || announce != null || url_list != null || comment != null) {
|
||||
String cb = created_by != null ? created_by : meta.getCreatedBy();
|
||||
String an = announce != null ? announce : meta.getAnnounce();
|
||||
String cm = comment != null ? comment : meta.getComment();
|
||||
List<String> urls = url_list != null ? url_list : meta.getWebSeedURLs();
|
||||
// changes/adds creation date
|
||||
MetaInfo meta2 = new MetaInfo(an, meta.getName(), null, meta.getFiles(), meta.getLengths(),
|
||||
meta.getPieceLength(0), meta.getPieceHashes(), meta.getTotalLength(), meta.isPrivate(),
|
||||
meta.getAnnounceList(), cb, urls, cm);
|
||||
java.io.File from = new java.io.File(args[i]);
|
||||
java.io.File to = new java.io.File(args[i] + ".bak");
|
||||
if (net.i2p.util.FileUtil.copy(from, to, true, false)) {
|
||||
out = new java.io.FileOutputStream(from);
|
||||
out.write(meta2.getTorrentData());
|
||||
out.close();
|
||||
System.out.println("Modified " + from + " and backed up old file to " + to);
|
||||
System.out.println(args[i] +
|
||||
"\nInfoHash: " + I2PSnarkUtil.toHex(meta2.getInfoHash()) +
|
||||
"\nAnnounce: " + meta2.getAnnounce() +
|
||||
"\nWebSeed URLs: " + meta2.getWebSeedURLs() +
|
||||
"\nCreated By: " + meta2.getCreatedBy() +
|
||||
"\nComment: " + meta2.getComment());
|
||||
} else {
|
||||
System.out.println("Failed backup of " + from + " to " + to);
|
||||
}
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
System.err.println("Error in file " + args[i] + ": " + ioe);
|
||||
} finally {
|
||||
try { if (in != null) in.close(); } catch (IOException ioe) {}
|
||||
try { if (out != null) out.close(); } catch (IOException ioe) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -38,17 +38,18 @@ import net.i2p.data.Destination;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
import org.klomp.snark.bencode.BEValue;
|
||||
import org.klomp.snark.bencode.InvalidBEncodingException;
|
||||
|
||||
public class Peer implements Comparable<Peer>
|
||||
{
|
||||
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(Peer.class);
|
||||
protected final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(getClass());
|
||||
// Identifying property, the peer id of the other side.
|
||||
private final PeerID peerID;
|
||||
|
||||
private final byte[] my_id;
|
||||
private final byte[] infohash;
|
||||
/** will start out null in magnet mode */
|
||||
private MetaInfo metainfo;
|
||||
protected MetaInfo metainfo;
|
||||
private Map<String, BEValue> handshakeMap;
|
||||
|
||||
// The data in/output streams set during the handshake and used by
|
||||
@@ -60,8 +61,11 @@ public class Peer implements Comparable<Peer>
|
||||
private final AtomicLong downloaded = new AtomicLong();
|
||||
private final AtomicLong uploaded = new AtomicLong();
|
||||
|
||||
// Keeps state for in/out connections. Non-null when the handshake
|
||||
// was successful, the connection setup and runs
|
||||
/** `
|
||||
* Keeps state for in/out connections. Non-null when the handshake
|
||||
* was successful, the connection setup and runs.
|
||||
* Do not access directly. All actions should be through Peer methods.
|
||||
*/
|
||||
volatile PeerState state;
|
||||
|
||||
/** shared across all peers on this torrent */
|
||||
@@ -76,22 +80,22 @@ public class Peer implements Comparable<Peer>
|
||||
|
||||
final static long CHECK_PERIOD = PeerCoordinator.CHECK_PERIOD; // 40 seconds
|
||||
final static int RATE_DEPTH = PeerCoordinator.RATE_DEPTH; // make following arrays RATE_DEPTH long
|
||||
private long uploaded_old[] = {-1,-1,-1};
|
||||
private long downloaded_old[] = {-1,-1,-1};
|
||||
private final long uploaded_old[] = {-1,-1,-1};
|
||||
private final long downloaded_old[] = {-1,-1,-1};
|
||||
|
||||
private static final byte[] HANDSHAKE = DataHelper.getASCII("BitTorrent protocol");
|
||||
// See BEP 4 for definitions
|
||||
// bytes per bt spec: 0011223344556677
|
||||
private static final long OPTION_EXTENSION = 0x0000000000100000l;
|
||||
private static final long OPTION_FAST = 0x0000000000000004l;
|
||||
//private static final long OPTION_DHT = 0x0000000000000001l;
|
||||
/** we use a different bit since the compact format is different */
|
||||
/* no, let's use an extension message
|
||||
static final long OPTION_I2P_DHT = 0x0000000040000000l;
|
||||
*/
|
||||
//private static final long OPTION_AZMP = 0x1000000000000000l;
|
||||
// hybrid support TODO
|
||||
private static final long OPTION_V2 = 0x0000000000000010L;
|
||||
private long options;
|
||||
private final boolean _isIncoming;
|
||||
private int _totalCommentsSent;
|
||||
private int _maxPipeline = PeerState.MIN_PIPELINE;
|
||||
|
||||
/**
|
||||
* Outgoing connection.
|
||||
@@ -289,7 +293,7 @@ public class Peer implements Comparable<Peer>
|
||||
if ((options & OPTION_EXTENSION) != 0) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Peer supports extensions, sending reply message");
|
||||
int metasize = metainfo != null ? metainfo.getInfoBytes().length : -1;
|
||||
int metasize = metainfo != null ? metainfo.getInfoBytesLength() : -1;
|
||||
boolean pexAndMetadata = metainfo == null || !metainfo.isPrivate();
|
||||
boolean dht = util.getDHT() != null;
|
||||
boolean comment = util.utCommentsEnabled();
|
||||
@@ -340,7 +344,6 @@ public class Peer implements Comparable<Peer>
|
||||
private byte[] handshake(InputStream in, OutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
din = new DataInputStream(in);
|
||||
dout = new DataOutputStream(out);
|
||||
|
||||
// Handshake write - header
|
||||
@@ -365,6 +368,7 @@ public class Peer implements Comparable<Peer>
|
||||
_log.debug("Wrote my shared hash and ID to " + toString());
|
||||
|
||||
// Handshake read - header
|
||||
din = new DataInputStream(in);
|
||||
byte b = din.readByte();
|
||||
if (b != HANDSHAKE.length)
|
||||
throw new IOException("Handshake failure, expected 19, got "
|
||||
@@ -428,9 +432,30 @@ public class Peer implements Comparable<Peer>
|
||||
return handshakeMap;
|
||||
}
|
||||
|
||||
/** @since 0.8.4 */
|
||||
/**
|
||||
* @param map non-null
|
||||
* @since 0.8.4
|
||||
*/
|
||||
public void setHandshakeMap(Map<String, BEValue> map) {
|
||||
handshakeMap = map;
|
||||
BEValue bev = map.get("reqq");
|
||||
if (bev != null) {
|
||||
try {
|
||||
int reqq = bev.getInt();
|
||||
_maxPipeline = Math.min(PeerState.MAX_PIPELINE, Math.max(PeerState.MIN_PIPELINE, reqq));
|
||||
} catch (InvalidBEncodingException ibee) {}
|
||||
} else {
|
||||
// BEP 10 "The default in libtorrent is 250"
|
||||
_maxPipeline = PeerState.MAX_PIPELINE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return min of PeerState.MIN_PIPELINE, max of PeerState.MAX_PIPELINE
|
||||
* @since 0.9.47
|
||||
*/
|
||||
public int getMaxPipeline() {
|
||||
return _maxPipeline;
|
||||
}
|
||||
|
||||
/** @since 0.8.4 */
|
||||
@@ -644,7 +669,8 @@ public class Peer implements Comparable<Peer>
|
||||
|
||||
/**
|
||||
* Returns the number of bytes that have been downloaded.
|
||||
* Can be reset to zero with <code>resetCounters()</code>/
|
||||
* Can be reset to zero with <code>resetCounters()</code>
|
||||
* which is called every CHECK_PERIOD by PeerCheckerTask.
|
||||
*/
|
||||
public long getDownloaded()
|
||||
{
|
||||
@@ -653,7 +679,8 @@ public class Peer implements Comparable<Peer>
|
||||
|
||||
/**
|
||||
* Returns the number of bytes that have been uploaded.
|
||||
* Can be reset to zero with <code>resetCounters()</code>/
|
||||
* Can be reset to zero with <code>resetCounters()</code>
|
||||
* which is called every CHECK_PERIOD by PeerCheckerTask.
|
||||
*/
|
||||
public long getUploaded()
|
||||
{
|
||||
@@ -713,6 +740,7 @@ public class Peer implements Comparable<Peer>
|
||||
|
||||
/**
|
||||
* Return how much the peer has
|
||||
* @return number of completed pieces (not bytes)
|
||||
*/
|
||||
public int completed()
|
||||
{
|
||||
@@ -764,4 +792,12 @@ public class Peer implements Comparable<Peer>
|
||||
void setTotalCommentsSent(int count) {
|
||||
_totalCommentsSent = count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return false
|
||||
* @since 0.9.49
|
||||
*/
|
||||
public boolean isWebPeer() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user