mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
Compare commits
1858 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe3e7b1f6e | ||
|
|
66a52a17c6 | ||
|
|
c113241ccd | ||
|
|
9c97909e04 | ||
|
|
c816d3e4cc | ||
|
|
4f82fe24da | ||
|
|
a1794ccd22 | ||
|
|
5f762845f0 | ||
|
|
539e7e988e | ||
|
|
2a4403f1e0 | ||
|
|
dcd15cc244 | ||
|
|
9432202fad | ||
|
|
bf050ac465 | ||
|
|
81dae1997d | ||
|
|
7e3d9649de | ||
|
|
9ba016259d | ||
|
|
7791b3952e | ||
|
|
b97f09cc95 | ||
|
|
aedf59d11a | ||
|
|
d09367d686 | ||
|
|
70f99ccc21 | ||
|
|
ef72ba3f34 | ||
|
|
251605e2b8 | ||
|
|
fa2178ca3e | ||
|
|
3d19fa12f6 | ||
|
|
48aaecacce | ||
|
|
4bb86b6a86 | ||
|
|
0588116489 | ||
|
|
78a37cc00f | ||
|
|
fb90b01f6c | ||
|
|
ea55215668 | ||
|
|
58a86fa2dc | ||
|
|
8a7c4040b6 | ||
|
|
ea279ef45a | ||
|
|
8aa18add4b | ||
|
|
5ff52e6c93 | ||
|
|
ef19a85fc0 | ||
|
|
2ce3145195 | ||
|
|
b8d74dab47 | ||
|
|
e8f5efd156 | ||
|
|
57aa8b3de8 | ||
|
|
972b66f9a5 | ||
|
|
eadeea76e7 | ||
|
|
da7d3c55b0 | ||
|
|
ff0b6a6a6a | ||
|
|
60d3e4d963 | ||
|
|
adc230acde | ||
|
|
e4ba07a540 | ||
|
|
93ec5ac5c4 | ||
|
|
774c606b09 | ||
|
|
1bff42042d | ||
|
|
daeb177579 | ||
|
|
5d7a062f1b | ||
|
|
35f7bd5127 | ||
|
|
d411da451a | ||
|
|
45bab06f37 | ||
|
|
588855c6a7 | ||
|
|
c3fa0ae8cc | ||
|
|
bf85a69a2f | ||
|
|
72ff0b9fbb | ||
|
|
b9c9988ff4 | ||
|
|
1bb5ad22af | ||
|
|
4fa5cec0dc | ||
|
|
1e7254dfaa | ||
|
|
ca0818af7e | ||
|
|
b3d09513b8 | ||
|
|
2857a163e9 | ||
|
|
cba7e5350d | ||
|
|
29a5effabb | ||
|
|
39e07ac265 | ||
|
|
57986bd348 | ||
|
|
5e301937f2 | ||
|
|
4edde333ad | ||
|
|
c600b834e3 | ||
|
|
b6319d78bf | ||
|
|
e4fc2789fe | ||
|
|
4c5a1e064d | ||
|
|
4bb82110ab | ||
|
|
8c555fe592 | ||
|
|
5f1c599f81 | ||
|
|
f2b5606583 | ||
|
|
08a680b53d | ||
|
|
634ceceb1c | ||
|
|
efd8e6e65b | ||
|
|
915429bb49 | ||
|
|
3e3e0e0a62 | ||
|
|
c023051fe4 | ||
|
|
0b788de627 | ||
|
|
fce4fab071 | ||
|
|
3236de0d5a | ||
|
|
18707dd844 | ||
|
|
fc16a70f7b | ||
|
|
619ec5d9c1 | ||
|
|
1293e122bc | ||
|
|
24bcc651e0 | ||
|
|
8713974f40 | ||
|
|
d48bf33fc5 | ||
|
|
0f14f9a302 | ||
|
|
55708d2a6d | ||
|
|
3bdfa5562b | ||
|
|
3995448014 | ||
|
|
7497741846 | ||
|
|
36939898fe | ||
|
|
b4bcd9914a | ||
|
|
833e0a936e | ||
|
|
bdc5eaa824 | ||
|
|
e76d09e1a1 | ||
|
|
3264704a23 | ||
|
|
cec68a2447 | ||
|
|
73ba1afc20 | ||
|
|
dcbe6cfaf2 | ||
|
|
3534b9c499 | ||
|
|
a7021a8283 | ||
|
|
946e523554 | ||
|
|
cdd528c51f | ||
|
|
1a748aebf1 | ||
|
|
f23a7f569b | ||
|
|
48b62340cc | ||
|
|
65da550d19 | ||
|
|
786da057f2 | ||
|
|
097813a6ca | ||
|
|
226257aa71 | ||
|
|
13604ccbb6 | ||
|
|
e996db03c0 | ||
|
|
f79a2e81ff | ||
|
|
4b1ac7420c | ||
|
|
e518b92a89 | ||
|
|
1a32ed9088 | ||
|
|
b17bbd754a | ||
|
|
7b0ff2850c | ||
|
|
31ff0ff1cb | ||
|
|
fcc70025fd | ||
|
|
56145d0f3c | ||
|
|
8b9f427aa4 | ||
|
|
cc768de8ea | ||
|
|
ffd18baf30 | ||
|
|
3474538697 | ||
|
|
5f1b31213f | ||
|
|
6fb3c7c3ba | ||
|
|
a248a2a732 | ||
|
|
09ae278306 | ||
|
|
d241e5d5cb | ||
|
|
b80278421d | ||
|
|
f2596e0187 | ||
|
|
5265dc71e9 | ||
|
|
a05bb93792 | ||
|
|
5d5970bed4 | ||
|
|
86080b26ae | ||
|
|
5b2d0c579b | ||
|
|
3c4926f377 | ||
|
|
391e3b7814 | ||
|
|
72a39609ed | ||
|
|
0c5f39ad81 | ||
|
|
3c608ec07c | ||
|
|
ce0461bf86 | ||
|
|
ce96f93c80 | ||
|
|
d88ba768d7 | ||
|
|
574d12298b | ||
|
|
7285caa4f1 | ||
|
|
2778b092e3 | ||
|
|
dbef3fe9d2 | ||
|
|
09b7d44dad | ||
|
|
a411fff1d9 | ||
|
|
e574354896 | ||
|
|
0a08383471 | ||
|
|
c5e464a8b5 | ||
|
|
002d8c7773 | ||
|
|
32921ead80 | ||
|
|
be24a3e336 | ||
|
|
d99a7d9b20 | ||
|
|
2f6bdd1c84 | ||
|
|
5a4ce66d42 | ||
|
|
76190ea365 | ||
|
|
f90386803f | ||
|
|
29d77113cc | ||
|
|
0d09a8be00 | ||
|
|
b8d61e04f0 | ||
|
|
4432c5a2c4 | ||
|
|
2419f52af4 | ||
|
|
b2a10ac82b | ||
|
|
0086f8e27a | ||
|
|
8a8277edda | ||
|
|
3f10f6651d | ||
|
|
9bc595a9a2 | ||
|
|
f04048717d | ||
|
|
361f364966 | ||
|
|
4c90a88b85 | ||
|
|
23e66671c2 | ||
|
|
ec67f48d85 | ||
|
|
3a229ea65c | ||
|
|
0e8d624d86 | ||
|
|
8f9874570a | ||
|
|
43939cedf4 | ||
|
|
4c66608caf | ||
|
|
ec4fe9a1e6 | ||
|
|
79e8ccbb5b | ||
|
|
608056dcd2 | ||
|
|
7461b640e3 | ||
|
|
743126b2ad | ||
|
|
f611136ea7 | ||
|
|
87ae9c4b74 | ||
|
|
d3630fb2b2 | ||
|
|
500afe745f | ||
|
|
26901e2945 | ||
|
|
64bde69967 | ||
|
|
ddf30784ec | ||
|
|
ea14b00d63 | ||
|
|
a24e0eb2dc | ||
|
|
0cb677a2c0 | ||
|
|
e6cbc842bf | ||
|
|
f087654f25 | ||
|
|
10335b90c5 | ||
|
|
8a234f70e6 | ||
|
|
f98a310235 | ||
|
|
1419745a5d | ||
|
|
890fe77b10 | ||
|
|
bc9d25ec3b | ||
|
|
fe71776b6f | ||
|
|
0213f058d1 | ||
|
|
0ccf0a6339 | ||
|
|
e26682f4cb | ||
|
|
8981e406f5 | ||
|
|
50d9252ba9 | ||
|
|
4f73f60e51 | ||
|
|
d69e957213 | ||
|
|
97fdedfbe3 | ||
|
|
ec1f41b13c | ||
|
|
7104d334fd | ||
|
|
4e581af3ba | ||
|
|
48f7131a7d | ||
|
|
fbd07a5276 | ||
|
|
8210911bc5 | ||
|
|
4a5406b803 | ||
|
|
ab02f722af | ||
|
|
c86e0ec371 | ||
|
|
ac4c58bbe9 | ||
|
|
23bac4a403 | ||
|
|
2321a897f5 | ||
|
|
88a5f8b125 | ||
|
|
78847306e9 | ||
|
|
1a6109109a | ||
|
|
905c6debf2 | ||
|
|
d7c4d0ff3e | ||
|
|
da3e83138a | ||
|
|
c6eba73653 | ||
|
|
0d224dfc54 | ||
|
|
dc48fb0180 | ||
|
|
cc05f9c5d9 | ||
|
|
e4c8cc300d | ||
|
|
0710f62948 | ||
|
|
58245bf121 | ||
|
|
4436c49ccc | ||
|
|
bce9630ff8 | ||
|
|
7f3a04a72f | ||
|
|
34f1ba5bd9 | ||
|
|
dc4cd34893 | ||
|
|
1fb45c4b0d | ||
|
|
514be6d048 | ||
|
|
8c292727da | ||
|
|
d5c40bb6be | ||
|
|
eed48c43fd | ||
|
|
600f36539f | ||
|
|
e1e530b4a9 | ||
|
|
98e93468a6 | ||
|
|
0f5e8d8424 | ||
|
|
d521350588 | ||
|
|
237d9474d8 | ||
|
|
5466983b36 | ||
|
|
ba41f7107d | ||
|
|
c2234599cd | ||
|
|
6ebb019e15 | ||
|
|
15cd4feade | ||
|
|
abbe1fea64 | ||
|
|
62b811c2c1 | ||
|
|
64e4b3871a | ||
|
|
c3a1631319 | ||
|
|
a06cce0aaf | ||
|
|
75b1c144b4 | ||
|
|
32ad4b4858 | ||
|
|
98669eff4f | ||
|
|
67763248cc | ||
|
|
262a803d10 | ||
|
|
0912de5b77 | ||
|
|
edb2ba7107 | ||
|
|
74f0330730 | ||
|
|
5cd0248494 | ||
|
|
816771dd00 | ||
|
|
189d7179c0 | ||
|
|
2dfc9003a7 | ||
|
|
9968afc038 | ||
|
|
5073c9637e | ||
|
|
2c594dc67a | ||
|
|
11bca5c3cd | ||
|
|
9d1e526812 | ||
|
|
018fa0ec00 | ||
|
|
f733f0a636 | ||
|
|
fd2b15fe81 | ||
|
|
c8958d71a2 | ||
|
|
e4962b855f | ||
|
|
9f30499984 | ||
|
|
5324197e43 | ||
|
|
715e063550 | ||
|
|
7ef1fdf634 | ||
|
|
db19c32381 | ||
|
|
ac1c28cb39 | ||
|
|
2fa4237acd | ||
|
|
ae26758170 | ||
|
|
a723405fb0 | ||
|
|
f20391d460 | ||
|
|
ca4db7aab2 | ||
|
|
13b2fc3266 | ||
|
|
d4c1a1c0bb | ||
|
|
d5aca85a35 | ||
|
|
17d0e59d02 | ||
|
|
d20475e3d0 | ||
|
|
ebec4d8a5e | ||
|
|
cb0801fc16 | ||
|
|
a5e9d9c6a3 | ||
|
|
3d0a1afd64 | ||
|
|
78ec5b2c6e | ||
|
|
272bf7dbc1 | ||
|
|
261acbbd66 | ||
|
|
a65dd218da | ||
|
|
50d297fa29 | ||
|
|
699e17b594 | ||
|
|
a91caa6559 | ||
|
|
07d108bb6f | ||
|
|
bcace3fb29 | ||
|
|
cd648b9b3f | ||
|
|
ba451eeca5 | ||
|
|
8d1c186665 | ||
|
|
d539c9677e | ||
|
|
855fd4d471 | ||
|
|
e0af7b077f | ||
|
|
fde301deaf | ||
|
|
9a77c0a4b1 | ||
|
|
306ea2df37 | ||
|
|
cab671e177 | ||
|
|
2ee5af0c06 | ||
|
|
911620bcd3 | ||
|
|
d1620d70bb | ||
|
|
53db54dafb | ||
|
|
ead1b72886 | ||
|
|
ae65af07c2 | ||
|
|
0046a8b3ec | ||
|
|
06e3a1b57a | ||
|
|
cc59003560 | ||
|
|
a3e0b3710c | ||
|
|
56b8534e0c | ||
|
|
c21cf0565b | ||
|
|
9668ea9338 | ||
|
|
a837e5c502 | ||
|
|
bbadbdbfdb | ||
|
|
509c039e2f | ||
|
|
8cf9cc1a01 | ||
|
|
a1f40d3048 | ||
|
|
83c0764ed4 | ||
|
|
2f5f39aaf2 | ||
|
|
5cc15fac31 | ||
|
|
ea3f356856 | ||
|
|
8189ff0f48 | ||
|
|
2679e8cfd8 | ||
|
|
3679c6aea0 | ||
|
|
604bdf314f | ||
|
|
937809bc0f | ||
|
|
d71f3d40fa | ||
|
|
e87ace0c3d | ||
|
|
bc48e6881d | ||
|
|
e957d7bbfb | ||
|
|
b3aa5ad998 | ||
|
|
ac876a0cd5 | ||
|
|
d85cb6e30a | ||
|
|
4a4b76141a | ||
|
|
a93043f064 | ||
|
|
ae309ca632 | ||
|
|
9037e8b2b1 | ||
|
|
3ff79038b5 | ||
|
|
da0e527777 | ||
|
|
66223792f3 | ||
|
|
a69eade1f4 | ||
|
|
0992a5124f | ||
|
|
e7423b1ffc | ||
|
|
65ceb08290 | ||
|
|
879d54fad4 | ||
|
|
ff5c76f8f2 | ||
|
|
0191e58b05 | ||
|
|
c43926083e | ||
|
|
bd98f2c3ee | ||
|
|
02c52f59cb | ||
|
|
fa218d3cf5 | ||
|
|
d169b422da | ||
|
|
7be64dad89 | ||
|
|
3720a5fce3 | ||
|
|
0df895b6a7 | ||
|
|
32ab95478e | ||
|
|
28adb54c0a | ||
|
|
b4fcf76480 | ||
|
|
fb8e0e1b5b | ||
|
|
41dd8b527d | ||
|
|
7376f7c399 | ||
|
|
d47ae3012a | ||
|
|
09dbe9fc03 | ||
|
|
11328a429d | ||
|
|
0c924836cf | ||
|
|
52a313bb65 | ||
|
|
d75f15104e | ||
|
|
b306bf2db9 | ||
|
|
349c4e30b6 | ||
|
|
3c69e0b2af | ||
|
|
8e1fb8ca9f | ||
|
|
42782944fb | ||
|
|
efd754eb93 | ||
|
|
81cc3e3de8 | ||
|
|
db4208e2e2 | ||
|
|
fe740249a5 | ||
|
|
4ad6cef5a5 | ||
|
|
86f86fc711 | ||
|
|
e5dac605f6 | ||
|
|
ab1abf584f | ||
|
|
8a3d6ddb3e | ||
|
|
1410fa5c21 | ||
|
|
ea19d2296c | ||
|
|
3a4833aa67 | ||
|
|
4a66624b04 | ||
|
|
0153748134 | ||
|
|
d3062d2994 | ||
|
|
d7ff459f12 | ||
|
|
e0ac8a7298 | ||
|
|
96ea630274 | ||
|
|
f232c8f2df | ||
|
|
2f54d95187 | ||
|
|
830e49f2c5 | ||
|
|
23e323438a | ||
|
|
48f1514053 | ||
|
|
a1aa6c62d7 | ||
|
|
9e1ea289c2 | ||
|
|
f6ddcd432e | ||
|
|
9a6654943d | ||
|
|
bed5a18294 | ||
|
|
45221da1dc | ||
|
|
8440633614 | ||
|
|
50f455e0a2 | ||
|
|
5fbcfadd6d | ||
|
|
5af13849a9 | ||
|
|
a9c486d7a1 | ||
|
|
8c0a1197d7 | ||
|
|
4e5f5c218a | ||
|
|
64cc59d1e9 | ||
|
|
0c943f4405 | ||
|
|
37d3d9e604 | ||
|
|
d23451fdf6 | ||
|
|
d843502832 | ||
|
|
0428b5ece1 | ||
|
|
df787060c3 | ||
|
|
ea9c69cd53 | ||
|
|
199d149bed | ||
|
|
ff8941af71 | ||
|
|
f125936b2e | ||
|
|
697d831441 | ||
|
|
457b64f92d | ||
|
|
6caec6b551 | ||
|
|
362edc68ad | ||
|
|
29872fc003 | ||
|
|
81d383c99e | ||
|
|
12653f2fe4 | ||
|
|
43f5ba286c | ||
|
|
f990a2f69f | ||
|
|
0b97b4294c | ||
|
|
4178ac8eac | ||
|
|
6a590bf970 | ||
|
|
2f847d62bb | ||
|
|
df6d48dbae | ||
|
|
bacce7dc60 | ||
|
|
b3314380cc | ||
|
|
d4eea61b82 | ||
|
|
a1995c13cd | ||
|
|
bc8adf1433 | ||
|
|
a1322d4667 | ||
|
|
4100249313 | ||
|
|
acbd3f897b | ||
|
|
7dc5a04b8d | ||
|
|
03635f4444 | ||
|
|
0fae04f96a | ||
|
|
bb531a878d | ||
|
|
0f7db8e418 | ||
|
|
9a724b2af9 | ||
|
|
f4ea6138e8 | ||
|
|
e74272781f | ||
|
|
b75e418879 | ||
|
|
927123188c | ||
|
|
c00eb8cf44 | ||
|
|
265bb8b779 | ||
|
|
e3be409945 | ||
|
|
d8707ceb57 | ||
|
|
39e16824b9 | ||
|
|
285e693a4e | ||
|
|
940628bf36 | ||
|
|
b5994e058a | ||
|
|
22dabfd79e | ||
|
|
0e41c3fa36 | ||
|
|
124698854f | ||
|
|
f223e668ce | ||
|
|
f5b823a712 | ||
|
|
4163542125 | ||
|
|
6921c8391e | ||
|
|
47a2020472 | ||
|
|
9d38facf3b | ||
|
|
a1be1aa9ec | ||
|
|
c4bbe2bb4a | ||
|
|
601695dede | ||
|
|
cdc81e19a0 | ||
|
|
b98b3a87b0 | ||
|
|
425ef2cfe5 | ||
|
|
c454685605 | ||
|
|
c98926abf2 | ||
|
|
7aacc97351 | ||
|
|
c49e17ad40 | ||
|
|
296b721929 | ||
|
|
d0cf385f4b | ||
|
|
b91f5a7430 | ||
|
|
4d8431907d | ||
|
|
b0cf5130a2 | ||
|
|
396aa6944d | ||
|
|
8a20d3219b | ||
|
|
13a746162a | ||
|
|
7e5370fbe5 | ||
|
|
ec59308fad | ||
|
|
5ed76b997c | ||
|
|
535fbdb4c9 | ||
|
|
034332a0ef | ||
|
|
a1eac6f28e | ||
|
|
ba22a940f1 | ||
|
|
8439f6dc57 | ||
|
|
a21bec0ed8 | ||
|
|
5adbc2c3fe | ||
|
|
c515f49903 | ||
|
|
845b14f581 | ||
|
|
cdfdfc9e24 | ||
|
|
62d279e1b0 | ||
|
|
a1fcd8af39 | ||
|
|
8c6c954ea2 | ||
|
|
77bb7432bc | ||
|
|
720ffa8a31 | ||
|
|
c1c69258c3 | ||
|
|
733a4a2869 | ||
|
|
ca3ac8c11d | ||
|
|
d4e3991257 | ||
|
|
648a884a18 | ||
|
|
8fe989050e | ||
|
|
bb6212ccc1 | ||
|
|
5f39f65540 | ||
|
|
146b3f52c0 | ||
|
|
cc75ccd070 | ||
|
|
0ddc514221 | ||
|
|
d3b699d7cd | ||
|
|
6592fab41c | ||
|
|
02895d4cf5 | ||
|
|
8b7941c4ce | ||
|
|
de673464d1 | ||
|
|
6ce2c30522 | ||
|
|
c5a1e8cac8 | ||
|
|
f67c38d8d2 | ||
|
|
1f1a3270f7 | ||
|
|
ffee29272f | ||
|
|
2d2469c23d | ||
|
|
8e80a8b06f | ||
|
|
26fac94d05 | ||
|
|
9a30068ae5 | ||
|
|
46c72a7137 | ||
|
|
04bccedd9b | ||
|
|
b2e21a4f12 | ||
|
|
57e46ba0cf | ||
|
|
df3dc1f574 | ||
|
|
1b5f67e185 | ||
|
|
89064b6fb4 | ||
|
|
c49dd712de | ||
|
|
4f1cb74f75 | ||
|
|
75df8d3c7b | ||
|
|
85be76b01a | ||
|
|
835c480269 | ||
|
|
ac9d92c681 | ||
|
|
a30d1972e5 | ||
|
|
0c2330bf14 | ||
|
|
a703d31893 | ||
|
|
4f8f3a386f | ||
|
|
83f0b9c041 | ||
|
|
cf77be0eeb | ||
|
|
b2aa34baa6 | ||
|
|
4def0b6ea5 | ||
|
|
25592a00b6 | ||
|
|
edaf162f9c | ||
|
|
e7ff15c573 | ||
|
|
161ff3579b | ||
|
|
f2085ecc8d | ||
|
|
0c5dee69ba | ||
|
|
d74033dd2b | ||
|
|
5412e29ff5 | ||
|
|
0236769134 | ||
|
|
530a078535 | ||
|
|
fbca27fe73 | ||
|
|
08cc256c54 | ||
|
|
6432963294 | ||
|
|
59beb5e4e4 | ||
|
|
217aa0c882 | ||
|
|
e889dc1508 | ||
|
|
0141489d34 | ||
|
|
2d06c0cbe6 | ||
|
|
51446f0324 | ||
|
|
66d0b7aec4 | ||
|
|
92b49fb969 | ||
|
|
17dd5c1285 | ||
|
|
ce97ec1534 | ||
|
|
3ceb64db2e | ||
|
|
bb702700f7 | ||
|
|
ff3fec9a00 | ||
|
|
3873e60cbb | ||
|
|
2dbf094433 | ||
|
|
e85e96bc35 | ||
|
|
98543af92b | ||
|
|
af0d853ccd | ||
|
|
20a5e19ea1 | ||
|
|
f1058410fb | ||
|
|
6ba42a0912 | ||
|
|
1292ec67c0 | ||
|
|
2f2f14e3a7 | ||
|
|
edd9dd2c39 | ||
|
|
f8722f17c6 | ||
|
|
38cc01e13d | ||
|
|
6ca266ff3b | ||
|
|
b9773c88e4 | ||
|
|
3311fe62bb | ||
|
|
a284c85153 | ||
|
|
e5f75eb61c | ||
|
|
89f9bec49a | ||
|
|
dbc3952654 | ||
|
|
f3c052ed0c | ||
|
|
692f495adc | ||
|
|
aa1de7fe94 | ||
|
|
ca45fe73e9 | ||
|
|
a8af683643 | ||
|
|
b86c83a068 | ||
|
|
6656ef3c8d | ||
|
|
6898d04a1d | ||
|
|
3215125950 | ||
|
|
612f51ba7f | ||
|
|
3d03732555 | ||
|
|
d6d440ba8a | ||
|
|
821a76a7c5 | ||
|
|
34154596f2 | ||
|
|
a1dce017f4 | ||
|
|
78af34237e | ||
|
|
8874ea8033 | ||
|
|
6bd1ee36f7 | ||
|
|
f07c4bd1dd | ||
|
|
8524a67895 | ||
|
|
43d880752e | ||
|
|
d4246edb82 | ||
|
|
fd4513ebb2 | ||
|
|
ee8449fa05 | ||
|
|
5415598f60 | ||
|
|
7d73c304b5 | ||
|
|
d25206abce | ||
|
|
5d7c6fb0b3 | ||
|
|
36a060d50f | ||
|
|
577ed56af0 | ||
|
|
695dc96a83 | ||
|
|
e5251bf3c3 | ||
|
|
2692aef53d | ||
|
|
d524105727 | ||
|
|
26463c50fc | ||
|
|
b092e712ec | ||
|
|
cb8fbb0135 | ||
|
|
19e23b34da | ||
|
|
a4a3f8e96b | ||
|
|
f2b720617c | ||
|
|
d677d67676 | ||
|
|
7e3157b162 | ||
|
|
2b6a95cbee | ||
|
|
900153765a | ||
|
|
441e847de8 | ||
|
|
6439e227f6 | ||
|
|
def404b61a | ||
|
|
d8be5b8ce1 | ||
|
|
dddbca6ffb | ||
|
|
56619caa71 | ||
|
|
0e502c49b5 | ||
|
|
710b27688b | ||
|
|
a9ad6fc31e | ||
|
|
967627e58a | ||
|
|
7691a5b4a9 | ||
|
|
d9b6262a6e | ||
|
|
075f80aea2 | ||
|
|
b07530a8a1 | ||
|
|
0ae7931a6f | ||
|
|
158160f5c0 | ||
|
|
4cb2ad48be | ||
|
|
adba3987f8 | ||
|
|
36dbc15bca | ||
|
|
d96803a290 | ||
|
|
592d6ae4f4 | ||
|
|
7dd9a7a0af | ||
|
|
1b23aa2d7b | ||
|
|
f980277552 | ||
|
|
586695673b | ||
|
|
c158bbe90a | ||
|
|
c01fd3299f | ||
|
|
f64b136f5a | ||
|
|
37e67cbcaa | ||
|
|
be815804e6 | ||
|
|
ce35637866 | ||
|
|
de2b0f6e09 | ||
|
|
7b776666a3 | ||
|
|
47578b69c6 | ||
|
|
8f28cee32f | ||
|
|
96cf6ca531 | ||
|
|
83cb3a1820 | ||
|
|
ffdd5935e9 | ||
|
|
2e9f2d4a3b | ||
|
|
0ca782ed71 | ||
|
|
e40b656ecf | ||
|
|
85f5f5b91e | ||
|
|
f008478505 | ||
|
|
d926a31064 | ||
|
|
822cb35efe | ||
|
|
faaa8115d9 | ||
|
|
81015a5228 | ||
|
|
a3246cd9dc | ||
|
|
530c353b00 | ||
|
|
75c2cb751f | ||
|
|
67c4d4bcaa | ||
|
|
25e82105b2 | ||
|
|
4b167fdbaf | ||
|
|
5b93558bd0 | ||
|
|
70639f1139 | ||
|
|
c5a1806528 | ||
|
|
a2249f0a82 | ||
|
|
9f217f8a11 | ||
|
|
5e19e361e7 | ||
|
|
0b47f65b06 | ||
|
|
140146e433 | ||
|
|
b4484c8e8f | ||
|
|
1e5604ed43 | ||
|
|
39e378a03d | ||
|
|
7cfcb12c7b | ||
|
|
49f4dc53ad | ||
|
|
4afdca090d | ||
|
|
d8f6c4a93d | ||
|
|
d724948d03 | ||
|
|
34d75b08dd | ||
|
|
ca9782dd0d | ||
|
|
2ad26dd4c9 | ||
|
|
828facab57 | ||
|
|
cd087568b5 | ||
|
|
dfe8b25e5e | ||
|
|
1e9bcd6b8b | ||
|
|
8bc58daa5a | ||
|
|
3b97feb89f | ||
|
|
a8135b8d18 | ||
|
|
5cf1961fa4 | ||
|
|
577c71b930 | ||
|
|
c5cab05a6b | ||
|
|
b855c71891 | ||
|
|
21f41a2b2a | ||
|
|
8319dd6b25 | ||
|
|
d4c47d90cb | ||
|
|
302af823a3 | ||
|
|
69ee6112b3 | ||
|
|
816a58f292 | ||
|
|
43e130ee34 | ||
|
|
8ffc1486a4 | ||
|
|
0e98dd5c70 | ||
|
|
beffdb9fe1 | ||
|
|
05eda2bc9e | ||
|
|
c3429bb1a9 | ||
|
|
53c6b10177 | ||
|
|
c2d7133174 | ||
|
|
9b82265cd8 | ||
|
|
c802c2deb0 | ||
|
|
c215f2e8d1 | ||
|
|
d327533b56 | ||
|
|
94255ebaf4 | ||
|
|
21259204b1 | ||
|
|
8d6eb5b6b2 | ||
|
|
9632e7ba03 | ||
|
|
1a02819187 | ||
|
|
6b33250c59 | ||
|
|
083034fa35 | ||
|
|
0021501d75 | ||
|
|
379be2a29e | ||
|
|
a3f62e1d71 | ||
|
|
a6ee1e648e | ||
|
|
575268d360 | ||
|
|
69b0bef206 | ||
|
|
e1b4feb618 | ||
|
|
3286bdb4a7 | ||
|
|
c8ae15041f | ||
|
|
e090b9052a | ||
|
|
0ef9c08326 | ||
|
|
d04b19d77c | ||
|
|
04adc14b76 | ||
|
|
0dee0609ea | ||
|
|
0a519d8072 | ||
|
|
0cc91dd2d2 | ||
|
|
606e35eec1 | ||
|
|
e926b0392f | ||
|
|
9980bfa0e7 | ||
|
|
efdbe26755 | ||
|
|
bb3ae8f5e4 | ||
|
|
1e6edf06a2 | ||
|
|
0cf656cd76 | ||
|
|
fb420bb563 | ||
|
|
3da5061426 | ||
|
|
dd32f1ed6d | ||
|
|
1857f14be8 | ||
|
|
9c25a88707 | ||
|
|
c599d65307 | ||
|
|
4d573f6655 | ||
|
|
3a4238729a | ||
|
|
df6bb6d9b8 | ||
|
|
918aa556ef | ||
|
|
1e7feae0df | ||
|
|
70829ee79e | ||
|
|
4ed19c05f6 | ||
|
|
4a5e16b994 | ||
|
|
c53ad2012c | ||
|
|
7b6aa41ca8 | ||
|
|
32c5ff23a6 | ||
|
|
c112276eea | ||
|
|
662a59d0fd | ||
|
|
72919ec076 | ||
|
|
627b8dca83 | ||
|
|
7bcc905f05 | ||
|
|
8447822c35 | ||
|
|
411063e3b5 | ||
|
|
9bac680f2a | ||
|
|
38795a41cb | ||
|
|
e170c39dfc | ||
|
|
68f4961f1a | ||
|
|
ae5239de43 | ||
|
|
2064504cce | ||
|
|
4aa631c33f | ||
|
|
d6834d6a9a | ||
|
|
413e25f20e | ||
|
|
b8e19bf5f1 | ||
|
|
c7efd465fa | ||
|
|
6e9a3422e9 | ||
|
|
d3cd8517b7 | ||
|
|
f13cc0b862 | ||
|
|
0754255c1f | ||
|
|
902899ae24 | ||
|
|
c620fc1232 | ||
|
|
e7157cf15e | ||
|
|
940a97db11 | ||
|
|
8e63f8f333 | ||
|
|
5e97b54d1b | ||
|
|
ea7cf1cf69 | ||
|
|
17c4038c60 | ||
|
|
5022a9c610 | ||
|
|
ca8ec6286a | ||
|
|
5142459e12 | ||
|
|
8590dbd3d3 | ||
|
|
c4be5f7fdb | ||
|
|
47dc5591b9 | ||
|
|
2bb48b4546 | ||
|
|
638e9b4d7f | ||
|
|
b8f998f76a | ||
|
|
5f43026986 | ||
|
|
13f263b791 | ||
|
|
07c529173e | ||
|
|
fee940238a | ||
|
|
ca02b5d860 | ||
|
|
fba23a4528 | ||
|
|
a0795d8534 | ||
|
|
03cc6e0524 | ||
|
|
3af1f4bc76 | ||
|
|
52b2d6c393 | ||
|
|
bb52056aec | ||
|
|
75aa9f2c0c | ||
|
|
4e426727e9 | ||
|
|
09f233dbfb | ||
|
|
dfe5df29e1 | ||
|
|
d5ee1f602f | ||
|
|
86173400d5 | ||
|
|
ae439b5385 | ||
|
|
dc6a42c26f | ||
|
|
fdf38f45d9 | ||
|
|
a2726cf206 | ||
|
|
e56d243c3f | ||
|
|
e95fb3ab89 | ||
|
|
c984f89dfb | ||
|
|
5a09c11e90 | ||
|
|
d44be2fd73 | ||
|
|
a158647153 | ||
|
|
623c3f4605 | ||
|
|
8a52295882 | ||
|
|
f2bc2598dc | ||
|
|
1d8a91c5cc | ||
|
|
3bc56ba423 | ||
|
|
e068a3cf22 | ||
|
|
2e2cbe7803 | ||
|
|
1c1452e06b | ||
|
|
c757b6d020 | ||
|
|
8fcab7b0c1 | ||
|
|
7646147ed2 | ||
|
|
b6de474fda | ||
|
|
2f74e670a5 | ||
|
|
c1168c2aa0 | ||
|
|
1bd6390f78 | ||
|
|
a9e9e14c42 | ||
|
|
19471dbb90 | ||
|
|
3b13a3f2a1 | ||
|
|
4ce2ef1d83 | ||
|
|
12d0abda55 | ||
|
|
7418f11651 | ||
|
|
fb83ca42f4 | ||
|
|
dab34e9051 | ||
|
|
ec2297ed9d | ||
|
|
7c535159bc | ||
|
|
2af4a2b58d | ||
|
|
ead6a6dca3 | ||
|
|
0ce15ffc91 | ||
|
|
76adac31c3 | ||
|
|
edfcd23b01 | ||
|
|
f21e1c75d5 | ||
|
|
786c27c8ec | ||
|
|
c34df2090c | ||
|
|
5769a41208 | ||
|
|
dc265367dc | ||
|
|
c22fc75370 | ||
|
|
6206616347 | ||
|
|
7a12b5ca4b | ||
|
|
b77ae08388 | ||
|
|
527ee3b3c5 | ||
|
|
cd5bfaabb5 | ||
|
|
e20acb93cf | ||
|
|
132557f941 | ||
|
|
b8d21a1282 | ||
|
|
4ebc7c970a | ||
|
|
572694b141 | ||
|
|
c1f19cb258 | ||
|
|
caff003a85 | ||
|
|
d580c0155a | ||
|
|
9475a22728 | ||
|
|
245e6b6efd | ||
|
|
e3fb9d8483 | ||
|
|
220ef283de | ||
|
|
8178df752b | ||
|
|
922e5915b1 | ||
|
|
dc6499aa98 | ||
|
|
0c8a80b6f8 | ||
|
|
7c2da75197 | ||
|
|
b8032e7fbf | ||
|
|
b42be2b391 | ||
|
|
a3bdc4ddc1 | ||
|
|
2abc997af8 | ||
|
|
710a35993d | ||
|
|
e36d5634e7 | ||
|
|
354a04f0f6 | ||
|
|
a80aeb6715 | ||
|
|
cd1af85e39 | ||
|
|
60e648bf9a | ||
|
|
c45e31b1b2 | ||
|
|
6d204b4d7b | ||
|
|
71bad23906 | ||
|
|
d91d734b5c | ||
|
|
5fee6df87a | ||
|
|
644d65054d | ||
|
|
f41563a700 | ||
|
|
32b54fa1f8 | ||
|
|
084663d6ea | ||
|
|
55b2f2c625 | ||
|
|
5ad9c8e740 | ||
|
|
e96f0bfb14 | ||
|
|
8677cd54bd | ||
|
|
b97ef1af49 | ||
|
|
227697c388 | ||
|
|
a6bd8275ca | ||
|
|
6f01ebc0a5 | ||
|
|
98f06e3ba1 | ||
|
|
b6d1d8117b | ||
|
|
7b35c793f3 | ||
|
|
58ef08310d | ||
|
|
ec5c13a95e | ||
|
|
0a564d153a | ||
|
|
0a8da6bc2f | ||
|
|
46e4f4aea5 | ||
|
|
6d7f20961f | ||
|
|
4b7fcdc719 | ||
|
|
716926f0d7 | ||
|
|
24a14e3440 | ||
|
|
5470a3a453 | ||
|
|
c02c9c3c24 | ||
|
|
3154eda6a6 | ||
|
|
d50cf0ad83 | ||
|
|
d6ed9152ee | ||
|
|
a4759694c8 | ||
|
|
6610af08c2 | ||
|
|
4db643aa8e | ||
|
|
75c9f596b2 | ||
|
|
064c013a72 | ||
|
|
75ab385ab7 | ||
|
|
9e0389df1b | ||
|
|
1b921a2eac | ||
|
|
f2729b3efe | ||
|
|
231c02c058 | ||
|
|
a199084c99 | ||
|
|
64f0a545fd | ||
|
|
34617bcb44 | ||
|
|
5f8820d9d6 | ||
|
|
10dfe39f5f | ||
|
|
b7f0d87daf | ||
|
|
3ff1adf597 | ||
|
|
93d89a1fe0 | ||
|
|
3c9a574e90 | ||
|
|
de82b3ae19 | ||
|
|
4b421d3feb | ||
|
|
f84d88ac63 | ||
|
|
2e62f9532f | ||
|
|
5657079355 | ||
|
|
bd63383d7f | ||
|
|
db0f2fab11 | ||
|
|
f33b0cad2e | ||
|
|
e3fbc246f4 | ||
|
|
d602ea1061 | ||
|
|
d40cd00cdb | ||
|
|
6930106d26 | ||
|
|
692600dfac | ||
|
|
95cc544c92 | ||
|
|
8544283110 | ||
|
|
abf687ff09 | ||
|
|
be2629aa5a | ||
|
|
ebee6c5f13 | ||
|
|
3adff82d4a | ||
|
|
200ad5524d | ||
|
|
82ac0aa492 | ||
|
|
b8a99878b6 | ||
|
|
eaca435a5b | ||
|
|
ce05cce331 | ||
|
|
e190dab7d6 | ||
|
|
289c308600 | ||
|
|
bff12b06f4 | ||
|
|
b8590075e6 | ||
|
|
1da9e2e1c0 | ||
|
|
a1fb97cfad | ||
|
|
e53fe2d988 | ||
|
|
182a721674 | ||
|
|
00c75a7afa | ||
|
|
385e592045 | ||
|
|
359781c698 | ||
|
|
c6c7191682 | ||
|
|
fa286a6fb3 | ||
|
|
02a36a9fa8 | ||
|
|
77142e59ee | ||
|
|
4156900fb5 | ||
|
|
76d39cc7c9 | ||
|
|
9e0c5d67c7 | ||
|
|
03111ad0df | ||
|
|
abb81c353d | ||
|
|
1ad38c0b95 | ||
|
|
532a29b0c4 | ||
|
|
4f3a416e37 | ||
|
|
4d0ad47491 | ||
|
|
7b632bd03d | ||
|
|
c2faa5c614 | ||
|
|
d15581d95e | ||
|
|
7bde4de1f5 | ||
|
|
88f19f551d | ||
|
|
d79bdc9f66 | ||
|
|
48a3c767e5 | ||
|
|
86fc12e395 | ||
|
|
3c65012a63 | ||
|
|
97b7ea0da5 | ||
|
|
1c4cc02c23 | ||
|
|
ac94341203 | ||
|
|
234540f9e7 | ||
|
|
cb44a35fde | ||
|
|
6ac849fe37 | ||
|
|
0829b186b7 | ||
|
|
993900aa77 | ||
|
|
aac9a8d18f | ||
|
|
2baaa8bb8f | ||
|
|
f29ef2c057 | ||
|
|
d1c98c58b9 | ||
|
|
4930157e93 | ||
|
|
d30d1e8a7d | ||
|
|
80a55c5b75 | ||
|
|
3c02cade58 | ||
|
|
21123e2afa | ||
|
|
f1415c2234 | ||
|
|
212a1156a1 | ||
|
|
54fb234424 | ||
|
|
5a6b50ae51 | ||
|
|
21542e8150 | ||
|
|
544fcd147f | ||
|
|
9bc3b11b96 | ||
|
|
02e7f6b0c3 | ||
|
|
f7101cc260 | ||
|
|
e9f0ed6473 | ||
|
|
4960587f46 | ||
|
|
bf8eecf407 | ||
|
|
09a1a78bd6 | ||
|
|
7df2ed6114 | ||
|
|
22b1066b0a | ||
|
|
89695a7040 | ||
|
|
2ed281472f | ||
|
|
fafdb0c590 | ||
|
|
2a6883e305 | ||
|
|
3cee8bfcb2 | ||
|
|
86dbfdb536 | ||
|
|
70fec2bc99 | ||
|
|
8a106eb09e | ||
|
|
f9331897b8 | ||
|
|
126ca0209b | ||
|
|
ad5540c9f3 | ||
|
|
e91d0bbec8 | ||
|
|
8ee461f60a | ||
|
|
4de6201b84 | ||
|
|
273aa31b1e | ||
|
|
b31f52e332 | ||
|
|
4fae7b8d65 | ||
|
|
5479ddd03c | ||
|
|
1f23584c24 | ||
|
|
067fb45a25 | ||
|
|
ac287a896c | ||
|
|
8baf62eb2c | ||
|
|
e1ec79daf2 | ||
|
|
d4426118c5 | ||
|
|
64fe56aa07 | ||
|
|
47eb49c34e | ||
|
|
cd6d86c8c3 | ||
|
|
84d4e074ce | ||
|
|
a0e71c4173 | ||
|
|
533c8a8a55 | ||
|
|
a57ae4dc56 | ||
|
|
88dfe3ca4e | ||
|
|
d68c7f8ea7 | ||
|
|
e8ace998ba | ||
|
|
e8be39af17 | ||
|
|
7196db09d6 | ||
|
|
b290ee1aa0 | ||
|
|
d105ab11af | ||
|
|
bc888167a7 | ||
|
|
6ca6591c43 | ||
|
|
36cb707e47 | ||
|
|
013d5ff74f | ||
|
|
9af5a90757 | ||
|
|
d8b6f5438c | ||
|
|
10030a4e0d | ||
|
|
993dc72ce6 | ||
|
|
324ace103b | ||
|
|
d530269e4f | ||
|
|
7146a4dbae | ||
|
|
f79900653b | ||
|
|
f172f44f32 | ||
|
|
f34abe60fa | ||
|
|
a3c305032a | ||
|
|
2921eaa055 | ||
|
|
1cc68ea402 | ||
|
|
c18e8f6c78 | ||
|
|
e59ca8420e | ||
|
|
a6f9a56e40 | ||
|
|
4011502f5f | ||
|
|
acd6af709e | ||
|
|
55704ece3a | ||
|
|
0d3ede56cb | ||
|
|
06fae976b3 | ||
|
|
e95035c143 | ||
|
|
55be5c74f0 | ||
|
|
a1c16e129d | ||
|
|
321c7cb7cf | ||
|
|
5f8d45154d | ||
|
|
503f522cc3 | ||
|
|
22179400c7 | ||
|
|
66f82cb43f | ||
|
|
1df67bd43c | ||
|
|
d5b03f214b | ||
|
|
cfb773351d | ||
|
|
6942c20879 | ||
|
|
7b341d5d30 | ||
|
|
e93718456f | ||
|
|
af838196be | ||
|
|
f8ba5b8c63 | ||
|
|
446bbf6b93 | ||
|
|
2c19da9aa7 | ||
|
|
01fc21ffb9 | ||
|
|
3e3e2c41bd | ||
|
|
cb139226df | ||
|
|
84d6028454 | ||
|
|
126dc0ebe0 | ||
|
|
099d9d977f | ||
|
|
5a167316cb | ||
|
|
85e31f84ec | ||
|
|
edb7a0e23c | ||
|
|
f401ccf5dd | ||
|
|
9f9e8bfa14 | ||
|
|
61168d5c9d | ||
|
|
8500aaa26f | ||
|
|
445cff0025 | ||
|
|
99356fd24d | ||
|
|
5ef5f5a170 | ||
|
|
54b7d4ef32 | ||
|
|
6376328c98 | ||
|
|
b6f83dfe9f | ||
|
|
3f728149ab | ||
|
|
36501fe31e | ||
|
|
e4ddc883d2 | ||
|
|
5ac01ddce8 | ||
|
|
d3656fcb3f | ||
|
|
d6c101d261 | ||
|
|
eeea02d834 | ||
|
|
0e0cd555eb | ||
|
|
5dfe483152 | ||
|
|
c210553a39 | ||
|
|
a315e4ce62 | ||
|
|
96cfd9acc2 | ||
|
|
d869bb25ed | ||
|
|
476e6aae35 | ||
|
|
d30ee99cf1 | ||
|
|
84d9c8f1b8 | ||
|
|
9a2f744630 | ||
|
|
df737a65b2 | ||
|
|
c5230ca44b | ||
|
|
3471e6fe16 | ||
|
|
f1437feede | ||
|
|
0d523bd2a6 | ||
|
|
8943200ffa | ||
|
|
a902d68669 | ||
|
|
f6ca7c19af | ||
|
|
4540d22de8 | ||
|
|
3458665df8 | ||
|
|
8320987124 | ||
|
|
648b09d45f | ||
|
|
857df5c734 | ||
|
|
737603e81b | ||
|
|
53ca5dc67a | ||
|
|
8ad5696e50 | ||
|
|
ef9d27e424 | ||
|
|
2bb5ff7184 | ||
|
|
753c7efde8 | ||
|
|
d0d0cd8445 | ||
|
|
410d2c2fa9 | ||
|
|
6a743f66e8 | ||
|
|
709c451400 | ||
|
|
cb73c7c72e | ||
|
|
50abeea82a | ||
|
|
8db352b4d0 | ||
|
|
6589bdf6b5 | ||
|
|
1ac171152a | ||
|
|
629c718527 | ||
|
|
519c0fe81d | ||
|
|
6e3aef0b9b | ||
|
|
eb0ef80a17 | ||
|
|
9763499dbe | ||
|
|
949c38f5f0 | ||
|
|
2a6f906177 | ||
|
|
b4c226f4b3 | ||
|
|
64c3282aae | ||
|
|
f5d511ae0f | ||
|
|
aa9a9ef18d | ||
|
|
aa5e6400e4 | ||
|
|
61bcfebcc8 | ||
|
|
73b9c0302b | ||
|
|
aead9db971 | ||
|
|
d8230644b2 | ||
|
|
97ef908b0c | ||
|
|
fb8be32c28 | ||
|
|
a298588943 | ||
|
|
ccfeca728e | ||
|
|
7705423c42 | ||
|
|
379075c594 | ||
|
|
6a23153c0b | ||
|
|
74b2ba7ae2 | ||
|
|
9e02c99db5 | ||
|
|
ba3cee1cf1 | ||
|
|
9f59ff2df4 | ||
|
|
8df4082d6f | ||
|
|
cf005821d7 | ||
|
|
39b3996596 | ||
|
|
78357baca4 | ||
|
|
85b78dfb9b | ||
|
|
9fd60b52f1 | ||
|
|
851be41d0d | ||
|
|
c6a6a4e0e8 | ||
|
|
28aeebd4c7 | ||
|
|
c88638afe4 | ||
|
|
7f98a8b972 | ||
|
|
e1e4924592 | ||
|
|
8299f80ea5 | ||
|
|
b8ce0b0838 | ||
|
|
e13f151474 | ||
|
|
4ed4e8708e | ||
|
|
1738d118f7 | ||
|
|
f1f66d7b8f | ||
|
|
4ed5e44de7 | ||
|
|
3e3f92c616 | ||
|
|
5fb1247b87 | ||
|
|
016222463d | ||
|
|
0e477bf938 | ||
|
|
eb75eb0e55 | ||
|
|
2a703e0844 | ||
|
|
2b6d9eaa8b | ||
|
|
f9b0bb0383 | ||
|
|
c6e8873d57 | ||
|
|
b2767304e9 | ||
|
|
3d4d3ce80d | ||
|
|
01ea1854bc | ||
|
|
f3aada9e1a | ||
|
|
08fd32b3bf | ||
|
|
39a86ce5c9 | ||
|
|
fe25260ee2 | ||
|
|
63fd05c7d3 | ||
|
|
6c2aec8854 | ||
|
|
e5553f7528 | ||
|
|
6e3cec653d | ||
|
|
55976fd9dc | ||
|
|
bcbd5201e9 | ||
|
|
c2f91ea63b | ||
|
|
1d9d89b115 | ||
|
|
798dd8b27b | ||
|
|
3544f77e90 | ||
|
|
96c4463d39 | ||
|
|
650b7abef6 | ||
|
|
714b3856a2 | ||
|
|
6b939eba59 | ||
|
|
e82662b389 | ||
|
|
8f9dae8556 | ||
|
|
69ca3bc75d | ||
|
|
3945f34e96 | ||
|
|
549dcbee32 | ||
|
|
0a0c2350f2 | ||
|
|
cef2263a7f | ||
|
|
e338ce7da9 | ||
|
|
638c376e5b | ||
|
|
8eade86624 | ||
|
|
24ae8d5443 | ||
|
|
030af11d86 | ||
|
|
857a2bc399 | ||
|
|
09e6e2940f | ||
|
|
23e18a34d4 | ||
|
|
3bdef5f58d | ||
|
|
cf27581c76 | ||
|
|
cf41df82e2 | ||
|
|
4634bff9f0 | ||
|
|
1a9c658836 | ||
|
|
1a32c55ca3 | ||
|
|
f4e230f1ad | ||
|
|
9abc4cf359 | ||
|
|
c54fc7ee44 | ||
|
|
9df757a3fd | ||
|
|
9b5a885b3b | ||
|
|
f32b288785 | ||
|
|
f378119889 | ||
|
|
8fd466c5a9 | ||
|
|
36eddd48c3 | ||
|
|
2470ba76f0 | ||
|
|
d32475440a | ||
|
|
b4d73683d1 | ||
|
|
95f19a5fb2 | ||
|
|
f98780b1d7 | ||
|
|
150c89e48a | ||
|
|
c85bf82749 | ||
|
|
63227ab2f1 | ||
|
|
5b19237a85 | ||
|
|
150b8f8cbd | ||
|
|
79b97ef2f7 | ||
|
|
e45d68ad3a | ||
|
|
b40f1b67b9 | ||
|
|
4fa7e43162 | ||
|
|
66fcbcae96 | ||
|
|
7f0845dfd3 | ||
|
|
f875823357 | ||
|
|
75611866eb | ||
|
|
c3dd7ed73a | ||
|
|
3ae885d120 | ||
|
|
81f53d313c | ||
|
|
d10c86b849 | ||
|
|
9d123fa5ad | ||
|
|
f4d6a08d57 | ||
|
|
e9e641afbe | ||
|
|
8f5768f85b | ||
|
|
3dd78a2589 | ||
|
|
df92a85159 | ||
|
|
ab606a1121 | ||
|
|
457b3cf168 | ||
|
|
c6f898b8ca | ||
|
|
b9970e1908 | ||
|
|
8bb9a57908 | ||
|
|
53934a470b | ||
|
|
a94ae7d77d | ||
|
|
f43e860998 | ||
|
|
3e40852999 | ||
|
|
df073bb306 | ||
|
|
771c4a0d02 | ||
|
|
cb959ab14c | ||
|
|
34b75dac02 | ||
|
|
fbb590d9a9 | ||
|
|
ed5c533982 | ||
|
|
98d2ce5845 | ||
|
|
9d9d5e3e5d | ||
|
|
eba4626589 | ||
|
|
ff5fa1d137 | ||
|
|
71766ecd16 | ||
|
|
fc63ca6982 | ||
|
|
0e6d888ed3 | ||
|
|
9afe3b5f39 | ||
|
|
3bd40fc8b3 | ||
|
|
01fe642beb | ||
|
|
e70d57dcb4 | ||
|
|
fd41fba069 | ||
|
|
8a6fe0f321 | ||
|
|
ae73e8a305 | ||
|
|
a344c09d0d | ||
|
|
991e37d0bf | ||
|
|
fdeb884fe5 | ||
|
|
4b1f5c9c9b | ||
|
|
6b513a0f95 | ||
|
|
b574aaf99c | ||
|
|
bc0cdaa669 | ||
|
|
f9106b77bb | ||
|
|
a0419e4f34 | ||
|
|
46a549c875 | ||
|
|
f8a609f692 | ||
|
|
987497bb10 | ||
|
|
e537878b8a | ||
|
|
617f45bc59 | ||
|
|
fe744f8f81 | ||
|
|
93d879b297 | ||
|
|
dbb9295063 | ||
|
|
09aa96e486 | ||
|
|
4d0047ae7c | ||
|
|
b860a4799d | ||
|
|
6ff64352d3 | ||
|
|
3683ec6a95 | ||
|
|
454fa9ee9b | ||
|
|
d33aeb4bb2 | ||
|
|
5f9f23eb3f | ||
|
|
5dbc7a8ca4 | ||
|
|
33a5968eb7 | ||
|
|
5ff34b93c0 | ||
|
|
098fdf0596 | ||
|
|
2eb929fe05 | ||
|
|
ea0ed9e844 | ||
|
|
4a3e481a83 | ||
|
|
2197cd8620 | ||
|
|
cf0d3b5f61 | ||
|
|
6f7ab49346 | ||
|
|
000e0358a7 | ||
|
|
a3e19931f0 | ||
|
|
9fec1a86cf | ||
|
|
ffab29890b | ||
|
|
206c068d8e | ||
|
|
dc30cd1112 | ||
|
|
412a245e88 | ||
|
|
16290bf66f | ||
|
|
4f8b0e6484 | ||
|
|
5026dbc1b3 | ||
|
|
014e4b0e1d | ||
|
|
14a6947b02 | ||
|
|
665a914dc3 | ||
|
|
8feac310af | ||
|
|
3394bb4b8d | ||
|
|
1dd2bd0013 | ||
|
|
5c62726992 | ||
|
|
90981f628e | ||
|
|
0c34189d94 | ||
|
|
f1d3d6a7b5 | ||
|
|
b0d962b49a | ||
|
|
c50e453af6 | ||
|
|
efbaf02016 | ||
|
|
3cf809e99d | ||
|
|
8b649aaaf8 | ||
|
|
fdebbc4498 | ||
|
|
3ff3417ff2 | ||
|
|
bb6227281a | ||
|
|
2f44d99a74 | ||
|
|
ca4414d15a | ||
|
|
fbb961b43c | ||
|
|
fa9c174264 | ||
|
|
83f43ab166 | ||
|
|
f7e9e6a1c4 | ||
|
|
aa21748e9a | ||
|
|
a2f4e08b00 | ||
|
|
66bc29d075 | ||
|
|
e3eebe537b | ||
|
|
3ed625f949 | ||
|
|
a1e414c3b7 | ||
|
|
a5a35b1fa6 | ||
|
|
2a24584d45 | ||
|
|
6039cdceb0 | ||
|
|
473159be0f | ||
|
|
0e6ad548b2 | ||
|
|
6143515ac6 | ||
|
|
50419f200d | ||
|
|
455390f121 | ||
|
|
d375299fa9 | ||
|
|
28db337166 | ||
|
|
d5e1d56fde | ||
|
|
6ca9a599ff | ||
|
|
83bd3b6f0b | ||
|
|
a68765e021 | ||
|
|
f5ed9129cd | ||
|
|
5e3115a614 | ||
|
|
624c46f925 | ||
|
|
52d1ee161f | ||
|
|
d3bc9eb110 | ||
|
|
72b61a29c2 | ||
|
|
a99fcfe54f | ||
|
|
b5d139f7b2 | ||
|
|
463ed12ce8 | ||
|
|
baf74cb582 | ||
|
|
63d7cffefe | ||
|
|
d7d74666b2 | ||
|
|
078d76c6f3 | ||
|
|
3539ee9be6 | ||
|
|
437282b148 | ||
|
|
5394b747a1 | ||
|
|
dd1dd3b7cf | ||
|
|
ae77d4ad22 | ||
|
|
821987fed7 | ||
|
|
18ddba4332 | ||
|
|
aaad6dece6 | ||
|
|
ed04747b9d | ||
|
|
827a88d772 | ||
|
|
24e325db62 | ||
|
|
38e43bc9c8 | ||
|
|
c3c5c7ae63 | ||
|
|
578a15bbe5 | ||
|
|
6b3d7372ae | ||
|
|
55f7529167 | ||
|
|
bceae244c1 | ||
|
|
5de224d6bf | ||
|
|
694b936f30 | ||
|
|
dda25d431c | ||
|
|
22f9abc2f1 | ||
|
|
c6c3de9164 | ||
|
|
58186f0283 | ||
|
|
0253e2d3f6 | ||
|
|
ee20d5b804 | ||
|
|
3a5295dbb9 | ||
|
|
39f14fd952 | ||
|
|
4d59df9f59 | ||
|
|
b8bc114502 | ||
|
|
74d29770e1 | ||
|
|
e4d5788cdc | ||
|
|
2a5cf3e4a8 | ||
|
|
c348736058 | ||
|
|
5bb20cb039 | ||
|
|
dd602a27b5 | ||
|
|
2067de162a | ||
|
|
2cc106b43e | ||
|
|
b15bfd99b3 | ||
|
|
67252b90b3 | ||
|
|
079f7e515c | ||
|
|
e8c58270c4 | ||
|
|
0c64f278d7 | ||
|
|
03518ec94f | ||
|
|
93b5dc2dff | ||
|
|
3bef6383d9 | ||
|
|
605ccf3e02 | ||
|
|
17892238a9 | ||
|
|
b678c989e2 | ||
|
|
b72d1237d2 | ||
|
|
f7b6db5dad | ||
|
|
b744a0cc38 | ||
|
|
b918499f14 | ||
|
|
2cfd054f2c | ||
|
|
dddc7ab039 | ||
|
|
2e4d8cdc8b | ||
|
|
0640bec026 | ||
|
|
cbcee5fb45 | ||
|
|
47460d86b2 | ||
|
|
3cd74f0d4f | ||
|
|
690c9f7c6f | ||
|
|
e2718e5a12 | ||
|
|
d9fefe757e | ||
|
|
55e4bf6b65 | ||
|
|
0176e5cf18 | ||
|
|
4670b12d49 | ||
|
|
321ec8ae4d | ||
|
|
1ccbb8d10b | ||
|
|
86c0accdce | ||
|
|
38d6c29ce9 | ||
|
|
0cf9478cd4 | ||
|
|
a04abd304a | ||
|
|
84aec9fe31 | ||
|
|
593b9bb6c5 | ||
|
|
d3a9cc8fde | ||
|
|
87a434c377 | ||
|
|
56022c9442 | ||
|
|
593d6bf466 | ||
|
|
29a4366dcf | ||
|
|
0a42f414bf | ||
|
|
9b2ac4349e | ||
|
|
2d4c7729ad | ||
|
|
6ecab66b0e | ||
|
|
1dded57a1c | ||
|
|
1d6104ecf3 | ||
|
|
14da941ff4 | ||
|
|
06b87311ea | ||
|
|
3b31773117 | ||
|
|
9c87fe79ea | ||
|
|
bd00112562 | ||
|
|
1c9160c37d | ||
|
|
e2ef88229f | ||
|
|
fd7b889a0f | ||
|
|
a7aa056ec1 | ||
|
|
4f74acb2d3 | ||
|
|
22ef1be82b | ||
|
|
9ddbf255ba | ||
|
|
dfb171d32a | ||
|
|
6b4ffcff5a | ||
|
|
d31cd2e5d6 | ||
|
|
396c74e6c6 | ||
|
|
609c658a9b | ||
|
|
ee6bb40736 | ||
|
|
f8c5ea2b42 | ||
|
|
923eb9fdb3 | ||
|
|
2cd3ebbdb3 | ||
|
|
5e25e30330 | ||
|
|
5aa2a8f60f | ||
|
|
0a1e302e8a | ||
|
|
bb705a77cf | ||
|
|
cb6155b946 | ||
|
|
714d1cc993 | ||
|
|
bc8e4494c4 | ||
|
|
c3a064f980 | ||
|
|
eb3feb7dbd | ||
|
|
da3f3ccac9 | ||
|
|
1a1871e8cd | ||
|
|
c22ab7e1fc | ||
|
|
436992b069 | ||
|
|
18cb3912e5 | ||
|
|
a818b0ba02 | ||
|
|
3716b6f988 | ||
|
|
c9e4e78f41 | ||
|
|
9b4e8bf64b | ||
|
|
5aebefe73f | ||
|
|
8f2124beab | ||
|
|
8b8b43df28 | ||
|
|
c42b991bc9 | ||
|
|
ec08333bf9 | ||
|
|
9e5b4e14c9 | ||
|
|
1f5ed89a88 | ||
|
|
2304a2bc2e | ||
|
|
dc82105226 | ||
|
|
5221f3ddc9 | ||
|
|
e970deb92b | ||
|
|
9db7ec6bb0 | ||
|
|
2e691b6655 | ||
|
|
f22e10537b | ||
|
|
6e532c494c | ||
|
|
f9ed0d4aa2 | ||
|
|
78b1afcc8c | ||
|
|
40340cf9c2 | ||
|
|
eb6437050f | ||
|
|
45ebfe378b | ||
|
|
1326597226 | ||
|
|
751da92c13 | ||
|
|
e10ca637da | ||
|
|
c5d9d71a8a | ||
|
|
3e0f5d231d | ||
|
|
6990f177ba | ||
|
|
98e713166b | ||
|
|
4c91ae0085 | ||
|
|
43f74d4d5a | ||
|
|
8c3e716c3f | ||
|
|
05946125b5 | ||
|
|
1e2a0a4549 | ||
|
|
f9f5084dd7 | ||
|
|
b7e7c6db7b | ||
|
|
f9d67b28ec | ||
|
|
46b77cc280 | ||
|
|
2f10decf56 | ||
|
|
678a1ae0fb | ||
|
|
51cbffd097 | ||
|
|
207b13dcab | ||
|
|
3052dbd1e8 | ||
|
|
5891b1ceb2 | ||
|
|
07e14ddda8 | ||
|
|
db5e90787c | ||
|
|
67e501f5c7 | ||
|
|
2160001167 | ||
|
|
f5f4150d17 | ||
|
|
887f292612 | ||
|
|
f5f282af97 | ||
|
|
82f9585b7a | ||
|
|
eb561bb0c2 | ||
|
|
81207999eb | ||
|
|
2fef595b83 | ||
|
|
2024e790ca | ||
|
|
f9925c7374 | ||
|
|
dd774b8dfd | ||
|
|
064b8042a5 | ||
|
|
7923ed9567 | ||
|
|
30b83414ef | ||
|
|
990906c57f | ||
|
|
4c323a666a | ||
|
|
a3f165d374 | ||
|
|
4977f9e6b4 | ||
|
|
7d5f51e357 | ||
|
|
371a339b18 | ||
|
|
7e7aee27b6 | ||
|
|
53148fe58f | ||
|
|
56b6de6962 | ||
|
|
44735681af | ||
|
|
ee1c4f4fdc | ||
|
|
fb6ecdde1e | ||
|
|
861166d8a9 | ||
|
|
70dca81c40 | ||
|
|
2774d72888 | ||
|
|
2440ffbfc9 | ||
|
|
77c5dde320 | ||
|
|
aa49cad279 | ||
|
|
f56ae240ab | ||
|
|
e871a30a78 | ||
|
|
30e6984889 | ||
|
|
324932c758 | ||
|
|
421800bc8f | ||
|
|
86fb47b2b4 | ||
|
|
715f83bf84 | ||
|
|
87bf5c2418 | ||
|
|
5c9af1c613 | ||
|
|
765e0e5c6b | ||
|
|
cc296e16dc | ||
|
|
ab9901525b | ||
|
|
3643a46a0c | ||
|
|
d467e6869d | ||
|
|
db36018849 | ||
|
|
3c5c375f71 | ||
|
|
7473d8c9aa | ||
|
|
33645d7f09 | ||
|
|
9f1106b14a | ||
|
|
3dd952b49b | ||
|
|
6b85bd2cb8 | ||
|
|
60b164c853 | ||
|
|
40c8a1bc1d | ||
|
|
22de695f12 | ||
|
|
e91f588cd7 | ||
|
|
7b72d91549 | ||
|
|
b3c2e86436 | ||
|
|
908bdc7624 | ||
|
|
21c1ec9c8c | ||
|
|
6d7d71bb16 | ||
|
|
6eba061c2a | ||
|
|
f184f550b9 | ||
|
|
bb7c0fef20 | ||
|
|
5c15a12116 | ||
|
|
68d015763e | ||
|
|
7faa732f38 | ||
|
|
11f9eeabf1 | ||
|
|
a152f36894 | ||
|
|
d4ede6ff01 | ||
|
|
35542d803c | ||
|
|
f6ba776c12 | ||
|
|
1511dcb309 | ||
|
|
35afa98112 | ||
|
|
df62b40ca7 | ||
|
|
9f1a125ed9 | ||
|
|
b7e20b9b86 | ||
|
|
a5d6972913 | ||
|
|
e4cb42c599 | ||
|
|
0a34f1f3ad | ||
|
|
7bdeaa9611 | ||
|
|
ab2577ce0a | ||
|
|
34544be423 | ||
|
|
6bf0fdd344 | ||
|
|
6a177cdd1c | ||
|
|
a51ef0cfc6 | ||
|
|
48374d97df | ||
|
|
bf3d7e74f5 | ||
|
|
ab3f3890e4 | ||
|
|
dceb0fb8c5 | ||
|
|
05c1856389 | ||
|
|
dc5cba60d1 | ||
|
|
70409dcdcc | ||
|
|
a92c29e04c | ||
|
|
c4b4dc79cf | ||
|
|
510fe43ec4 | ||
|
|
73e572b66b | ||
|
|
a272a2cb7e | ||
|
|
43b990afe6 | ||
|
|
90130b5492 | ||
|
|
f22faaefeb | ||
|
|
ac25649425 | ||
|
|
04388325a8 | ||
|
|
61ec873842 | ||
|
|
ea1f2d4e26 | ||
|
|
4211c733a2 | ||
|
|
450266818a | ||
|
|
1e019157bb | ||
|
|
c9a1066f02 | ||
|
|
0062f7d764 | ||
|
|
95e994e171 | ||
|
|
31242401e5 | ||
|
|
19cc1c3b3f | ||
|
|
03bcdceb9b | ||
|
|
33ca836ad0 | ||
|
|
53f19e4050 | ||
|
|
54b7d46f5a | ||
|
|
40e6d675c5 | ||
|
|
73b77c83b8 | ||
|
|
632d41e50c | ||
|
|
17acadbfb9 | ||
|
|
2ab5924ec9 | ||
|
|
ac09a4cf0f | ||
|
|
c10ee59de3 | ||
|
|
afad405ed9 | ||
|
|
5a35de8dc9 | ||
|
|
58cf26c304 | ||
|
|
a2de5564ac | ||
|
|
338b17ccf1 | ||
|
|
843a968959 | ||
|
|
dc45c13eef | ||
|
|
0d6e801595 | ||
|
|
2cd50ebaee | ||
|
|
cb6f6a6596 | ||
|
|
e4ab0acc92 | ||
|
|
10237c41d3 | ||
|
|
ac2c6c6010 | ||
|
|
c6b2ce93c4 | ||
|
|
401b7fe883 | ||
|
|
f567417bb3 | ||
|
|
ae5cb3bbe7 | ||
|
|
0eb8e15796 | ||
|
|
1c95c7856f | ||
|
|
daf7551e59 | ||
|
|
5b63d3692e | ||
|
|
5f9972af78 | ||
|
|
1be4cce074 | ||
|
|
935e93eb36 | ||
|
|
5d924cd35a | ||
|
|
9685754511 | ||
|
|
88145eaf94 | ||
|
|
1b3c3fae89 | ||
|
|
fde79eecc6 | ||
|
|
a518320e3b | ||
|
|
f6a09f59a3 | ||
|
|
a2c28d0837 | ||
|
|
2ff6f9d346 | ||
|
|
975d5f44b6 | ||
|
|
260564345a | ||
|
|
305a654a37 | ||
|
|
d510f7e473 | ||
|
|
b992fbab52 | ||
|
|
ddf3774aec | ||
|
|
814f854c5a | ||
|
|
d3bbdb1011 | ||
|
|
d6d9f05443 | ||
|
|
13e09e231d | ||
|
|
7866f644d3 | ||
|
|
84de3f081f | ||
|
|
f0725c9b40 | ||
|
|
f176f1909b | ||
|
|
d231f944c0 | ||
|
|
cc48436794 | ||
|
|
ea51fc8410 | ||
|
|
c212a30d33 | ||
|
|
670bf16cd0 |
39
.editorconfig
Normal file
39
.editorconfig
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
# Unix style files
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[Makefile,Makefile.*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.cmd]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = crlf
|
||||||
|
|
||||||
|
[*.{h,cpp}]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.rc]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.{md,markdown}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.patch]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build/build_mingw.cmd eol=crlf
|
||||||
61
.github/workflows/build-deb.yml
vendored
Normal file
61
.github/workflows/build-deb.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
name: Build Debian packages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build-deb.yml
|
||||||
|
- contrib/**
|
||||||
|
- daemon/**
|
||||||
|
- debian/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Makefile
|
||||||
|
- Makefile.linux
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: ${{ matrix.dist }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
dist: ['buster', 'bullseye', 'bookworm']
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Commit Hash
|
||||||
|
id: commit
|
||||||
|
uses: prompt/actions-commit-hash@v3.0.0
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
uses: jtdor/build-deb-action@v1
|
||||||
|
with:
|
||||||
|
docker-image: debian:${{ matrix.dist }}-slim
|
||||||
|
buildpackage-opts: --build=binary --no-sign
|
||||||
|
before-build-hook: debchange --controlmaint --local "+${{ steps.commit.outputs.short }}~${{ matrix.dist }}" -b --distribution ${{ matrix.dist }} "CI build"
|
||||||
|
extra-build-deps: devscripts git
|
||||||
|
|
||||||
|
- name: Upload package
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i2pd_${{ matrix.dist }}
|
||||||
|
path: debian/artifacts/i2pd_*.deb
|
||||||
|
|
||||||
|
- name: Upload debugging symbols
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i2pd-dbgsym_${{ matrix.dist }}
|
||||||
|
path: debian/artifacts/i2pd-dbgsym_*.deb
|
||||||
39
.github/workflows/build-freebsd.yml
vendored
39
.github/workflows/build-freebsd.yml
vendored
@@ -1,21 +1,50 @@
|
|||||||
name: Build on FreeBSD
|
name: Build on FreeBSD
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build-freebsd.yml
|
||||||
|
- build/CMakeLists.txt
|
||||||
|
- build/cmake_modules/**
|
||||||
|
- daemon/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Makefile
|
||||||
|
- Makefile.bsd
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-10.15
|
runs-on: ubuntu-latest
|
||||||
name: with UPnP
|
name: with UPnP
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Test in FreeBSD
|
- name: Test in FreeBSD
|
||||||
id: test
|
id: test
|
||||||
uses: vmactions/freebsd-vm@v0.1.5
|
uses: vmactions/freebsd-vm@v1
|
||||||
with:
|
with:
|
||||||
usesh: true
|
usesh: true
|
||||||
mem: 2048
|
mem: 2048
|
||||||
prepare: pkg install -y devel/cmake devel/gmake devel/boost-libs security/openssl net/miniupnpc
|
sync: rsync
|
||||||
|
copyback: true
|
||||||
|
prepare: pkg install -y devel/cmake devel/gmake devel/boost-libs security/openssl net/miniupnpc
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake -DWITH_UPNP=ON -DCMAKE_BUILD_TYPE=Release .
|
cmake -DWITH_UPNP=ON -DCMAKE_BUILD_TYPE=Release .
|
||||||
gmake -j2
|
gmake -j2
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i2pd-freebsd
|
||||||
|
path: build/i2pd
|
||||||
|
|||||||
33
.github/workflows/build-osx.yml
vendored
33
.github/workflows/build-osx.yml
vendored
@@ -1,20 +1,45 @@
|
|||||||
name: Build on OSX
|
name: Build on OSX
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build-osx.yml
|
||||||
|
- daemon/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Makefile
|
||||||
|
- Makefile.homebrew
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: With USE_UPNP=${{ matrix.with_upnp }}
|
name: With USE_UPNP=${{ matrix.with_upnp }}
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
with_upnp: ['yes', 'no']
|
with_upnp: ['yes', 'no']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
- name: install packages
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install required formulae
|
||||||
run: |
|
run: |
|
||||||
|
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
|
||||||
brew update
|
brew update
|
||||||
brew install boost miniupnpc openssl@1.1
|
brew install boost miniupnpc openssl@1.1
|
||||||
- name: build application
|
|
||||||
|
- name: List installed formulae
|
||||||
|
run: brew list
|
||||||
|
|
||||||
|
- name: Build application
|
||||||
run: make HOMEBREW=1 USE_UPNP=${{ matrix.with_upnp }} PREFIX=$GITHUB_WORKSPACE/output -j3
|
run: make HOMEBREW=1 USE_UPNP=${{ matrix.with_upnp }} PREFIX=$GITHUB_WORKSPACE/output -j3
|
||||||
|
|||||||
80
.github/workflows/build-windows-msvc.yml-disabled
vendored
Normal file
80
.github/workflows/build-windows-msvc.yml-disabled
vendored
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
name: Build on Windows with MSVC
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build-windows-msvc.yml
|
||||||
|
- build/CMakeLists.txt
|
||||||
|
- build/cmake_modules/**
|
||||||
|
- daemon/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Win32/**
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
boost_path: ${{ github.workspace }}\boost_1_83_0
|
||||||
|
openssl_path: ${{ github.workspace }}\openssl_3_2_1
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Build and install zlib
|
||||||
|
run: |
|
||||||
|
powershell -Command "(Invoke-WebRequest -Uri https://raw.githubusercontent.com/r4sas/zlib.install/master/install.bat -OutFile install_zlib.bat)"
|
||||||
|
powershell -Command "(Get-Content install_zlib.bat) | Set-Content install_zlib.bat" # fixing line endings
|
||||||
|
set BUILD_TYPE=Debug
|
||||||
|
./install_zlib.bat
|
||||||
|
set BUILD_TYPE=Release
|
||||||
|
./install_zlib.bat
|
||||||
|
del install_zlib.bat
|
||||||
|
|
||||||
|
- name: Install Boost
|
||||||
|
run: |
|
||||||
|
powershell -Command "(Start-BitsTransfer -Source https://sourceforge.net/projects/boost/files/boost-binaries/1.83.0/boost_1_83_0-msvc-14.3-64.exe/download -Destination boost_1_83_0-msvc-14.3-64.exe)"
|
||||||
|
./boost_1_83_0-msvc-14.3-64.exe /DIR="${{env.boost_path}}" /VERYSILENT /SUPPRESSMSGBOXES /SP-
|
||||||
|
|
||||||
|
- name: Install OpenSSL
|
||||||
|
run: |
|
||||||
|
powershell -Command "(Start-BitsTransfer -Source https://slproweb.com/download/Win64OpenSSL-3_2_1.exe -Destination Win64OpenSSL-3_2_1.exe)"
|
||||||
|
./Win64OpenSSL-3_2_1.exe /DIR="${{env.openssl_path}}" /TASKS="copytobin" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
|
||||||
|
|
||||||
|
- name: Make copy of the OpenSSL libraries for CMake
|
||||||
|
run: |
|
||||||
|
dir ${{ github.workspace }}
|
||||||
|
dir ${{env.openssl_path}}\lib\VC
|
||||||
|
dir ${{env.openssl_path}}\lib\VC\x64\
|
||||||
|
dir ${{env.openssl_path}}\lib\VC\x64\MTd\
|
||||||
|
xcopy /s /y "${{env.openssl_path}}\lib\VC\x64\MTd" "${{env.openssl_path}}\lib"
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
working-directory: build
|
||||||
|
run: cmake -DBoost_ROOT="${{env.boost_path}}" -DOPENSSL_ROOT_DIR="${{env.openssl_path}}" -DWITH_STATIC=ON .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: build
|
||||||
|
run: cmake --build . --config Debug -- -m
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i2pd-msvc
|
||||||
|
path: build/Debug/i2pd.*
|
||||||
|
|
||||||
230
.github/workflows/build-windows.yml
vendored
230
.github/workflows/build-windows.yml
vendored
@@ -1,6 +1,25 @@
|
|||||||
name: Build on Windows
|
name: Build on Windows
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build-windows.yml
|
||||||
|
- build/CMakeLists.txt
|
||||||
|
- build/cmake_modules/**
|
||||||
|
- daemon/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Win32/**
|
||||||
|
- Makefile
|
||||||
|
- Makefile.mingw
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -8,29 +27,224 @@ defaults:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Building using ${{ matrix.arch }} toolchain
|
name: ${{ matrix.arch }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include: [
|
include: [
|
||||||
{ msystem: MINGW64, arch: x86_64, arch_short: x64 },
|
{ msystem: UCRT64, arch: ucrt-x86_64, arch_short: x64-ucrt, compiler: gcc },
|
||||||
{ msystem: MINGW32, arch: i686, arch_short: x86 }
|
{ msystem: CLANG64, arch: clang-x86_64, arch_short: x64-clang, compiler: clang },
|
||||||
|
{ msystem: MINGW64, arch: x86_64, arch_short: x64, compiler: gcc },
|
||||||
|
{ msystem: MINGW32, arch: i686, arch_short: x86, compiler: gcc }
|
||||||
]
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup MSYS2
|
- name: Setup MSYS2
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
msystem: ${{ matrix.msystem }}
|
msystem: ${{ matrix.msystem }}
|
||||||
install: base-devel mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-boost mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-miniupnpc
|
install: base-devel git mingw-w64-${{ matrix.arch }}-${{ matrix.compiler }} mingw-w64-${{ matrix.arch }}-boost mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-miniupnpc
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
|
- name: Install additional clang packages
|
||||||
|
if: ${{ matrix.msystem == 'CLANG64' }}
|
||||||
|
run: pacman --noconfirm -S mingw-w64-${{ matrix.arch }}-gcc-compat
|
||||||
|
|
||||||
- name: Build application
|
- name: Build application
|
||||||
run: |
|
run: |
|
||||||
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
||||||
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes -j3
|
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes -j3
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: i2pd-${{ matrix.arch_short }}.exe
|
name: i2pd-${{ matrix.arch_short }}.exe
|
||||||
path: i2pd.exe
|
path: i2pd.exe
|
||||||
|
|
||||||
|
build-cmake:
|
||||||
|
name: CMake ${{ matrix.arch }}
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include: [
|
||||||
|
{ msystem: UCRT64, arch: ucrt-x86_64, arch_short: x64-ucrt, compiler: gcc },
|
||||||
|
{ msystem: CLANG64, arch: clang-x86_64, arch_short: x64-clang, compiler: clang },
|
||||||
|
{ msystem: MINGW64, arch: x86_64, arch_short: x64, compiler: gcc },
|
||||||
|
{ msystem: MINGW32, arch: i686, arch_short: x86, compiler: gcc }
|
||||||
|
]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup MSYS2
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: ${{ matrix.msystem }}
|
||||||
|
install: base-devel git mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-ninja mingw-w64-${{ matrix.arch }}-${{ matrix.compiler }} mingw-w64-${{ matrix.arch }}-boost mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-miniupnpc
|
||||||
|
update: true
|
||||||
|
|
||||||
|
- name: Build application
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cmake -DWITH_GIT_VERSION=ON -DWITH_STATIC=ON -DWITH_UPNP=ON -DCMAKE_BUILD_TYPE=Release .
|
||||||
|
cmake --build . -- -j3
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i2pd-cmake-${{ matrix.arch_short }}.exe
|
||||||
|
path: build/i2pd.exe
|
||||||
|
|
||||||
|
build-xp:
|
||||||
|
name: XP
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup MSYS2
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: MINGW32
|
||||||
|
install: base-devel git mingw-w64-i686-gcc mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-miniupnpc
|
||||||
|
cache: true
|
||||||
|
update: true
|
||||||
|
|
||||||
|
- name: Clone MinGW packages repository and revert boost to 1.85.0
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/msys2/MINGW-packages
|
||||||
|
cd MINGW-packages
|
||||||
|
git checkout 4cbb366edf2f268ac3146174b40ce38604646fc5 mingw-w64-boost
|
||||||
|
cd mingw-w64-boost
|
||||||
|
sed -i 's/boostorg.jfrog.io\/artifactory\/main/archives.boost.io/' PKGBUILD
|
||||||
|
|
||||||
|
# headers
|
||||||
|
- name: Get headers package version
|
||||||
|
id: version-headers
|
||||||
|
run: |
|
||||||
|
echo "version=$(pacman -Si mingw-w64-i686-headers-git | grep -Po '^Version\s*: \K.+')" >> $GITHUB_OUTPUT
|
||||||
|
- name: Cache headers package
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-headers
|
||||||
|
with:
|
||||||
|
path: MINGW-packages/mingw-w64-headers-git/*.zst
|
||||||
|
key: winxp-headers-${{ steps.version-headers.outputs.version }}
|
||||||
|
- name: Build WinXP-capable headers package
|
||||||
|
if: steps.cache-headers.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd MINGW-packages/mingw-w64-headers-git
|
||||||
|
sed -i 's/0x601/0x501/' PKGBUILD
|
||||||
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm --nocheck
|
||||||
|
- name: Install headers package
|
||||||
|
run: pacman --noconfirm -U MINGW-packages/mingw-w64-headers-git/mingw-w64-i686-*-any.pkg.tar.zst
|
||||||
|
|
||||||
|
# CRT
|
||||||
|
- name: Get crt package version
|
||||||
|
id: version-crt
|
||||||
|
run: |
|
||||||
|
echo "version=$(pacman -Si mingw-w64-i686-crt-git | grep -Po '^Version\s*: \K.+')" >> $GITHUB_OUTPUT
|
||||||
|
- name: Cache crt package
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-crt
|
||||||
|
with:
|
||||||
|
path: MINGW-packages/mingw-w64-crt-git/*.zst
|
||||||
|
key: winxp-crt-${{ steps.version-crt.outputs.version }}
|
||||||
|
- name: Build WinXP-capable crt package
|
||||||
|
if: steps.cache-crt.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd MINGW-packages/mingw-w64-crt-git
|
||||||
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm --nocheck
|
||||||
|
- name: Install crt package
|
||||||
|
run: pacman --noconfirm -U MINGW-packages/mingw-w64-crt-git/mingw-w64-i686-*-any.pkg.tar.zst
|
||||||
|
|
||||||
|
# winpthreads
|
||||||
|
- name: Get winpthreads package version
|
||||||
|
id: version-winpthreads
|
||||||
|
run: |
|
||||||
|
echo "version=$(pacman -Si mingw-w64-i686-winpthreads-git | grep -Po '^Version\s*: \K.+')" >> $GITHUB_OUTPUT
|
||||||
|
- name: Cache winpthreads package
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-winpthreads
|
||||||
|
with:
|
||||||
|
path: MINGW-packages/mingw-w64-winpthreads-git/*.zst
|
||||||
|
key: winxp-winpthreads-${{ steps.version-winpthreads.outputs.version }}
|
||||||
|
- name: Build WinXP-capable winpthreads package
|
||||||
|
if: steps.cache-winpthreads.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd MINGW-packages/mingw-w64-winpthreads-git
|
||||||
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm --nocheck
|
||||||
|
- name: Install winpthreads package
|
||||||
|
run: pacman --noconfirm -U MINGW-packages/mingw-w64-winpthreads-git/mingw-w64-i686-*-any.pkg.tar.zst
|
||||||
|
|
||||||
|
# OpenSSL
|
||||||
|
- name: Get openssl package version
|
||||||
|
id: version-openssl
|
||||||
|
run: |
|
||||||
|
echo "version=$(pacman -Si mingw-w64-i686-openssl | grep -Po '^Version\s*: \K.+')" >> $GITHUB_OUTPUT
|
||||||
|
- name: Cache openssl package
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-openssl
|
||||||
|
with:
|
||||||
|
path: MINGW-packages/mingw-w64-openssl/*.zst
|
||||||
|
key: winxp-openssl-${{ steps.version-openssl.outputs.version }}
|
||||||
|
- name: Build WinXP-capable openssl package
|
||||||
|
if: steps.cache-openssl.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd MINGW-packages/mingw-w64-openssl
|
||||||
|
gpg --recv-keys D894E2CE8B3D79F5
|
||||||
|
gpg --recv-keys 216094DFD0CB81EF
|
||||||
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm --nocheck
|
||||||
|
- name: Install openssl package
|
||||||
|
run: pacman --noconfirm -U MINGW-packages/mingw-w64-openssl/mingw-w64-i686-*-any.pkg.tar.zst
|
||||||
|
|
||||||
|
# Boost
|
||||||
|
#- name: Get boost package version
|
||||||
|
# id: version-boost
|
||||||
|
# run: |
|
||||||
|
# echo "version=$(pacman -Si mingw-w64-i686-boost | grep -Po '^Version\s*: \K.+')" >> $GITHUB_OUTPUT
|
||||||
|
- name: Cache boost package
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-boost
|
||||||
|
with:
|
||||||
|
path: MINGW-packages/mingw-w64-boost/*.zst
|
||||||
|
key: winxp-boost-1.85.0+crt-${{ steps.version-headers.outputs.version }}+ossl-${{ steps.version-openssl.outputs.version }}
|
||||||
|
# Rebuild package if packages above has changed
|
||||||
|
- name: Build WinXP-capable boost package
|
||||||
|
if: steps.cache-boost.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd MINGW-packages/mingw-w64-boost
|
||||||
|
MINGW_ARCH=mingw32 makepkg-mingw -sCLf --noconfirm --nocheck
|
||||||
|
- name: Remove boost packages
|
||||||
|
run: pacman --noconfirm -R mingw-w64-i686-boost mingw-w64-i686-boost-libs
|
||||||
|
- name: Install boost package
|
||||||
|
run: pacman --noconfirm -U MINGW-packages/mingw-w64-boost/mingw-w64-i686-*-any.pkg.tar.zst
|
||||||
|
|
||||||
|
# Building i2pd
|
||||||
|
- name: Build application
|
||||||
|
run: |
|
||||||
|
mkdir -p obj/Win32 obj/libi2pd obj/libi2pd_client obj/daemon
|
||||||
|
make USE_UPNP=yes DEBUG=no USE_GIT_VERSION=yes USE_WINXP_FLAGS=yes -j3
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i2pd-xp.exe
|
||||||
|
path: i2pd.exe
|
||||||
|
|||||||
93
.github/workflows/build.yml
vendored
93
.github/workflows/build.yml
vendored
@@ -1,88 +1,67 @@
|
|||||||
name: Build on Ubuntu
|
name: Build on Ubuntu
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- .github/workflows/build.yml
|
||||||
|
- build/CMakeLists.txt
|
||||||
|
- build/cmake_modules/**
|
||||||
|
- daemon/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Makefile
|
||||||
|
- Makefile.linux
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-make:
|
build-make:
|
||||||
name: Make with USE_UPNP=${{ matrix.with_upnp }}
|
name: Make with USE_UPNP=${{ matrix.with_upnp }}
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
with_upnp: ['yes', 'no']
|
with_upnp: ['yes', 'no']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: install packages
|
- name: install packages
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository ppa:mhier/libboost-latest
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install build-essential libboost1.74-dev libminiupnpc-dev libssl-dev zlib1g-dev
|
sudo apt-get install build-essential libboost-all-dev libminiupnpc-dev libssl-dev zlib1g-dev
|
||||||
|
|
||||||
- name: build application
|
- name: build application
|
||||||
run: make USE_UPNP=${{ matrix.with_upnp }} -j3
|
run: make USE_UPNP=${{ matrix.with_upnp }} -j3
|
||||||
|
|
||||||
build-cmake:
|
build-cmake:
|
||||||
name: CMake with -DWITH_UPNP=${{ matrix.with_upnp }}
|
name: CMake with -DWITH_UPNP=${{ matrix.with_upnp }}
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
with_upnp: ['ON', 'OFF']
|
with_upnp: ['ON', 'OFF']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: install packages
|
- name: install packages
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository ppa:mhier/libboost-latest
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install build-essential cmake libboost1.74-dev libminiupnpc-dev libssl-dev zlib1g-dev
|
sudo apt-get install build-essential cmake libboost-all-dev libminiupnpc-dev libssl-dev zlib1g-dev
|
||||||
|
|
||||||
- name: build application
|
- name: build application
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake -DWITH_UPNP=${{ matrix.with_upnp }} .
|
cmake -DWITH_UPNP=${{ matrix.with_upnp }} .
|
||||||
make -j3
|
make -j3
|
||||||
build-deb-stretch:
|
|
||||||
name: Build package for stretch
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: change debian changelog
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install devscripts
|
|
||||||
debchange -v "`git describe --tags`-stretch" -b -M --distribution stretch "trunk build"
|
|
||||||
- uses: singingwolfboy/build-dpkg-stretch@v1
|
|
||||||
id: build
|
|
||||||
with:
|
|
||||||
args: --unsigned-source --unsigned-changes -b
|
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ steps.build.outputs.filename }}
|
|
||||||
path: ${{ steps.build.outputs.filename }}
|
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ steps.build.outputs.filename-dbgsym }}
|
|
||||||
path: ${{ steps.build.outputs.filename-dbgsym }}
|
|
||||||
build-deb-buster:
|
|
||||||
name: Build package for buster
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: change debian changelog
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install devscripts
|
|
||||||
debchange -v "`git describe --tags`-buster" -b -M --distribution buster "trunk build"
|
|
||||||
- uses: singingwolfboy/build-dpkg-buster@v1
|
|
||||||
id: build
|
|
||||||
with:
|
|
||||||
args: --unsigned-source --unsigned-changes -b
|
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ steps.build.outputs.filename }}
|
|
||||||
path: ${{ steps.build.outputs.filename }}
|
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ steps.build.outputs.filename-dbgsym }}
|
|
||||||
path: ${{ steps.build.outputs.filename-dbgsym }}
|
|
||||||
|
|||||||
169
.github/workflows/docker.yml
vendored
169
.github/workflows/docker.yml
vendored
@@ -1,63 +1,140 @@
|
|||||||
name: Build containers
|
name: Build containers
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- openssl
|
||||||
|
- docker
|
||||||
|
paths:
|
||||||
|
- .github/workflows/docker.yml
|
||||||
|
- contrib/docker/**
|
||||||
|
- contrib/certificates/**
|
||||||
|
- daemon/**
|
||||||
|
- i18n/**
|
||||||
|
- libi2pd/**
|
||||||
|
- libi2pd_client/**
|
||||||
|
- Makefile
|
||||||
|
- Makefile.linux
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
build:
|
||||||
|
name: Building container for ${{ matrix.platform }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include: [
|
||||||
|
{ platform: 'linux/amd64', archname: 'amd64' },
|
||||||
|
{ platform: 'linux/386', archname: 'i386' },
|
||||||
|
{ platform: 'linux/arm64', archname: 'arm64' },
|
||||||
|
{ platform: 'linux/arm/v7', archname: 'armv7' },
|
||||||
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to GitHub Container registry
|
- name: Login to GitHub Container registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push trunk container
|
- name: Build container for ${{ matrix.archname }}
|
||||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
uses: docker/build-push-action@v5
|
||||||
uses: docker/build-push-action@v2
|
with:
|
||||||
with:
|
context: ./contrib/docker
|
||||||
context: ./contrib/docker
|
file: ./contrib/docker/Dockerfile
|
||||||
file: ./contrib/docker/Dockerfile
|
platforms: ${{ matrix.platform }}
|
||||||
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7
|
push: true
|
||||||
push: true
|
tags: |
|
||||||
tags: |
|
purplei2p/i2pd:latest-${{ matrix.archname }}
|
||||||
purplei2p/i2pd:latest
|
ghcr.io/purplei2p/i2pd:latest-${{ matrix.archname }}
|
||||||
ghcr.io/purplei2p/i2pd:latest
|
provenance: false
|
||||||
|
|
||||||
- name: Set env
|
push:
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
name: Pushing merged manifest
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
- name: Build and push release container
|
permissions:
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
packages: write
|
||||||
uses: docker/build-push-action@v2
|
contents: read
|
||||||
with:
|
|
||||||
context: ./contrib/docker
|
needs: build
|
||||||
file: ./contrib/docker/Dockerfile
|
|
||||||
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7
|
steps:
|
||||||
push: true
|
- name: Checkout
|
||||||
tags: |
|
uses: actions/checkout@v4
|
||||||
purplei2p/i2pd:latest
|
|
||||||
purplei2p/i2pd:release-${{ env.RELEASE_VERSION }}
|
- name: Set up QEMU
|
||||||
ghcr.io/purplei2p/i2pd:latest
|
uses: docker/setup-qemu-action@v3
|
||||||
ghcr.io/purplei2p/i2pd:release-${{ env.RELEASE_VERSION }}
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create and push latest manifest image to Docker Hub
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
inputs: purplei2p/i2pd:latest
|
||||||
|
images: purplei2p/i2pd:latest-amd64,purplei2p/i2pd:latest-i386,purplei2p/i2pd:latest-arm64,purplei2p/i2pd:latest-armv7
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Create and push latest manifest image to GHCR
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
inputs: ghcr.io/purplei2p/i2pd:latest
|
||||||
|
images: ghcr.io/purplei2p/i2pd:latest-amd64,ghcr.io/purplei2p/i2pd:latest-i386,ghcr.io/purplei2p/i2pd:latest-arm64,ghcr.io/purplei2p/i2pd:latest-armv7
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Store release version to env
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create and push release manifest to Docker Hub
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
inputs: purplei2p/i2pd:latest,purplei2p/i2pd:latest-release,purplei2p/i2pd:release-${{ env.RELEASE_VERSION }}
|
||||||
|
images: purplei2p/i2pd:latest-amd64,purplei2p/i2pd:latest-i386,purplei2p/i2pd:latest-arm64,purplei2p/i2pd:latest-armv7
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Create and push release manifest to GHCR
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
inputs: ghcr.io/purplei2p/i2pd:latest,ghcr.io/purplei2p/i2pd:latest-release,ghcr.io/purplei2p/i2pd:release-${{ env.RELEASE_VERSION }}
|
||||||
|
images: ghcr.io/purplei2p/i2pd:latest-amd64,ghcr.io/purplei2p/i2pd:latest-i386,ghcr.io/purplei2p/i2pd:latest-arm64,ghcr.io/purplei2p/i2pd:latest-armv7
|
||||||
|
push: true
|
||||||
|
|||||||
524
ChangeLog
524
ChangeLog
@@ -1,6 +1,526 @@
|
|||||||
# for this file format description,
|
# for this file format description,
|
||||||
# see https://github.com/olivierlacan/keep-a-changelog
|
# see https://github.com/olivierlacan/keep-a-changelog
|
||||||
|
|
||||||
|
## [2.56.0] - 2025-02-11
|
||||||
|
### Added
|
||||||
|
- Config params for shared local destination
|
||||||
|
- AddressBook full addresses cache
|
||||||
|
- Decline transit tunnel to duplicated router
|
||||||
|
- Recreate tunnels in random order
|
||||||
|
### Changed
|
||||||
|
- Exclude disk operations from SSU2 and NTCP2 threads
|
||||||
|
- Set minimal version for peer test to 0.9.62
|
||||||
|
- Send ack requested flag after second SSU2 resend attempt
|
||||||
|
- Shorter ECIESx25519 ack request interval for datagram and I2CP sessions
|
||||||
|
- Don't change datagram routing path too often if unidirectional data stream
|
||||||
|
- Reduce LeaseSet and local RouterInfo publishing confirmation intervals
|
||||||
|
- Don't delete buffer of connected routers or if an update received
|
||||||
|
- Smaller RouterInfo request timeout if sent directly
|
||||||
|
- Persist local RouterInfo in separate thread
|
||||||
|
- Don't recalculate and process ranges for every SSU2 Ack block
|
||||||
|
- Reseeds list
|
||||||
|
### Fixed
|
||||||
|
- Termination deadlock if SAM session is active
|
||||||
|
- Race condition at tunnel endpoint
|
||||||
|
- Inbound tunnel build encryption
|
||||||
|
|
||||||
|
## [2.55.0] - 2024-12-30
|
||||||
|
### Added
|
||||||
|
- Support boost 1.87
|
||||||
|
- "i2p.streaming.maxConcurrentStreams" tunnel's param to limit number of simultaneous streams
|
||||||
|
- Separate thread for tunnel build requests
|
||||||
|
- Show next peer and connectivity on "Transit tunnels" page
|
||||||
|
- Tunnel name for local destination thread
|
||||||
|
- Throttle incoming ECIESx25519 sessions
|
||||||
|
- Send tunnel data to transport session directly if possible
|
||||||
|
- Publish 'R' cap for yggdrasil-only routers, and 'U' cap for routers through proxy
|
||||||
|
- Random tunnel rejection when medium congestion
|
||||||
|
- Save unreachable router's endpoint to use it next time without introducers
|
||||||
|
- Recognize symmetric NAT from peer test message 7
|
||||||
|
- Resend HolePunch and RelayResponse messages
|
||||||
|
### Changed
|
||||||
|
- Removed own implementation of AESNI and always use one from openssl
|
||||||
|
- Renamed main thread to i2pd-daemon
|
||||||
|
- Set i2p.streaming.profile=2 for shared local destination
|
||||||
|
- Reduced LeaseSet and RouterInfo lookup timeouts
|
||||||
|
- Cleanup ECIES sessions and tags more often
|
||||||
|
- Check LeaseSet expiration time
|
||||||
|
- Handle NTCP2 session handshakes in separate thread
|
||||||
|
- Limit last decline time by 1.5 hours in router's profile
|
||||||
|
- Don't handle RelayRequest and RelayIntro with same nonce twice
|
||||||
|
- Increased hole punch expiration interval
|
||||||
|
- Send peer test message 6 with delay if message 4 was received before message 5
|
||||||
|
- Pre-calculate more x25519 keys for transports in runtime
|
||||||
|
- Don't request LeaseSet for incoming stream
|
||||||
|
- Terminate incoming stream right away if no remote LeaseSet
|
||||||
|
- Handle choked, new RTO and window size calculation and resetting algorithm for streams
|
||||||
|
### Fixed
|
||||||
|
- Empty string in addressbook subscriptions
|
||||||
|
- ECIESx25519 sessions without destination
|
||||||
|
- Missing RouterInfo buffer in NetDb
|
||||||
|
- Invalid I2PControl certificate
|
||||||
|
- Routers disappear from NetDb when offline
|
||||||
|
- Peer test message 6 sent to unknown endpoint
|
||||||
|
- Race condition with LeaseSet update
|
||||||
|
- Excessive CPU usage by streams
|
||||||
|
- Crash on shutdown
|
||||||
|
|
||||||
|
## [2.54.0] - 2024-10-06
|
||||||
|
### Added
|
||||||
|
- Maintain recently connected routers list to avoid false-positive peer test
|
||||||
|
- Limited connectivity mode(through proxy)
|
||||||
|
- "i2p.streaming.profile" tunnel's param to let tunnel select also low-bandwidth routers
|
||||||
|
- Limit stream's inbound speed
|
||||||
|
- Periodic ack requests in ratchets session
|
||||||
|
- Set congestion cap G immediately if through proxy
|
||||||
|
- Show tunnel's routers bandwidth caps in web console
|
||||||
|
- Handle immediate ack requested flag in SSU2 data packets
|
||||||
|
- Resend and ack peer test and relay messages
|
||||||
|
- "senduseragent" HTTP proxy's param to pass through user's User-Agent
|
||||||
|
### Changed
|
||||||
|
- Exclude 'N' routers from high-bandwidth routers for client tunnels
|
||||||
|
- C++11 support has been dropped, the minimal requirement is C++17 now, C++20 for some compilers
|
||||||
|
- Removed dependency from boost::date_time and boost::filesystem
|
||||||
|
- Set default i2cp.leaseSetEncType to 0,4 and to 4 for server tunnels
|
||||||
|
- Handle i2cp.inboundlimit and i2cp.outboundlimit params in I2CP
|
||||||
|
- Publish LeaseSet with new timestamp update if tunnel was replaced in the same second
|
||||||
|
- Increase max number of generated tags to 800 per tagset
|
||||||
|
- Routing path expiration by time instead num attempts
|
||||||
|
- Save timestamp from epoch instead local time to profiles
|
||||||
|
- Update introducer's iTag if session to introducer was replaced to new one
|
||||||
|
- RTT, window size and number of NACKs calculation for streaming
|
||||||
|
- Don't select same peer for tunnel too often
|
||||||
|
- Use WinApi for data path UTF-8 conversion for Windows
|
||||||
|
### Fixed
|
||||||
|
- Jump link crash if address book is disabled
|
||||||
|
- Race condition if connect through an introducer
|
||||||
|
- "Date" header in I2PControl response
|
||||||
|
- Incomplete response from web console
|
||||||
|
- AEAD verification with LibreSSL
|
||||||
|
- Number of generated tags and new keys for follow-on tagsets
|
||||||
|
- Expired leases in LeaseSet
|
||||||
|
- Attempts to send HolePunch to 0.0.0.0
|
||||||
|
- Incorrect options size in quick ack streaming packet
|
||||||
|
- Low bandwidth router appeared as first peer in high-bandwidth client tunnel
|
||||||
|
|
||||||
|
## [2.53.1] - 2024-07-29
|
||||||
|
### Changed
|
||||||
|
- I2CP performance improvement
|
||||||
|
### Fixed
|
||||||
|
- 100% CPU usage after I2CP/SAM/BOB session termination
|
||||||
|
- Incorrect client limits returned through I2CP
|
||||||
|
- Build with LibreSSL
|
||||||
|
|
||||||
|
## [2.53.0] - 2024-07-19
|
||||||
|
### Added
|
||||||
|
- New congestion control algorithm for streaming
|
||||||
|
- Support miniupnp-2.2.8
|
||||||
|
- Limit stream's outbound speed
|
||||||
|
- Flood to next day closest floodfills before UTC midnight
|
||||||
|
- Recognize duplicated routers and bypass them
|
||||||
|
- Random SSU2 resend interval
|
||||||
|
### Changed
|
||||||
|
- Set minimal version to 0.9.69 for floodfills and 0.9.58 for client tunnels
|
||||||
|
- Removed openssl 1.0.2 support
|
||||||
|
- Move unsent I2NP messages to the new session if replaced
|
||||||
|
- Use mt19937 RNG instead rand()
|
||||||
|
- Update router's congestion caps before initial publishing
|
||||||
|
- Don't try introducer with invalid address
|
||||||
|
- Select newest introducers to publish
|
||||||
|
- Don't request relay tag for every session if we have enough introducers
|
||||||
|
- Update timestamp for non-reachable or hidden router
|
||||||
|
- Reset streaming routing path if duplicated SYN received
|
||||||
|
- Update LeaseSet if inbound tunnel failed
|
||||||
|
- Reseeds list
|
||||||
|
### Fixed
|
||||||
|
- Crash when a destination gets terminated
|
||||||
|
- Expired offline signature upon destination creation
|
||||||
|
- Race condition between local RouterInfo buffer creation and sending it through the transports
|
||||||
|
|
||||||
|
## [2.52.0] - 2024-05-12
|
||||||
|
### Added
|
||||||
|
- Separate threads for persisting RouterInfos and profiles to disk
|
||||||
|
- Give preference to address with direct connection
|
||||||
|
- Exclude addresses with incorrect static or intro key
|
||||||
|
- Avoid two firewalled routers in the row in tunnel
|
||||||
|
- Drop unsolicited database search replies
|
||||||
|
### Changed
|
||||||
|
- Increase number of hashes to 16 in exploratory lookup reply
|
||||||
|
- Reduce number of a RouterInfo lookup attempts to 5
|
||||||
|
- Reset stream RTO if outbound tunnel was changed
|
||||||
|
- Insert previously excluded floodfill back when successfully connected
|
||||||
|
- Increase maximum stream resend attempts to 9
|
||||||
|
- Reply to exploratory lookups with only confirmed routers if low tunnel build rate
|
||||||
|
- Don't accept too old RouterInfo
|
||||||
|
- Build client tunnels through confirmed routers only if low tunnel build rate
|
||||||
|
- Manage netDb requests more frequently
|
||||||
|
- Don't reply with closer than us only floodfills for lookup
|
||||||
|
### Fixed
|
||||||
|
- Crash on router lookup if exploratory pool is not ready
|
||||||
|
- Race condition in excluded peers for next lookup
|
||||||
|
- Excessive number of lookups for same destination
|
||||||
|
- Race condition with transport peers during shutdown
|
||||||
|
- Corrupted RouterInfo files
|
||||||
|
|
||||||
|
## [2.51.0] - 2024-04-06
|
||||||
|
### Added
|
||||||
|
- Non-blocking mode for UDP sockets
|
||||||
|
- Set SSU2 socket buffer size based on bandwidth limit
|
||||||
|
- Encrypted tunnel tests
|
||||||
|
- Support for multiple UDP server tunnels on one destination
|
||||||
|
- Publish medium congestion indication
|
||||||
|
- Local domain sockets for SOCKS proxy upstream
|
||||||
|
- Tunnel status "declined" in web console
|
||||||
|
- SAM error reply "Incompatible crypto" if remote destination has incompatible crypto
|
||||||
|
- Reduce amount of traffic by handling local message drops
|
||||||
|
- Keep SSU2 socket open even if it fails to bind
|
||||||
|
- Lower SSU2 resend traffic spikes
|
||||||
|
- Expiration for messages in SSU2 send queue
|
||||||
|
- Use EWMA for stream RTT estimation
|
||||||
|
- Request choking delay if too many NACKs in stream
|
||||||
|
- Allow 0ms latency for tunnel
|
||||||
|
- Randomize tunnels selection for tests
|
||||||
|
### Changed
|
||||||
|
- Upstream SOCKS proxy from SOCKS4 to SOCKS5
|
||||||
|
- Transit tunnels limit to 4 bytes. Default value to 10K
|
||||||
|
- Reply CANT_REACH_PEER if connect to ourselves in SAM
|
||||||
|
- Don't send already expired I2NP messages
|
||||||
|
- Use monotonic timer to measure tunnel test latency
|
||||||
|
- Standard NTCP2 frame doesn't exceed 16K
|
||||||
|
- Always send request through tunnels in case of restricted routes
|
||||||
|
- Don't delete connected routers from NetDb
|
||||||
|
- Send lookup reply directly to reply tunnel gateway if possible
|
||||||
|
- Reduce unreachable router ban interval to 8 minutes
|
||||||
|
- Don't request banned routers / don't try to connect to unreachable router
|
||||||
|
- Consider 'M' routers as low bandwidth
|
||||||
|
- Limit minimal received SSU2 packet size to 40 bytes
|
||||||
|
- Bob picks peer test session only if Charlie's address supports peer testing
|
||||||
|
- Reject peer test msg 2 if peer testing is not supported
|
||||||
|
- Don't request termination if SSU2 session was not established
|
||||||
|
- Set maximum SSU2 queue size depending on RTT value
|
||||||
|
- New streaming RTT calculation algorithm
|
||||||
|
- Don't double initial RTO for streams when changing tunnels
|
||||||
|
- Restore failed tunnel if test or data for inbound tunnel received
|
||||||
|
- Don't fail last remaining tunnel in pool
|
||||||
|
- Publish LeasetSet again if local destination was not ready or no tunnels
|
||||||
|
- Make more attempts to pick high bandwidth hop for client tunnel
|
||||||
|
- Reduced SSU2 session termination timeout to 165 seconds
|
||||||
|
- Reseeds list
|
||||||
|
### Fixed
|
||||||
|
- ECIESx25519 symmetric key tagset early expiration
|
||||||
|
- Encrypted LeaseSet lookup
|
||||||
|
- Outbound tunnel build fails if it's endpoint is the same as reply tunnel gateway
|
||||||
|
- I2PControl RouterManager returns invalid JSON when unknown params are passed
|
||||||
|
- Mix of data between different UDP sessions on the same server
|
||||||
|
- TARGET_OS_SIMULATOR check
|
||||||
|
- Handling of "reservedrange" param
|
||||||
|
- New NTCP2 session gets teminated upon termination of old one
|
||||||
|
- New SSU2 session gets teminated upon termination of old one
|
||||||
|
- Peer test to non-supporting router
|
||||||
|
- Streaming ackThrough off 1 if number of NACKs exceeds 255
|
||||||
|
- Race condition in ECIESx25519 tags table
|
||||||
|
- Good tunnel becomes failed
|
||||||
|
- Crash when packet comes to terminated stream
|
||||||
|
- Stream hangs during LeaseSet update
|
||||||
|
|
||||||
|
## [2.50.2] - 2024-01-06
|
||||||
|
###Fixed
|
||||||
|
- Crash with OpenSSL 3.2.0
|
||||||
|
- False positive clock skew detection
|
||||||
|
|
||||||
|
## [2.50.1] - 2023-12-23
|
||||||
|
###Fixed
|
||||||
|
- Support for new EdDSA usage behavior in OpenSSL 3.2.0
|
||||||
|
|
||||||
|
## [2.50.0] - 2023-12-18
|
||||||
|
### Added
|
||||||
|
- Support of concurrent ACCEPTs on SAM 3.1
|
||||||
|
- Haiku OS support
|
||||||
|
- Low bandwidth and far routers can expire before 1 hour
|
||||||
|
### Changed
|
||||||
|
- Don't pick too active peer for first hop
|
||||||
|
- Try peer test again if status is Unknown
|
||||||
|
- Send peer tests with random delay
|
||||||
|
- Reseeds list
|
||||||
|
### Fixed
|
||||||
|
- XSS vulnerability in addresshelper
|
||||||
|
- Publishing NAT64 ipv6 addresses
|
||||||
|
- Deadlock in AsyncSend callback
|
||||||
|
|
||||||
|
## [2.49.0] - 2023-09-18
|
||||||
|
### Added
|
||||||
|
- Handle SOCK5 authorization with empty user/password
|
||||||
|
- Drop incoming transport sessions from too old or from future routers
|
||||||
|
- Memory pool for router profiles
|
||||||
|
- Allow 0 hops in explicitPeers
|
||||||
|
### Changed
|
||||||
|
- Separate network and testing status
|
||||||
|
- Remove AVX code
|
||||||
|
- Improve NTCP2 transport session logging
|
||||||
|
- Select router with ipv4 for tunnel endpoint
|
||||||
|
- Consider all addresses non-published for U and H routers even if they have host/port
|
||||||
|
- Don't pick completely unreachable routers for tunnels
|
||||||
|
- Exclude SSU1 introducers from SSU2 addresses
|
||||||
|
- Don't create paired inbound tunnel if length is different
|
||||||
|
- Remove introducer from RouterInfo after 60 minutes
|
||||||
|
- Reduce SSU2 keep alive interval and add keep alive interval variance
|
||||||
|
- Don't pick too old sessions for introducer
|
||||||
|
### Fixed
|
||||||
|
- Version of the subnegotiation in user/password SOCKS5 response
|
||||||
|
- Send keepalive for existing session with introducer
|
||||||
|
- Buffer offset for EVP_EncryptFinal_ex() to include outlen
|
||||||
|
- Termination block size processing for transport sessions
|
||||||
|
- Crash if deleted BOB destination was shared between few BOB sessions
|
||||||
|
- Introducers with zero tag
|
||||||
|
- Padding for SSU2 path response
|
||||||
|
|
||||||
|
## [2.48.0] - 2023-06-12
|
||||||
|
### Added
|
||||||
|
- Allow user/password authentication method for SOCK5 proxy
|
||||||
|
- Publish reject all congestion cap 'G' if transit is not accepted
|
||||||
|
- 'critical' log level
|
||||||
|
- Print b32 on webconsole destination page
|
||||||
|
- Webconsole button to drop a remote LeaseSet
|
||||||
|
- limits.zombies param - minimum percentage of successfully created tunnels for routers cleanup
|
||||||
|
- Recognize real routers if successfully connected or responded to tunnel build request
|
||||||
|
### Changed
|
||||||
|
- Bypass slow transport sessions for first hop selection
|
||||||
|
- Limit AESNI inline asm to x86/x64
|
||||||
|
- Create smaller I2NP packets if possible
|
||||||
|
- Make router unreachable if AEAD tag verification fails in SessionCreated
|
||||||
|
- Don't include a router to floodfills list until it's confirmed as real
|
||||||
|
- Drop LeaseSet store request if not floodfill
|
||||||
|
- Bypass medium congestion('D') routers for client tunnels
|
||||||
|
- Publish encrypted RouterInfo through tunnels
|
||||||
|
- Check if s is valid x25519 public key
|
||||||
|
- Check if socket is open before sending data in SSU2
|
||||||
|
### Fixed
|
||||||
|
- Webconsole empty page if destination is not found
|
||||||
|
- i2p.streaming.answerPings param
|
||||||
|
- Reload tunnels
|
||||||
|
- Address caps for unspecified ipv6 address
|
||||||
|
- Incomplete HTTP headers in I2P tunnels
|
||||||
|
- SSU2 socket network exceptions on Windows
|
||||||
|
- Use of 'server' type tunnel port as inport (#1936)
|
||||||
|
|
||||||
|
## [2.47.0] - 2023-03-11
|
||||||
|
### Added
|
||||||
|
- Congestion caps
|
||||||
|
- SAM UDP port parameter
|
||||||
|
- Support domain addresses for yggdrasil reseeds
|
||||||
|
### Changed
|
||||||
|
- DHT for floodfills instead plain list
|
||||||
|
- Process router's messages in separate thread
|
||||||
|
- Don't publish non-reachable router
|
||||||
|
- Send and check target destination in first streaming SYN packet
|
||||||
|
- Reseeds list
|
||||||
|
### Fixed
|
||||||
|
- Memory leak in windows network state detection
|
||||||
|
- Reseed attempts from invalid address
|
||||||
|
|
||||||
|
## [2.46.1] - 2023-02-20
|
||||||
|
### Fixed
|
||||||
|
- Race condition while getting router's peer profile
|
||||||
|
- Creation of new router.info
|
||||||
|
- Displaying LeaseSets in the webconsole
|
||||||
|
- Crash when processing ACK request
|
||||||
|
|
||||||
|
## [2.46.0] - 2023-02-15
|
||||||
|
### Added
|
||||||
|
- Limit number of acked SSU2 packets to 511
|
||||||
|
- Localization to Swedish, Portuguese, Turkish, Polish
|
||||||
|
- Periodically send Datetime block in NTCP2 and SSU2
|
||||||
|
- Don't select random port from reserved
|
||||||
|
- In memory table for peer profiles
|
||||||
|
- Store if router was unreachable in it's peer profile
|
||||||
|
- Show IPv6 addresses in square brackets in webconsole
|
||||||
|
- Check referer when processing Addresshelper
|
||||||
|
### Changed
|
||||||
|
- Algorithm for tunnel creation success rate calculation
|
||||||
|
- Drop incoming NTCP2 and SSU2 connection if published IP doesn't match actual endpoint
|
||||||
|
- Exclude actually unreachable router from netdb for 2 hours
|
||||||
|
- Select first hop from high bandwidth peers for client tunnels
|
||||||
|
- Drop too long or too short LeaseSet
|
||||||
|
- Delete router from netdb if became invalid after update
|
||||||
|
- Terminate existing session if clock skew detected
|
||||||
|
- Close previous UDP socket if open before reopening
|
||||||
|
- Minimal version for floodfill is 0.9.51
|
||||||
|
- Sort transports by endpoints in webconsole
|
||||||
|
### Fixed
|
||||||
|
- Deadlock during processing I2NP block with Garlic in ECIES encrypted message to router
|
||||||
|
- Race condition with encrypted LeaseSets
|
||||||
|
- HTTP query detection
|
||||||
|
- Connection attempts to IPs from invalid ranges
|
||||||
|
- Publish "0.0.0.0" in RouterInfo
|
||||||
|
- Crash upon receiving PeerTest 7
|
||||||
|
- Tunnels for closed SAM session socket
|
||||||
|
- Missing NTCP2 address in RouterInfo if enabled back
|
||||||
|
|
||||||
|
## [2.45.1] - 2023-01-11
|
||||||
|
### Added
|
||||||
|
- Full Cone NAT status error
|
||||||
|
### Changed
|
||||||
|
- Drop duplicated I2NP messages in SSU2
|
||||||
|
- Set rejection code 30 if tunnel with id already exists
|
||||||
|
- Network status is always OK if peer test msg 5 received
|
||||||
|
### Fixed
|
||||||
|
- UPnP crash if SSU2 or NTCP2 is disabled
|
||||||
|
- Crash on termination for some platforms
|
||||||
|
|
||||||
|
## [2.45.0] - 2023-01-03
|
||||||
|
### Added
|
||||||
|
- Test for Symmetric NAT with peer test msgs 6 and 7
|
||||||
|
- Webconsole "No Descriptors" router error state
|
||||||
|
- 1 and 15 seconds bandwidth calculation for i2pcontrol
|
||||||
|
- Show non-zero send queue size for transports in web console
|
||||||
|
- Compressible padding for I2P addresses
|
||||||
|
- Localization to Czech
|
||||||
|
- Don't accept incoming session from invalid/reserved addresses for NTCP2 and SSU2
|
||||||
|
- Limit simultaneous tunnel build requests by 4 per pool
|
||||||
|
### Changed
|
||||||
|
- Removed SSU support
|
||||||
|
- Reduced bandwidth calculation interval from 60 to 15 seconds
|
||||||
|
- Increased default max transit tunnels number from 2500 to 5000 or 10000 for floodfill
|
||||||
|
- Transit tunnels limit is doubled if floodfill mode is enabled
|
||||||
|
- NTCP2 and SSU2 timestamps are rounded to seconds
|
||||||
|
- Drop RouterInfos and LeaseSets with timestamp from future
|
||||||
|
- Don't delete unreachable routers if tunnel creation success rate is too low
|
||||||
|
- Refuse duplicated incoming pending NTCP2 session from same IP
|
||||||
|
- Don't send SSU2 termination again if termination received block received
|
||||||
|
- Handle standard network error for SSU2 without throwing an exception
|
||||||
|
- Don't select overloaded peer for next tunnel
|
||||||
|
- Remove "X-Requested-With" in HTTP Proxy for non-AJAX requests
|
||||||
|
### Fixed
|
||||||
|
- File descriptors leak
|
||||||
|
- Random crash on AddressBook update
|
||||||
|
- Crash if incorrect LeaseSet size
|
||||||
|
- Spamming to log if no descriptors
|
||||||
|
- ::1 address in RouterInfo
|
||||||
|
- SSU2 network error handling (especially for Windows)
|
||||||
|
- Race condition with pending outgoing SSU2 sessions
|
||||||
|
- RTT self-reduction for long-live streams
|
||||||
|
|
||||||
|
## [2.44.0] - 2022-11-20
|
||||||
|
### Added
|
||||||
|
- SSL connection for server I2P tunnels
|
||||||
|
- Localization to Italian and Spanish
|
||||||
|
- SSU2 through SOCKS5 UDP proxy
|
||||||
|
- Reload tunnels through web console
|
||||||
|
- SSU2 send immediate ack request flag
|
||||||
|
- SSU2 send and verify path challenge
|
||||||
|
- Configurable ssu2.mtu4 and ssu2.mtu6
|
||||||
|
### Changed
|
||||||
|
- SSU2 is enabled and SSU is disabled by default
|
||||||
|
- Separate network status and error
|
||||||
|
- Random selection between NTCP2 and SSU2 priority
|
||||||
|
- Added notbob.i2p to jump services
|
||||||
|
- Remove DoNotTrack flag from HTTP Request header
|
||||||
|
- Skip addresshelper page if destination was not changed
|
||||||
|
- SSU2 allow different ports from RelayReponse and HolePunch
|
||||||
|
- SSU2 resend PeerTest msg 1 and msg 2
|
||||||
|
- SSU2 Send Retry instead SessionCreated if clock skew detected
|
||||||
|
### Fixed
|
||||||
|
- Long HTTP headers for HTTP proxy and HTTP server tunnel
|
||||||
|
- SSU2 resends and resend limits
|
||||||
|
- Crash at startup if addressbook is disabled
|
||||||
|
- NTCP2 ipv6 connection through SOCKS5 proxy
|
||||||
|
- SSU2 SessionRequest with zero token
|
||||||
|
- SSU2 MTU less than 1280
|
||||||
|
- SSU2 port=1
|
||||||
|
- Incorrect addresses from network interfaces
|
||||||
|
- Definitions for Darwin PPC; do not use pthread_setname_np
|
||||||
|
|
||||||
|
## [2.43.0] - 2022-08-22
|
||||||
|
### Added
|
||||||
|
- Complete SSU2 implementation
|
||||||
|
- Localization to Chinese
|
||||||
|
- Send RouterInfo update for long live sessions
|
||||||
|
- Explicit ipv6 ranges of known tunnel brokers for MTU detection
|
||||||
|
- Always send "Connection: close" and strip out Keep-Alive for server HTTP tunnel
|
||||||
|
- Show ports for all transports in web console
|
||||||
|
- Translation of webconsole site title
|
||||||
|
- Support for Windows ProgramData path when running as service
|
||||||
|
- Ability to turn off address book
|
||||||
|
- Handle signals TSTP and CONT to stop and resume network
|
||||||
|
### Changed
|
||||||
|
- Case insensitive headers for server HTTP tunnel
|
||||||
|
- Do not show 'Address registration' line if LeaseSet is encrypted
|
||||||
|
- SSU2 transports have higher priority than SSU
|
||||||
|
- Disable ElGamal precalculated table if no SSU
|
||||||
|
- Deprecate limits.ntcpsoft, limits.ntcphard and limits.ntcpthreads config options
|
||||||
|
- SSU2 is enabled and SSU is disabled by default for new installations
|
||||||
|
### Fixed
|
||||||
|
- Typo with Referer header name in HTTP proxy
|
||||||
|
- Can't handle garlic message from an exploratory tunnel
|
||||||
|
- Incorrect encryption key for exploratory lookup reply
|
||||||
|
- Bound checks issues in LeaseSets code
|
||||||
|
- MTU detection on Windows
|
||||||
|
- Crash on stop of active server tunnel
|
||||||
|
- Send datagram to wrong destination in SAM
|
||||||
|
- Incorrect static key in RouterInfo if the keys were regenerated
|
||||||
|
- Duplicated sessions in BOB
|
||||||
|
|
||||||
|
## [2.42.1] - 2022-05-24
|
||||||
|
### Fixed
|
||||||
|
- Incorrect jump link in HTTP Proxy
|
||||||
|
|
||||||
|
## [2.42.0] - 2022-05-22
|
||||||
|
### Added
|
||||||
|
- Preliminary SSU2 implementation
|
||||||
|
- Tunnel length variance
|
||||||
|
- Localization to French
|
||||||
|
- Daily cleanup of obsolete peer profiles
|
||||||
|
- Ordered jump services list in HTTP proxy
|
||||||
|
- Win32 service
|
||||||
|
- Show port for local non-published SSU addresses in web console
|
||||||
|
### Changed
|
||||||
|
- Maximum RouterInfo length increased to 3K
|
||||||
|
- Skip unknown addresses in RouterInfo
|
||||||
|
- Don't pick own router for peer test
|
||||||
|
- Reseeds list
|
||||||
|
- Internal numeric id for families
|
||||||
|
- Use ipv6 preference only when netinet headers not used
|
||||||
|
- Close stream if delete requested
|
||||||
|
- Remove version from title in web console
|
||||||
|
- Drop MESHNET build option
|
||||||
|
- Set data path before initialization
|
||||||
|
- Don't show registration block in web console if token is not provided
|
||||||
|
### Fixed
|
||||||
|
- Encrypted LeaseSet for EdDSA signature
|
||||||
|
- Clients tunnels are not built if clock is not synced on start
|
||||||
|
- Incorrect processing of i2cp.dontPublishLeaseSet param
|
||||||
|
- UDP tunnels reload
|
||||||
|
- Build for LibreSSL 3.5.2
|
||||||
|
- Race condition in short tunnel build message
|
||||||
|
- Race condition in local RouterInfo buffer allocation
|
||||||
|
|
||||||
|
## [2.41.0] - 2022-02-20
|
||||||
|
### Added
|
||||||
|
- Clock syncronization through SSU
|
||||||
|
- Drop routers older than 6 months on start
|
||||||
|
- Localization to German
|
||||||
|
- Don't send streaming ack too frequently
|
||||||
|
- Select compatible outbound tunnel for I2CP messages
|
||||||
|
- Restart webconsole's acceptor in case of exception
|
||||||
|
### Changed
|
||||||
|
- Use builtin bitswap for endian on windows
|
||||||
|
- Send SessionCreated before connection close if clock skew
|
||||||
|
- Try another floodfill for publishing if no compatible tunnels found
|
||||||
|
- Reduce memory usage for RouterInfo structures
|
||||||
|
- Avoid duplicated addresses in RouterInfo. Check presence of netId and version
|
||||||
|
- Use TCP/IP sockets for I2CP on Android instead local sockets
|
||||||
|
- Return uptime as integer in I2PControl
|
||||||
|
- Reseed servers list/cerificates
|
||||||
|
- Webconsole's dark style colors
|
||||||
|
### Fixed
|
||||||
|
- Attempt to use Yggdrasil on start on Android
|
||||||
|
- Attempts to send peer tests to itself
|
||||||
|
- Severe packets drop in SSU
|
||||||
|
- Crash on tunnel tests
|
||||||
|
- Loading addressbook subscriptions from config
|
||||||
|
- Multiple I2CP session to the same destination
|
||||||
|
- Build on Apple Silicon
|
||||||
|
|
||||||
## [2.40.0] - 2021-11-29
|
## [2.40.0] - 2021-11-29
|
||||||
### Added
|
### Added
|
||||||
- Keep alive parameter for client tunnels
|
- Keep alive parameter for client tunnels
|
||||||
@@ -320,7 +840,7 @@
|
|||||||
### Added
|
### Added
|
||||||
- Client auth flag for b33 address
|
- Client auth flag for b33 address
|
||||||
### Changed
|
### Changed
|
||||||
- Remove incoming NTCP2 session from pending list when established
|
- Remove incoming NTCP2 session from pending list when established
|
||||||
- Handle errors for NTCP2 SessionConfrimed send
|
- Handle errors for NTCP2 SessionConfrimed send
|
||||||
### Fixed
|
### Fixed
|
||||||
- Failure to start on Windows XP
|
- Failure to start on Windows XP
|
||||||
@@ -624,7 +1144,7 @@
|
|||||||
### Added
|
### Added
|
||||||
- Datagram i2p tunnels
|
- Datagram i2p tunnels
|
||||||
- Unique local addresses for server tunnels
|
- Unique local addresses for server tunnels
|
||||||
- Configurable list of reseed servers and initial addressbook
|
- Configurable list of reseed servers and initial addressbook
|
||||||
- Configurable netid
|
- Configurable netid
|
||||||
- Initial iOS support
|
- Initial iOS support
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2013-2020, The PurpleI2P Project
|
Copyright (c) 2013-2023, The PurpleI2P Project
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|||||||
38
Makefile
38
Makefile
@@ -4,7 +4,7 @@ SYS := $(shell $(CXX) -dumpmachine)
|
|||||||
|
|
||||||
ifneq (, $(findstring darwin, $(SYS)))
|
ifneq (, $(findstring darwin, $(SYS)))
|
||||||
SHARED_SUFFIX = dylib
|
SHARED_SUFFIX = dylib
|
||||||
else ifneq (, $(findstring mingw, $(SYS))$(findstring cygwin, $(SYS)))
|
else ifneq (, $(findstring mingw, $(SYS))$(findstring windows-gnu, $(SYS))$(findstring cygwin, $(SYS)))
|
||||||
SHARED_SUFFIX = dll
|
SHARED_SUFFIX = dll
|
||||||
else
|
else
|
||||||
SHARED_SUFFIX = so
|
SHARED_SUFFIX = so
|
||||||
@@ -29,9 +29,7 @@ DAEMON_SRC_DIR := daemon
|
|||||||
# import source files lists
|
# import source files lists
|
||||||
include filelist.mk
|
include filelist.mk
|
||||||
|
|
||||||
USE_AESNI := $(or $(USE_AESNI),yes)
|
|
||||||
USE_STATIC := $(or $(USE_STATIC),no)
|
USE_STATIC := $(or $(USE_STATIC),no)
|
||||||
USE_MESHNET := $(or $(USE_MESHNET),no)
|
|
||||||
USE_UPNP := $(or $(USE_UPNP),no)
|
USE_UPNP := $(or $(USE_UPNP),no)
|
||||||
DEBUG := $(or $(DEBUG),yes)
|
DEBUG := $(or $(DEBUG),yes)
|
||||||
|
|
||||||
@@ -48,6 +46,10 @@ else
|
|||||||
LD_DEBUG = -s
|
LD_DEBUG = -s
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (, $(DESTDIR))
|
||||||
|
PREFIX = $(DESTDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (, $(findstring darwin, $(SYS)))
|
ifneq (, $(findstring darwin, $(SYS)))
|
||||||
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
||||||
ifeq ($(HOMEBREW),1)
|
ifeq ($(HOMEBREW),1)
|
||||||
@@ -55,30 +57,34 @@ ifneq (, $(findstring darwin, $(SYS)))
|
|||||||
else
|
else
|
||||||
include Makefile.osx
|
include Makefile.osx
|
||||||
endif
|
endif
|
||||||
|
else ifneq (, $(findstring mingw, $(SYS))$(findstring windows-gnu, $(SYS))$(findstring cygwin, $(SYS)))
|
||||||
|
DAEMON_SRC += Win32/DaemonWin32.cpp Win32/Win32App.cpp Win32/Win32Service.cpp Win32/Win32NetState.cpp
|
||||||
|
include Makefile.mingw
|
||||||
else ifneq (, $(findstring linux, $(SYS))$(findstring gnu, $(SYS)))
|
else ifneq (, $(findstring linux, $(SYS))$(findstring gnu, $(SYS)))
|
||||||
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
||||||
include Makefile.linux
|
include Makefile.linux
|
||||||
else ifneq (, $(findstring freebsd, $(SYS))$(findstring openbsd, $(SYS)))
|
else ifneq (, $(findstring freebsd, $(SYS))$(findstring openbsd, $(SYS)))
|
||||||
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
||||||
include Makefile.bsd
|
include Makefile.bsd
|
||||||
else ifneq (, $(findstring mingw, $(SYS))$(findstring cygwin, $(SYS)))
|
else ifneq (, $(findstring haiku, $(SYS)))
|
||||||
DAEMON_SRC += Win32/DaemonWin32.cpp Win32/Win32App.cpp Win32/Win32NetState.cpp
|
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
||||||
include Makefile.mingw
|
include Makefile.haiku
|
||||||
|
else ifneq (, $(findstring solaris, $(SYS)))
|
||||||
|
DAEMON_SRC += $(DAEMON_SRC_DIR)/UnixDaemon.cpp
|
||||||
|
include Makefile.solaris
|
||||||
else # not supported
|
else # not supported
|
||||||
$(error Not supported platform)
|
$(error Not supported platform)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_MESHNET),yes)
|
INCFLAGS += -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) -I$(LANG_SRC_DIR)
|
||||||
NEEDED_CXXFLAGS += -DMESHNET
|
DEFINES += -DOPENSSL_SUPPRESS_DEPRECATED
|
||||||
endif
|
NEEDED_CXXFLAGS += -MMD -MP
|
||||||
|
|
||||||
ifeq ($(USE_GIT_VERSION),yes)
|
ifeq ($(USE_GIT_VERSION),yes)
|
||||||
GIT_VERSION := $(shell git describe --tags)
|
GIT_VERSION := $(shell git describe --tags)
|
||||||
NEEDED_CXXFLAGS += -DGITVER=\"$(GIT_VERSION)\"
|
DEFINES += -DGITVER=$(GIT_VERSION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) -I$(LANG_SRC_DIR)
|
|
||||||
|
|
||||||
LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
|
LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
|
||||||
LIB_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_SRC))
|
LIB_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_SRC))
|
||||||
LANG_OBJS += $(patsubst %.cpp,obj/%.o,$(LANG_SRC))
|
LANG_OBJS += $(patsubst %.cpp,obj/%.o,$(LANG_SRC))
|
||||||
@@ -111,17 +117,17 @@ wrapper: api_client $(SHLIB_WRAP) $(ARLIB_WRAP)
|
|||||||
## custom FLAGS to work at build-time.
|
## custom FLAGS to work at build-time.
|
||||||
|
|
||||||
obj/%.o: %.cpp | mk_obj_dir
|
obj/%.o: %.cpp | mk_obj_dir
|
||||||
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -c -o $@ $<
|
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(DEFINES) $(INCFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
# '-' is 'ignore if missing' on first run
|
# '-' is 'ignore if missing' on first run
|
||||||
-include $(DEPS)
|
-include $(DEPS)
|
||||||
|
|
||||||
$(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT) $(ARLIB_LANG)
|
$(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT) $(ARLIB_LANG)
|
||||||
$(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
|
$(CXX) $(DEFINES) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||||
|
|
||||||
$(SHLIB): $(LIB_OBJS) $(SHLIB_LANG)
|
$(SHLIB): $(LIB_OBJS)
|
||||||
ifneq ($(USE_STATIC),yes)
|
ifneq ($(USE_STATIC),yes)
|
||||||
$(CXX) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS) $(SHLIB_LANG)
|
$(CXX) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(SHLIB_CLIENT): $(LIB_CLIENT_OBJS) $(SHLIB) $(SHLIB_LANG)
|
$(SHLIB_CLIENT): $(LIB_CLIENT_OBJS) $(SHLIB) $(SHLIB_LANG)
|
||||||
|
|||||||
18
Makefile.bsd
18
Makefile.bsd
@@ -1,12 +1,22 @@
|
|||||||
CXX = clang++
|
CXX = clang++
|
||||||
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-misleading-indentation
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-misleading-indentation
|
||||||
|
DEFINES = -D_GLIBCXX_USE_NANOSLEEP=1
|
||||||
|
INCFLAGS = -I/usr/include/ -I/usr/local/include/
|
||||||
|
LDFLAGS = ${LD_DEBUG} -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
||||||
|
LDLIBS = -lssl -lcrypto -lz -lpthread -lboost_system -lboost_program_options
|
||||||
|
|
||||||
## NOTE: NEEDED_CXXFLAGS is here so that custom CXXFLAGS can be specified at build time
|
## NOTE: NEEDED_CXXFLAGS is here so that custom CXXFLAGS can be specified at build time
|
||||||
## **without** overwriting the CXXFLAGS which we need in order to build.
|
## **without** overwriting the CXXFLAGS which we need in order to build.
|
||||||
## For example, when adding 'hardening flags' to the build
|
## For example, when adding 'hardening flags' to the build
|
||||||
## (e.g. -fstack-protector-strong -Wformat -Werror=format-security), we do not want to remove
|
## (e.g. -fstack-protector-strong -Wformat -Werror=format-security), we do not want to remove
|
||||||
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
||||||
## custom FLAGS to work at build-time.
|
## custom FLAGS to work at build-time.
|
||||||
NEEDED_CXXFLAGS = -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1
|
CXXVER := $(shell $(CXX) -dumpversion|cut -c 1-2)
|
||||||
INCFLAGS = -I/usr/include/ -I/usr/local/include/
|
ifeq (${CXXVER}, "4.") # older clang always returned 4.2.1
|
||||||
LDFLAGS = ${LD_DEBUG} -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
$(error Compiler too old)
|
||||||
LDLIBS = -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|
else ifeq (${CXXVER}, ${filter ${CXXVER},16 17 18 19}) # clang 16 - 19
|
||||||
|
NEEDED_CXXFLAGS = -std=c++20
|
||||||
|
else
|
||||||
|
NEEDED_CXXFLAGS = -std=c++17
|
||||||
|
endif
|
||||||
|
|
||||||
|
|||||||
10
Makefile.haiku
Normal file
10
Makefile.haiku
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
CXX = g++
|
||||||
|
CXXFLAGS := -Wall -std=c++17
|
||||||
|
INCFLAGS = -I/system/develop/headers
|
||||||
|
DEFINES = -D_DEFAULT_SOURCE -D_GNU_SOURCE
|
||||||
|
LDLIBS = -lbe -lbsd -lnetwork -lz -lssl -lcrypto -lboost_system -lboost_program_options -lpthread
|
||||||
|
|
||||||
|
ifeq ($(USE_UPNP),yes)
|
||||||
|
DEFINES += -DUSE_UPNP
|
||||||
|
LDLIBS += -lminiupnpc
|
||||||
|
endif
|
||||||
@@ -1,51 +1,49 @@
|
|||||||
# root directory holding homebrew
|
# root directory holding homebrew
|
||||||
BREWROOT = /usr/local
|
BREWROOT = /opt/homebrew
|
||||||
BOOSTROOT = ${BREWROOT}/opt/boost
|
BOOSTROOT = ${BREWROOT}/opt/boost
|
||||||
SSLROOT = ${BREWROOT}/opt/openssl@1.1
|
SSLROOT = ${BREWROOT}/opt/openssl@1.1
|
||||||
UPNPROOT = ${BREWROOT}/opt/miniupnpc
|
UPNPROOT = ${BREWROOT}/opt/miniupnpc
|
||||||
CXXFLAGS = ${CXX_DEBUG} -Wall -std=c++11 -DMAC_OSX -Wno-overloaded-virtual
|
|
||||||
INCFLAGS = -I${SSLROOT}/include -I${BOOSTROOT}/include
|
|
||||||
LDFLAGS = ${LD_DEBUG}
|
|
||||||
|
|
||||||
ifndef TRAVIS
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wno-overloaded-virtual
|
||||||
CXX = clang++
|
NEEDED_CXXFLAGS ?= -std=c++17
|
||||||
endif
|
INCFLAGS ?= -I${SSLROOT}/include -I${BOOSTROOT}/include
|
||||||
|
LDFLAGS ?= ${LD_DEBUG}
|
||||||
|
DEFINES += -DMAC_OSX
|
||||||
|
|
||||||
ifeq ($(USE_STATIC),yes)
|
ifeq ($(USE_STATIC),yes)
|
||||||
LDLIBS = -lz ${SSLROOT}/lib/libcrypto.a ${SSLROOT}/lib/libssl.a ${BOOSTROOT}/lib/libboost_system.a ${BOOSTROOT}/lib/libboost_date_time.a ${BOOSTROOT}/lib/libboost_filesystem.a ${BOOSTROOT}/lib/libboost_program_options.a -lpthread
|
LDLIBS = -lz ${SSLROOT}/lib/libcrypto.a ${SSLROOT}/lib/libssl.a ${BOOSTROOT}/lib/libboost_system.a ${BOOSTROOT}/lib/libboost_filesystem.a ${BOOSTROOT}/lib/libboost_program_options.a
|
||||||
|
ifeq ($(USE_UPNP),yes)
|
||||||
|
LDLIBS += ${UPNPROOT}/lib/libminiupnpc.a
|
||||||
|
endif
|
||||||
|
LDLIBS += -lpthread -ldl
|
||||||
else
|
else
|
||||||
LDFLAGS += -L${SSLROOT}/lib -L${BOOSTROOT}/lib
|
LDFLAGS += -L${SSLROOT}/lib -L${BOOSTROOT}/lib
|
||||||
LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|
LDLIBS = -lz -lssl -lcrypto -lboost_system -lboost_filesystem -lboost_program_options -lpthread
|
||||||
|
ifeq ($(USE_UPNP),yes)
|
||||||
|
LDFLAGS += -L${UPNPROOT}/lib
|
||||||
|
LDLIBS += -lminiupnpc
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_UPNP),yes)
|
ifeq ($(USE_UPNP),yes)
|
||||||
LDFLAGS += -ldl
|
DEFINES += -DUSE_UPNP
|
||||||
CXXFLAGS += -DUSE_UPNP
|
|
||||||
INCFLAGS += -I${UPNPROOT}/include
|
INCFLAGS += -I${UPNPROOT}/include
|
||||||
ifeq ($(USE_STATIC),yes)
|
|
||||||
LDLIBS += ${UPNPROOT}/lib/libminiupnpc.a
|
|
||||||
else
|
|
||||||
LDFLAGS += -L${UPNPROOT}/lib
|
|
||||||
LDLIBS += -lminiupnpc
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# OSX Notes
|
|
||||||
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html
|
|
||||||
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
|
|
||||||
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
|
||||||
CXXFLAGS += -D__AES__ -maes
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
install -d ${PREFIX}/bin ${PREFIX}/etc/i2pd ${PREFIX}/share/doc/i2pd ${PREFIX}/share/i2pd ${PREFIX}/share/man/man1 ${PREFIX}/var/lib/i2pd
|
install -d ${PREFIX}/bin
|
||||||
install -m 755 ${I2PD} ${PREFIX}/bin/
|
install -m 755 ${I2PD} ${PREFIX}/bin
|
||||||
|
install -d ${PREFIX}/etc ${PREFIX}/etc/i2pd ${PREFIX}/etc/i2pd/tunnels.conf.d
|
||||||
install -m 644 contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/etc/i2pd
|
install -m 644 contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/etc/i2pd
|
||||||
@cp -R contrib/certificates ${PREFIX}/share/i2pd/
|
install -d ${PREFIX}/share ${PREFIX}/share/doc ${PREFIX}/share/doc/i2pd
|
||||||
install -m 644 ChangeLog LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/share/doc/i2pd
|
install -m 644 ChangeLog LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/share/doc/i2pd
|
||||||
|
install -d ${PREFIX}/share/i2pd
|
||||||
|
@cp -R contrib/certificates ${PREFIX}/share/i2pd/
|
||||||
|
install -d ${PREFIX}/share/man ${PREFIX}/share/man/man1
|
||||||
@gzip -kf debian/i2pd.1 && install debian/i2pd.1.gz ${PREFIX}/share/man/man1
|
@gzip -kf debian/i2pd.1 && install debian/i2pd.1.gz ${PREFIX}/share/man/man1
|
||||||
@ln -sf ${PREFIX}/share/i2pd/certificates ${PREFIX}/var/lib/i2pd/
|
install -d ${PREFIX}/var ${PREFIX}/var/lib ${PREFIX}/var/lib/i2pd
|
||||||
|
@ln -sf ${PREFIX}/share/i2pd/certificates ${PREFIX}/var/lib/i2pd/certificates
|
||||||
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf.d ${PREFIX}/var/lib/i2pd/tunnels.d
|
||||||
@ln -sf ${PREFIX}/etc/i2pd/i2pd.conf ${PREFIX}/var/lib/i2pd/i2pd.conf
|
@ln -sf ${PREFIX}/etc/i2pd/i2pd.conf ${PREFIX}/var/lib/i2pd/i2pd.conf
|
||||||
@ln -sf ${PREFIX}/etc/i2pd/subscriptions.txt ${PREFIX}/var/lib/i2pd/subscriptions.txt
|
@ln -sf ${PREFIX}/etc/i2pd/subscriptions.txt ${PREFIX}/var/lib/i2pd/subscriptions.txt
|
||||||
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf ${PREFIX}/var/lib/i2pd/tunnels.conf
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf ${PREFIX}/var/lib/i2pd/tunnels.conf
|
||||||
|
|||||||
@@ -9,20 +9,17 @@ LDFLAGS ?= ${LD_DEBUG}
|
|||||||
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
||||||
## custom FDLAGS to work at build-time.
|
## custom FDLAGS to work at build-time.
|
||||||
|
|
||||||
# detect proper flag for c++11 support by compilers
|
# detect proper flag for c++17 support by compilers
|
||||||
CXXVER := $(shell $(CXX) -dumpversion)
|
CXXVER := $(shell $(CXX) -dumpversion)
|
||||||
ifeq ($(shell expr match $(CXX) 'clang'),5)
|
ifeq ($(shell expr match $(CXX) 'clang'),5)
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
|
||||||
else ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # gcc >= 4.10
|
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
|
||||||
else ifeq ($(shell expr match ${CXXVER} "4\.[8-9]"),3) # gcc 4.8 - 4.9
|
|
||||||
NEEDED_CXXFLAGS += -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1
|
|
||||||
else ifeq ($(shell expr match ${CXXVER} "[5-6]"),1) # gcc 5 - 6
|
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
|
||||||
LDLIBS = -latomic
|
|
||||||
else ifeq ($(shell expr match ${CXXVER} "[1,7-9]"),1) # gcc >= 7
|
|
||||||
NEEDED_CXXFLAGS += -std=c++17
|
NEEDED_CXXFLAGS += -std=c++17
|
||||||
LDLIBS = -latomic
|
else ifeq ($(shell expr match ${CXXVER} "[8-9]"),1) # gcc 8 - 9
|
||||||
|
NEEDED_CXXFLAGS += -std=c++17
|
||||||
|
LDLIBS = -lboost_system -lstdc++fs
|
||||||
|
else ifeq ($(shell expr match ${CXXVER} "1[0-2]"),2) # gcc 10 - 12
|
||||||
|
NEEDED_CXXFLAGS += -std=c++17
|
||||||
|
else ifeq ($(shell expr match ${CXXVER} "1[3-9]"),2) # gcc 13+
|
||||||
|
NEEDED_CXXFLAGS += -std=c++20
|
||||||
else # not supported
|
else # not supported
|
||||||
$(error Compiler too old)
|
$(error Compiler too old)
|
||||||
endif
|
endif
|
||||||
@@ -34,9 +31,6 @@ ifeq ($(USE_STATIC),yes)
|
|||||||
# Using 'getaddrinfo' in statically linked applications requires at runtime
|
# Using 'getaddrinfo' in statically linked applications requires at runtime
|
||||||
# the shared libraries from the glibc version used for linking
|
# the shared libraries from the glibc version used for linking
|
||||||
LIBDIR := /usr/lib/$(SYS)
|
LIBDIR := /usr/lib/$(SYS)
|
||||||
LDLIBS += $(LIBDIR)/libboost_system.a
|
|
||||||
LDLIBS += $(LIBDIR)/libboost_date_time.a
|
|
||||||
LDLIBS += $(LIBDIR)/libboost_filesystem.a
|
|
||||||
LDLIBS += $(LIBDIR)/libboost_program_options.a
|
LDLIBS += $(LIBDIR)/libboost_program_options.a
|
||||||
LDLIBS += $(LIBDIR)/libssl.a
|
LDLIBS += $(LIBDIR)/libssl.a
|
||||||
LDLIBS += $(LIBDIR)/libcrypto.a
|
LDLIBS += $(LIBDIR)/libcrypto.a
|
||||||
@@ -46,7 +40,7 @@ ifeq ($(USE_UPNP),yes)
|
|||||||
endif
|
endif
|
||||||
LDLIBS += -lpthread -ldl
|
LDLIBS += -lpthread -ldl
|
||||||
else
|
else
|
||||||
LDLIBS += -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|
LDLIBS += -lssl -lcrypto -lz -lboost_program_options -lpthread -latomic
|
||||||
ifeq ($(USE_UPNP),yes)
|
ifeq ($(USE_UPNP),yes)
|
||||||
LDLIBS += -lminiupnpc
|
LDLIBS += -lminiupnpc
|
||||||
endif
|
endif
|
||||||
@@ -54,11 +48,23 @@ endif
|
|||||||
|
|
||||||
# UPNP Support (miniupnpc 1.5 and higher)
|
# UPNP Support (miniupnpc 1.5 and higher)
|
||||||
ifeq ($(USE_UPNP),yes)
|
ifeq ($(USE_UPNP),yes)
|
||||||
NEEDED_CXXFLAGS += -DUSE_UPNP
|
DEFINES += -DUSE_UPNP
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
install: all
|
||||||
ifneq (, $(findstring i386, $(SYS))$(findstring i686, $(SYS))$(findstring x86_64, $(SYS))) # only x86-based CPU supports that
|
install -d ${PREFIX}/bin
|
||||||
NEEDED_CXXFLAGS += -D__AES__ -maes
|
install -m 755 ${I2PD} ${PREFIX}/bin
|
||||||
endif
|
install -d ${PREFIX}/etc ${PREFIX}/etc/i2pd ${PREFIX}/etc/i2pd/tunnels.conf.d
|
||||||
endif
|
install -m 644 contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/etc/i2pd
|
||||||
|
install -d ${PREFIX}/share ${PREFIX}/share/doc ${PREFIX}/share/doc/i2pd
|
||||||
|
install -m 644 ChangeLog LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf ${PREFIX}/share/doc/i2pd
|
||||||
|
install -d ${PREFIX}/share/i2pd
|
||||||
|
@cp -R contrib/certificates ${PREFIX}/share/i2pd/
|
||||||
|
install -d ${PREFIX}/share/man ${PREFIX}/share/man/man1
|
||||||
|
@gzip -kf debian/i2pd.1 && install debian/i2pd.1.gz ${PREFIX}/share/man/man1
|
||||||
|
install -d ${PREFIX}/var ${PREFIX}/var/lib ${PREFIX}/var/lib/i2pd
|
||||||
|
@ln -sf ${PREFIX}/share/i2pd/certificates ${PREFIX}/var/lib/i2pd/certificates
|
||||||
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf.d ${PREFIX}/var/lib/i2pd/tunnels.d
|
||||||
|
@ln -sf ${PREFIX}/etc/i2pd/i2pd.conf ${PREFIX}/var/lib/i2pd/i2pd.conf
|
||||||
|
@ln -sf ${PREFIX}/etc/i2pd/subscriptions.txt ${PREFIX}/var/lib/i2pd/subscriptions.txt
|
||||||
|
@ln -sf ${PREFIX}/etc/i2pd/tunnels.conf ${PREFIX}/var/lib/i2pd/tunnels.conf
|
||||||
|
|||||||
@@ -3,63 +3,48 @@ USE_WIN32_APP := yes
|
|||||||
|
|
||||||
WINDRES = windres
|
WINDRES = windres
|
||||||
|
|
||||||
CXXFLAGS := $(CXX_DEBUG) -DWIN32_LEAN_AND_MEAN -fPIC -msse
|
CXXFLAGS := $(CXX_DEBUG) -fPIC -msse
|
||||||
INCFLAGS = -I$(DAEMON_SRC_DIR) -IWin32
|
INCFLAGS := -I$(DAEMON_SRC_DIR) -IWin32
|
||||||
LDFLAGS := ${LD_DEBUG} -static
|
LDFLAGS := ${LD_DEBUG} -static -fPIC -msse
|
||||||
|
|
||||||
# detect proper flag for c++11 support by compilers
|
NEEDED_CXXFLAGS += -std=c++20
|
||||||
CXXVER := $(shell $(CXX) -dumpversion)
|
DEFINES += -DWIN32_LEAN_AND_MEAN
|
||||||
ifeq ($(shell expr match ${CXXVER} "[4]\.[7-9]\|4\.1[0-9]\|[5-6]"),4) # gcc 4.7 - 6
|
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
|
||||||
else ifeq ($(shell expr match ${CXXVER} "[1,7-9]"),1) # gcc >= 7
|
|
||||||
NEEDED_CXXFLAGS += -std=c++17
|
|
||||||
else # not supported
|
|
||||||
$(error Compiler too old)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Boost libraries suffix
|
|
||||||
BOOST_SUFFIX = -mt
|
|
||||||
|
|
||||||
# UPNP Support
|
# UPNP Support
|
||||||
ifeq ($(USE_UPNP),yes)
|
ifeq ($(USE_UPNP),yes)
|
||||||
CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB
|
DEFINES += -DUSE_UPNP -DMINIUPNP_STATICLIB
|
||||||
LDLIBS = -lminiupnpc
|
LDLIBS = -lminiupnpc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USE_WINXP_FLAGS), yes)
|
||||||
|
DEFINES += -DWINVER=0x0501 -D_WIN32_WINNT=0x0501
|
||||||
|
endif
|
||||||
|
|
||||||
LDLIBS += \
|
LDLIBS += \
|
||||||
-lboost_system$(BOOST_SUFFIX) \
|
$(MINGW_PREFIX)/lib/libboost_filesystem-mt.a \
|
||||||
-lboost_date_time$(BOOST_SUFFIX) \
|
$(MINGW_PREFIX)/lib/libboost_program_options-mt.a \
|
||||||
-lboost_filesystem$(BOOST_SUFFIX) \
|
$(MINGW_PREFIX)/lib/libssl.a \
|
||||||
-lboost_program_options$(BOOST_SUFFIX) \
|
$(MINGW_PREFIX)/lib/libcrypto.a \
|
||||||
-lssl \
|
$(MINGW_PREFIX)/lib/libz.a \
|
||||||
-lcrypto \
|
|
||||||
-lz \
|
|
||||||
-lwsock32 \
|
-lwsock32 \
|
||||||
-lws2_32 \
|
-lws2_32 \
|
||||||
-lgdi32 \
|
|
||||||
-liphlpapi \
|
-liphlpapi \
|
||||||
|
-lcrypt32 \
|
||||||
|
-lgdi32 \
|
||||||
-lole32 \
|
-lole32 \
|
||||||
-luuid \
|
-luuid \
|
||||||
-lpthread
|
-lpthread
|
||||||
|
|
||||||
ifeq ($(USE_WIN32_APP), yes)
|
ifeq ($(USE_WIN32_APP), yes)
|
||||||
NEEDED_CXXFLAGS += -DWIN32_APP
|
DEFINES += -DWIN32_APP
|
||||||
LDFLAGS += -mwindows
|
LDFLAGS += -mwindows
|
||||||
DAEMON_RC += Win32/Resource.rc
|
DAEMON_RC += Win32/Resource.rc
|
||||||
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_WINXP_FLAGS), yes)
|
|
||||||
NEEDED_CXXFLAGS += -DWINVER=0x0501 -D_WIN32_WINNT=0x0501
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
|
||||||
NEEDED_CXXFLAGS += -D__AES__ -maes
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_ASLR),yes)
|
ifeq ($(USE_ASLR),yes)
|
||||||
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
|
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj/%.o : %.rc | mk_obj_dir
|
obj/%.o : %.rc | mk_obj_dir
|
||||||
$(WINDRES) -i $< -o $@
|
$(WINDRES) $(DEFINES) $(INCFLAGS) --preprocessor-arg=-MMD --preprocessor-arg=-MP --preprocessor-arg=-MF$@.d -i $< -o $@
|
||||||
|
|||||||
16
Makefile.osx
16
Makefile.osx
@@ -1,20 +1,20 @@
|
|||||||
CXX = clang++
|
CXX = clang++
|
||||||
CXXFLAGS := ${CXX_DEBUG} -Wall -std=c++11 -DMAC_OSX
|
CXXFLAGS := ${CXX_DEBUG} -Wall -std=c++17
|
||||||
INCFLAGS = -I/usr/local/include
|
INCFLAGS = -I/usr/local/include
|
||||||
|
DEFINES := -DMAC_OSX
|
||||||
LDFLAGS := -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
LDFLAGS := -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
||||||
LDFLAGS += -Wl,-dead_strip
|
LDFLAGS += -Wl,-dead_strip
|
||||||
LDFLAGS += -Wl,-dead_strip_dylibs
|
LDFLAGS += -Wl,-dead_strip_dylibs
|
||||||
LDFLAGS += -Wl,-bind_at_load
|
|
||||||
|
|
||||||
ifeq ($(USE_STATIC),yes)
|
ifeq ($(USE_STATIC),yes)
|
||||||
LDLIBS = -lz /usr/local/lib/libcrypto.a /usr/local/lib/libssl.a /usr/local/lib/libboost_system.a /usr/local/lib/libboost_date_time.a /usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_program_options.a -lpthread
|
LDLIBS = -lz /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a /usr/local/lib/libboost_system.a /usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_program_options.a -lpthread
|
||||||
else
|
else
|
||||||
LDLIBS = -lz -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|
LDLIBS = -lz -lssl -lcrypto -lboost_system -lboost_filesystem -lboost_program_options -lpthread
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_UPNP),yes)
|
ifeq ($(USE_UPNP),yes)
|
||||||
LDFLAGS += -ldl
|
LDFLAGS += -ldl
|
||||||
CXXFLAGS += -DUSE_UPNP
|
DEFINES += -DUSE_UPNP
|
||||||
ifeq ($(USE_STATIC),yes)
|
ifeq ($(USE_STATIC),yes)
|
||||||
LDLIBS += /usr/local/lib/libminiupnpc.a
|
LDLIBS += /usr/local/lib/libminiupnpc.a
|
||||||
else
|
else
|
||||||
@@ -22,8 +22,8 @@ ifeq ($(USE_UPNP),yes)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_AESNI),yes)
|
OSARCH = $(shell uname -p)
|
||||||
CXXFLAGS += -D__AES__ -maes
|
|
||||||
else
|
ifneq ($(OSARCH),powerpc)
|
||||||
CXXFLAGS += -msse
|
CXXFLAGS += -msse
|
||||||
endif
|
endif
|
||||||
|
|||||||
9
Makefile.solaris
Normal file
9
Makefile.solaris
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CXX = g++
|
||||||
|
INCFLAGS = -I/usr/openssl/3/include
|
||||||
|
CXXFLAGS := -Wall -std=c++20
|
||||||
|
LDLIBS = -L/usr/openssl/3/lib/64 -lssl -lcrypto -lboost_program_options -lz -lpthread -lsocket
|
||||||
|
|
||||||
|
ifeq ($(USE_UPNP),yes)
|
||||||
|
DEFINES += -DUSE_UPNP
|
||||||
|
LDLIBS += -lminiupnpc
|
||||||
|
endif
|
||||||
34
README.md
34
README.md
@@ -69,12 +69,12 @@ Build instructions:
|
|||||||
|
|
||||||
**Supported systems:**
|
**Supported systems:**
|
||||||
|
|
||||||
* GNU/Linux - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build.yml)
|
* GNU/Linux (Debian, Ubuntu, etc) - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build.yml)
|
||||||
* CentOS / Fedora / Mageia - [](https://copr.fedorainfracloud.org/coprs/supervillain/i2pd/package/i2pd-git/)
|
* CentOS, Fedora, Mageia - [](https://copr.fedorainfracloud.org/coprs/supervillain/i2pd/package/i2pd-git/)
|
||||||
* Alpine, ArchLinux, openSUSE, Gentoo, Debian, Ubuntu, etc.
|
* Alpine, ArchLinux, openSUSE, Gentoo, etc.
|
||||||
* Windows - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build-windows.yml)
|
* Windows - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build-windows.yml)
|
||||||
* Mac OS X - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build-osx.yml)
|
* Mac OS - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build-osx.yml)
|
||||||
* Docker image - [](https://hub.docker.com/r/purplei2p/i2pd/builds/) [](https://github.com/PurpleI2P/i2pd/actions/workflows/docker.yml)
|
* Docker image - [](https://github.com/PurpleI2P/i2pd/actions/workflows/docker.yml)
|
||||||
* Snap - [](https://snapcraft.io/i2pd) [](https://snapcraft.io/i2pd)
|
* Snap - [](https://snapcraft.io/i2pd) [](https://snapcraft.io/i2pd)
|
||||||
* FreeBSD - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build-freebsd.yml)
|
* FreeBSD - [](https://github.com/PurpleI2P/i2pd/actions/workflows/build-freebsd.yml)
|
||||||
* Android - [](https://github.com/PurpleI2P/i2pd-android/actions/workflows/android.yml)
|
* Android - [](https://github.com/PurpleI2P/i2pd-android/actions/workflows/android.yml)
|
||||||
@@ -99,13 +99,23 @@ Current status: [](http
|
|||||||
Donations
|
Donations
|
||||||
---------
|
---------
|
||||||
|
|
||||||
BTC: 3MDoGJW9TLMTCDGrR9bLgWXfm6sjmgy86f
|
**E-Mail**: ```i2porignal at yandex.com```
|
||||||
LTC: LKQirrYrDeTuAPnpYq5y7LVKtywfkkHi59
|
|
||||||
ETH: 0x9e5bac70d20d1079ceaa111127f4fb3bccce379d
|
**BTC**: ```3MDoGJW9TLMTCDGrR9bLgWXfm6sjmgy86f```
|
||||||
DASH: Xw8YUrQpYzP9tZBmbjqxS3M97Q7v3vJKUF
|
|
||||||
ZEC: t1cTckLuXsr1dwVrK4NDzfhehss4NvMadAJ
|
**LTC**: ```LKQirrYrDeTuAPnpYq5y7LVKtywfkkHi59```
|
||||||
GST: GbD2JSQHBHCKLa9WTHmigJRpyFgmBj4woG
|
|
||||||
XMR: 497pJc7X4xqKvcLBLpSUtRgWqMMyo24u4btCos3cak6gbMkpobgSU6492ztUcUBghyeHpYeczB55s38NpuHoH5WGNSPDRMH
|
**ETH**: ```0x9e5bac70d20d1079ceaa111127f4fb3bccce379d```
|
||||||
|
|
||||||
|
**GST**: ```GbD2JSQHBHCKLa9WTHmigJRpyFgmBj4woG```
|
||||||
|
|
||||||
|
**DASH**: ```Xw8YUrQpYzP9tZBmbjqxS3M97Q7v3vJKUF```
|
||||||
|
|
||||||
|
**ZEC**: ```t1cTckLuXsr1dwVrK4NDzfhehss4NvMadAJ```
|
||||||
|
|
||||||
|
**ANC**: ```AQJYweYYUqM1nVfLqfoSMpUMfzxvS4Xd7z```
|
||||||
|
|
||||||
|
**XMR**: ```497pJc7X4xqKvcLBLpSUtRgWqMMyo24u4btCos3cak6gbMkpobgSU6492ztUcUBghyeHpYeczB55s38NpuHoH5WGNSPDRMH```
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2023, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#include "Win32Service.h"
|
||||||
#ifdef WIN32_APP
|
#ifdef WIN32_APP
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "Win32App.h"
|
#include "Win32App.h"
|
||||||
@@ -28,7 +29,7 @@ namespace util
|
|||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
SetConsoleCP(1251);
|
SetConsoleCP(1251);
|
||||||
SetConsoleOutputCP(1251);
|
SetConsoleOutputCP(1251);
|
||||||
setlocale(LC_ALL, "Russian");
|
//setlocale(LC_ALL, "Russian");
|
||||||
setlocale(LC_TIME, "C");
|
setlocale(LC_TIME, "C");
|
||||||
|
|
||||||
i2p::log::SetThrowFunction ([](const std::string& s)
|
i2p::log::SetThrowFunction ([](const std::string& s)
|
||||||
@@ -39,6 +40,19 @@ namespace util
|
|||||||
|
|
||||||
if (!Daemon_Singleton::init(argc, argv))
|
if (!Daemon_Singleton::init(argc, argv))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (isDaemon)
|
||||||
|
{
|
||||||
|
LogPrint(eLogDebug, "Daemon: running as service");
|
||||||
|
I2PService service((PSTR)SERVICE_NAME);
|
||||||
|
if (!I2PService::Run(service))
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Daemon: Service failed to run w/err 0x%08lx\n", GetLastError());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,10 +61,10 @@ namespace util
|
|||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
SetConsoleCP(1251);
|
SetConsoleCP(1251);
|
||||||
SetConsoleOutputCP(1251);
|
SetConsoleOutputCP(1251);
|
||||||
setlocale(LC_ALL, "Russian");
|
//setlocale(LC_ALL, "Russian");
|
||||||
setlocale(LC_TIME, "C");
|
setlocale(LC_TIME, "C");
|
||||||
#ifdef WIN32_APP
|
#ifdef WIN32_APP
|
||||||
if (!i2p::win32::StartWin32App ()) return false;
|
if (!i2p::win32::StartWin32App (isDaemon)) return false;
|
||||||
#endif
|
#endif
|
||||||
bool ret = Daemon_Singleton::start();
|
bool ret = Daemon_Singleton::start();
|
||||||
if (ret && i2p::log::Logger().GetLogType() == eLogFile)
|
if (ret && i2p::log::Logger().GetLogType() == eLogFile)
|
||||||
|
|||||||
@@ -1,36 +1,36 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
#include "winres.h"
|
#include "winres.h"
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
1 TEXTINCLUDE
|
1 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
2 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""winres.h""\r\n"
|
"#include ""winres.h""\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
3 TEXTINCLUDE
|
3 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"\r\n"
|
"\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
MAINICON ICON "mask.ico"
|
MAINICON ICON "mask.ico"
|
||||||
#endif // English (United States) resources
|
#endif // English (United States) resources
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
#ifndef APSTUDIO_INVOKED
|
||||||
#include "Resource.rc2"
|
#include "Resource.rc2"
|
||||||
#endif // not APSTUDIO_INVOKED
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#error this file is not editable by Microsoft Visual C++
|
#error this file is not editable by Microsoft Visual C++
|
||||||
#endif //APSTUDIO_INVOKED
|
#endif //APSTUDIO_INVOKED
|
||||||
|
|
||||||
#include "../libi2pd/version.h"
|
#include "version.h"
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION I2PD_VERSION_MAJOR,I2PD_VERSION_MINOR,I2PD_VERSION_MICRO,I2PD_VERSION_PATCH
|
FILEVERSION I2PD_VERSION_MAJOR,I2PD_VERSION_MINOR,I2PD_VERSION_MICRO,I2PD_VERSION_PATCH
|
||||||
@@ -25,7 +25,7 @@ BEGIN
|
|||||||
VALUE "FileDescription", "C++ I2P daemon"
|
VALUE "FileDescription", "C++ I2P daemon"
|
||||||
VALUE "FileVersion", I2PD_VERSION
|
VALUE "FileVersion", I2PD_VERSION
|
||||||
VALUE "InternalName", CODENAME
|
VALUE "InternalName", CODENAME
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2013-2020, The PurpleI2P Project"
|
VALUE "LegalCopyright", "Copyright (C) 2013-2023, The PurpleI2P Project"
|
||||||
VALUE "OriginalFilename", "i2pd"
|
VALUE "OriginalFilename", "i2pd"
|
||||||
VALUE "ProductName", "Purple I2P"
|
VALUE "ProductName", "Purple I2P"
|
||||||
VALUE "ProductVersion", I2P_VERSION
|
VALUE "ProductVersion", I2P_VERSION
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -45,6 +45,7 @@ namespace i2p
|
|||||||
namespace win32
|
namespace win32
|
||||||
{
|
{
|
||||||
DWORD g_GracefulShutdownEndtime = 0;
|
DWORD g_GracefulShutdownEndtime = 0;
|
||||||
|
bool g_isWinService;
|
||||||
|
|
||||||
static void ShowPopupMenu (HWND hWnd, POINT *curpos, int wDefaultItem)
|
static void ShowPopupMenu (HWND hWnd, POINT *curpos, int wDefaultItem)
|
||||||
{
|
{
|
||||||
@@ -144,35 +145,40 @@ namespace win32
|
|||||||
s << bytes << " Bytes\n";
|
s << bytes << " Bytes\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ShowNetworkStatus (std::stringstream& s, RouterStatus status)
|
static void ShowNetworkStatus (std::stringstream& s, RouterStatus status, bool testing, RouterError error)
|
||||||
{
|
{
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case eRouterStatusOK: s << "OK"; break;
|
case eRouterStatusOK: s << "OK"; break;
|
||||||
case eRouterStatusTesting: s << "Test"; break;
|
|
||||||
case eRouterStatusFirewalled: s << "FW"; break;
|
case eRouterStatusFirewalled: s << "FW"; break;
|
||||||
case eRouterStatusUnknown: s << "Unk"; break;
|
case eRouterStatusUnknown: s << "Unk"; break;
|
||||||
case eRouterStatusProxy: s << "Proxy"; break;
|
case eRouterStatusProxy: s << "Proxy"; break;
|
||||||
case eRouterStatusMesh: s << "Mesh"; break;
|
case eRouterStatusMesh: s << "Mesh"; break;
|
||||||
case eRouterStatusError:
|
|
||||||
{
|
|
||||||
s << "Err";
|
|
||||||
switch (i2p::context.GetError ())
|
|
||||||
{
|
|
||||||
case eRouterErrorClockSkew:
|
|
||||||
s << " - Clock skew";
|
|
||||||
break;
|
|
||||||
case eRouterErrorOffline:
|
|
||||||
s << " - Offline";
|
|
||||||
break;
|
|
||||||
case eRouterErrorSymmetricNAT:
|
|
||||||
s << " - Symmetric NAT";
|
|
||||||
break;
|
|
||||||
default: ;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: s << "Unk";
|
default: s << "Unk";
|
||||||
|
};
|
||||||
|
if (testing)
|
||||||
|
s << " (Test)";
|
||||||
|
if (error != eRouterErrorNone)
|
||||||
|
{
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
case eRouterErrorClockSkew:
|
||||||
|
s << " - " << tr("Clock skew");
|
||||||
|
break;
|
||||||
|
case eRouterErrorOffline:
|
||||||
|
s << " - " << tr("Offline");
|
||||||
|
break;
|
||||||
|
case eRouterErrorSymmetricNAT:
|
||||||
|
s << " - " << tr("Symmetric NAT");
|
||||||
|
break;
|
||||||
|
case eRouterErrorFullConeNAT:
|
||||||
|
s << " - " << tr("Full cone NAT");
|
||||||
|
break;
|
||||||
|
case eRouterErrorNoDescriptors:
|
||||||
|
s << " - " << tr("No Descriptors");
|
||||||
|
break;
|
||||||
|
default: ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,11 +186,11 @@ namespace win32
|
|||||||
{
|
{
|
||||||
s << "\n";
|
s << "\n";
|
||||||
s << "Status: ";
|
s << "Status: ";
|
||||||
ShowNetworkStatus (s, i2p::context.GetStatus ());
|
ShowNetworkStatus (s, i2p::context.GetStatus (), i2p::context.GetTesting(), i2p::context.GetError ());
|
||||||
if (i2p::context.SupportsV6 ())
|
if (i2p::context.SupportsV6 ())
|
||||||
{
|
{
|
||||||
s << " / ";
|
s << " / ";
|
||||||
ShowNetworkStatus (s, i2p::context.GetStatusV6 ());
|
ShowNetworkStatus (s, i2p::context.GetStatusV6 (), i2p::context.GetTestingV6(), i2p::context.GetErrorV6 ());
|
||||||
}
|
}
|
||||||
s << "; ";
|
s << "; ";
|
||||||
s << "Success Rate: " << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate() << "%\n";
|
s << "Success Rate: " << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate() << "%\n";
|
||||||
@@ -307,7 +313,7 @@ namespace win32
|
|||||||
}
|
}
|
||||||
case ID_DATADIR:
|
case ID_DATADIR:
|
||||||
{
|
{
|
||||||
std::string datadir(i2p::fs::GetUTF8DataDir());
|
std::string datadir(i2p::fs::GetDataDir());
|
||||||
ShellExecute(NULL, "explore", datadir.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
ShellExecute(NULL, "explore", datadir.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -349,6 +355,7 @@ namespace win32
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[[fallthrough]];
|
||||||
}
|
}
|
||||||
case WM_TRAYICON:
|
case WM_TRAYICON:
|
||||||
{
|
{
|
||||||
@@ -418,8 +425,9 @@ namespace win32
|
|||||||
return DefWindowProc( hWnd, uMsg, wParam, lParam);
|
return DefWindowProc( hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StartWin32App ()
|
bool StartWin32App (bool isWinService)
|
||||||
{
|
{
|
||||||
|
g_isWinService = isWinService;
|
||||||
if (FindWindow (I2PD_WIN32_CLASSNAME, TEXT("i2pd")))
|
if (FindWindow (I2PD_WIN32_CLASSNAME, TEXT("i2pd")))
|
||||||
{
|
{
|
||||||
MessageBox(NULL, TEXT("I2Pd is running already"), TEXT("Warning"), MB_OK);
|
MessageBox(NULL, TEXT("I2Pd is running already"), TEXT("Warning"), MB_OK);
|
||||||
@@ -448,7 +456,9 @@ namespace win32
|
|||||||
MessageBox(NULL, "Failed to create main window", TEXT("Warning!"), MB_ICONERROR | MB_OK | MB_TOPMOST);
|
MessageBox(NULL, "Failed to create main window", TEXT("Warning!"), MB_ICONERROR | MB_OK | MB_TOPMOST);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SubscribeToEvents();
|
// COM requires message loop to work, which is not implemented in service mode
|
||||||
|
if (!g_isWinService)
|
||||||
|
SubscribeToEvents();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,7 +478,8 @@ namespace win32
|
|||||||
HWND hWnd = FindWindow (I2PD_WIN32_CLASSNAME, TEXT("i2pd"));
|
HWND hWnd = FindWindow (I2PD_WIN32_CLASSNAME, TEXT("i2pd"));
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
PostMessage (hWnd, WM_COMMAND, MAKEWPARAM(ID_EXIT, 0), 0);
|
PostMessage (hWnd, WM_COMMAND, MAKEWPARAM(ID_EXIT, 0), 0);
|
||||||
// UnSubscribeFromEvents(); // TODO: understand why unsubscribing crashes app
|
else if(!g_isWinService)
|
||||||
|
UnSubscribeFromEvents();
|
||||||
UnregisterClass (I2PD_WIN32_CLASSNAME, GetModuleHandle(NULL));
|
UnregisterClass (I2PD_WIN32_CLASSNAME, GetModuleHandle(NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace win32
|
|||||||
{
|
{
|
||||||
extern DWORD g_GracefulShutdownEndtime;
|
extern DWORD g_GracefulShutdownEndtime;
|
||||||
|
|
||||||
bool StartWin32App ();
|
bool StartWin32App (bool isWinService);
|
||||||
void StopWin32App ();
|
void StopWin32App ();
|
||||||
int RunWin32App ();
|
int RunWin32App ();
|
||||||
bool GracefulShutdown ();
|
bool GracefulShutdown ();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -15,6 +15,7 @@ IUnknown *pUnknown = nullptr;
|
|||||||
INetworkListManager *pNetworkListManager = nullptr;
|
INetworkListManager *pNetworkListManager = nullptr;
|
||||||
IConnectionPointContainer *pCPContainer = nullptr;
|
IConnectionPointContainer *pCPContainer = nullptr;
|
||||||
IConnectionPoint *pConnectPoint = nullptr;
|
IConnectionPoint *pConnectPoint = nullptr;
|
||||||
|
CNetworkListManagerEvent *pNetEvent = nullptr;
|
||||||
DWORD Cookie = 0;
|
DWORD Cookie = 0;
|
||||||
|
|
||||||
void SubscribeToEvents()
|
void SubscribeToEvents()
|
||||||
@@ -29,7 +30,11 @@ void SubscribeToEvents()
|
|||||||
if (SUCCEEDED(Result))
|
if (SUCCEEDED(Result))
|
||||||
{
|
{
|
||||||
VARIANT_BOOL IsConnect = VARIANT_FALSE;
|
VARIANT_BOOL IsConnect = VARIANT_FALSE;
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
Result = pNetworkListManager->get_IsConnectedToInternet(&IsConnect);
|
||||||
|
#else
|
||||||
Result = pNetworkListManager->IsConnectedToInternet(&IsConnect);
|
Result = pNetworkListManager->IsConnectedToInternet(&IsConnect);
|
||||||
|
#endif
|
||||||
if (SUCCEEDED(Result)) {
|
if (SUCCEEDED(Result)) {
|
||||||
i2p::transport::transports.SetOnline (true);
|
i2p::transport::transports.SetOnline (true);
|
||||||
LogPrint(eLogInfo, "NetState: Current state: ", IsConnect == VARIANT_TRUE ? "connected" : "disconnected");
|
LogPrint(eLogInfo, "NetState: Current state: ", IsConnect == VARIANT_TRUE ? "connected" : "disconnected");
|
||||||
@@ -41,8 +46,8 @@ void SubscribeToEvents()
|
|||||||
Result = pCPContainer->FindConnectionPoint(IID_INetworkListManagerEvents, &pConnectPoint);
|
Result = pCPContainer->FindConnectionPoint(IID_INetworkListManagerEvents, &pConnectPoint);
|
||||||
if(SUCCEEDED(Result))
|
if(SUCCEEDED(Result))
|
||||||
{
|
{
|
||||||
CNetworkListManagerEvent *NetEvent = new CNetworkListManagerEvent;
|
pNetEvent = new CNetworkListManagerEvent;
|
||||||
Result = pConnectPoint->Advise((IUnknown *)NetEvent, &Cookie);
|
Result = pConnectPoint->Advise((IUnknown *)pNetEvent, &Cookie);
|
||||||
if (SUCCEEDED(Result))
|
if (SUCCEEDED(Result))
|
||||||
LogPrint(eLogInfo, "NetState: Successfully subscribed to NetworkListManagerEvent messages");
|
LogPrint(eLogInfo, "NetState: Successfully subscribed to NetworkListManagerEvent messages");
|
||||||
else
|
else
|
||||||
@@ -59,6 +64,7 @@ void SubscribeToEvents()
|
|||||||
|
|
||||||
void UnSubscribeFromEvents()
|
void UnSubscribeFromEvents()
|
||||||
{
|
{
|
||||||
|
LogPrint(eLogInfo, "NetState: Unsubscribing from NetworkListManagerEvents");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (pConnectPoint) {
|
if (pConnectPoint) {
|
||||||
@@ -66,14 +72,25 @@ void UnSubscribeFromEvents()
|
|||||||
pConnectPoint->Release();
|
pConnectPoint->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pNetEvent)
|
||||||
|
{
|
||||||
|
pNetEvent->Release();
|
||||||
|
}
|
||||||
|
|
||||||
if (pCPContainer)
|
if (pCPContainer)
|
||||||
|
{
|
||||||
pCPContainer->Release();
|
pCPContainer->Release();
|
||||||
|
}
|
||||||
|
|
||||||
if (pNetworkListManager)
|
if (pNetworkListManager)
|
||||||
|
{
|
||||||
pNetworkListManager->Release();
|
pNetworkListManager->Release();
|
||||||
|
}
|
||||||
|
|
||||||
if (pUnknown)
|
if (pUnknown)
|
||||||
|
{
|
||||||
pUnknown->Release();
|
pUnknown->Release();
|
||||||
|
}
|
||||||
|
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "Transports.h"
|
#include "Transports.h"
|
||||||
|
|
||||||
class CNetworkListManagerEvent : public INetworkListManagerEvents
|
class CNetworkListManagerEvent final : public INetworkListManagerEvents
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CNetworkListManagerEvent() : m_ref(1) { }
|
CNetworkListManagerEvent() : m_ref(1) { }
|
||||||
@@ -23,17 +23,15 @@ public:
|
|||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
|
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
|
||||||
{
|
{
|
||||||
HRESULT Result = S_OK;
|
|
||||||
if (IsEqualIID(riid, IID_IUnknown)) {
|
if (IsEqualIID(riid, IID_IUnknown)) {
|
||||||
*ppvObject = (IUnknown *)this;
|
*ppvObject = (IUnknown *)this;
|
||||||
} else if (IsEqualIID(riid ,IID_INetworkListManagerEvents)) {
|
} else if (IsEqualIID(riid ,IID_INetworkListManagerEvents)) {
|
||||||
*ppvObject = (INetworkListManagerEvents *)this;
|
*ppvObject = (INetworkListManagerEvents *)this;
|
||||||
} else {
|
} else {
|
||||||
Result = E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
AddRef();
|
AddRef();
|
||||||
|
return S_OK;
|
||||||
return Result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG STDMETHODCALLTYPE AddRef()
|
ULONG STDMETHODCALLTYPE AddRef()
|
||||||
|
|||||||
283
Win32/Win32Service.cpp
Normal file
283
Win32/Win32Service.cpp
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||||
|
*
|
||||||
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
*
|
||||||
|
* See full license text in LICENSE file at top of project tree
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Win32Service.h"
|
||||||
|
#include <assert.h>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include "Daemon.h"
|
||||||
|
#include "Log.h"
|
||||||
|
|
||||||
|
I2PService *I2PService::s_service = NULL;
|
||||||
|
|
||||||
|
BOOL I2PService::isService()
|
||||||
|
{
|
||||||
|
BOOL bIsService = FALSE;
|
||||||
|
HWINSTA hWinStation = GetProcessWindowStation();
|
||||||
|
if (hWinStation != NULL)
|
||||||
|
{
|
||||||
|
USEROBJECTFLAGS uof = { FALSE, FALSE, 0 };
|
||||||
|
if (GetUserObjectInformation(hWinStation, UOI_FLAGS, &uof, sizeof(USEROBJECTFLAGS), NULL) && ((uof.dwFlags & WSF_VISIBLE) == 0))
|
||||||
|
{
|
||||||
|
bIsService = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bIsService;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL I2PService::Run(I2PService &service)
|
||||||
|
{
|
||||||
|
s_service = &service;
|
||||||
|
SERVICE_TABLE_ENTRY serviceTable[] =
|
||||||
|
{
|
||||||
|
{ service.m_name, ServiceMain },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
return StartServiceCtrlDispatcher(serviceTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WINAPI I2PService::ServiceMain(DWORD dwArgc, PSTR *pszArgv)
|
||||||
|
{
|
||||||
|
assert(s_service != NULL);
|
||||||
|
s_service->m_statusHandle = RegisterServiceCtrlHandler(
|
||||||
|
s_service->m_name, ServiceCtrlHandler);
|
||||||
|
if (s_service->m_statusHandle == NULL)
|
||||||
|
{
|
||||||
|
throw GetLastError();
|
||||||
|
}
|
||||||
|
s_service->Start(dwArgc, pszArgv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void WINAPI I2PService::ServiceCtrlHandler(DWORD dwCtrl)
|
||||||
|
{
|
||||||
|
switch (dwCtrl)
|
||||||
|
{
|
||||||
|
case SERVICE_CONTROL_STOP: s_service->Stop(); break;
|
||||||
|
case SERVICE_CONTROL_PAUSE: s_service->Pause(); break;
|
||||||
|
case SERVICE_CONTROL_CONTINUE: s_service->Continue(); break;
|
||||||
|
case SERVICE_CONTROL_SHUTDOWN: s_service->Shutdown(); break;
|
||||||
|
case SERVICE_CONTROL_INTERROGATE: break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
I2PService::I2PService(PSTR pszServiceName,
|
||||||
|
BOOL fCanStop,
|
||||||
|
BOOL fCanShutdown,
|
||||||
|
BOOL fCanPauseContinue)
|
||||||
|
{
|
||||||
|
m_name = (pszServiceName == NULL) ? (PSTR)"" : pszServiceName;
|
||||||
|
m_statusHandle = NULL;
|
||||||
|
m_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
||||||
|
m_status.dwCurrentState = SERVICE_START_PENDING;
|
||||||
|
|
||||||
|
DWORD dwControlsAccepted = 0;
|
||||||
|
if (fCanStop)
|
||||||
|
dwControlsAccepted |= SERVICE_ACCEPT_STOP;
|
||||||
|
if (fCanShutdown)
|
||||||
|
dwControlsAccepted |= SERVICE_ACCEPT_SHUTDOWN;
|
||||||
|
if (fCanPauseContinue)
|
||||||
|
dwControlsAccepted |= SERVICE_ACCEPT_PAUSE_CONTINUE;
|
||||||
|
|
||||||
|
m_status.dwControlsAccepted = dwControlsAccepted;
|
||||||
|
m_status.dwWin32ExitCode = NO_ERROR;
|
||||||
|
m_status.dwServiceSpecificExitCode = 0;
|
||||||
|
m_status.dwCheckPoint = 0;
|
||||||
|
m_status.dwWaitHint = 0;
|
||||||
|
m_fStopping = FALSE;
|
||||||
|
// Create a manual-reset event that is not signaled at first to indicate
|
||||||
|
// the stopped signal of the service.
|
||||||
|
m_hStoppedEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
|
if (m_hStoppedEvent == NULL)
|
||||||
|
{
|
||||||
|
throw GetLastError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
I2PService::~I2PService(void)
|
||||||
|
{
|
||||||
|
if (m_hStoppedEvent)
|
||||||
|
{
|
||||||
|
CloseHandle(m_hStoppedEvent);
|
||||||
|
m_hStoppedEvent = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::Start(DWORD dwArgc, PSTR *pszArgv)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SetServiceStatus(SERVICE_START_PENDING);
|
||||||
|
OnStart(dwArgc, pszArgv);
|
||||||
|
SetServiceStatus(SERVICE_RUNNING);
|
||||||
|
}
|
||||||
|
catch (DWORD dwError)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Start error: ", dwError);
|
||||||
|
SetServiceStatus(SERVICE_STOPPED, dwError);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: failed to start: ", EVENTLOG_ERROR_TYPE);
|
||||||
|
SetServiceStatus(SERVICE_STOPPED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::OnStart(DWORD dwArgc, PSTR *pszArgv)
|
||||||
|
{
|
||||||
|
LogPrint(eLogInfo, "Win32Service: in OnStart (", EVENTLOG_INFORMATION_TYPE, ")");
|
||||||
|
Daemon.start();
|
||||||
|
_worker = new std::thread(std::bind(&I2PService::WorkerThread, this));
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::WorkerThread()
|
||||||
|
{
|
||||||
|
while (!m_fStopping)
|
||||||
|
{
|
||||||
|
::Sleep(1000); // Simulate some lengthy operations.
|
||||||
|
}
|
||||||
|
// Signal the stopped event.
|
||||||
|
SetEvent(m_hStoppedEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::Stop()
|
||||||
|
{
|
||||||
|
DWORD dwOriginalState = m_status.dwCurrentState;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SetServiceStatus(SERVICE_STOP_PENDING);
|
||||||
|
OnStop();
|
||||||
|
SetServiceStatus(SERVICE_STOPPED);
|
||||||
|
}
|
||||||
|
catch (DWORD dwError)
|
||||||
|
{
|
||||||
|
LogPrint(eLogInfo, "Win32Service: Stop error: ", dwError);
|
||||||
|
SetServiceStatus(dwOriginalState);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Failed to stop: ", EVENTLOG_ERROR_TYPE);
|
||||||
|
SetServiceStatus(dwOriginalState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::OnStop()
|
||||||
|
{
|
||||||
|
// Log a service stop message to the Application log.
|
||||||
|
LogPrint(eLogInfo, "Win32Service: in OnStop (", EVENTLOG_INFORMATION_TYPE, ")");
|
||||||
|
Daemon.stop();
|
||||||
|
m_fStopping = TRUE;
|
||||||
|
if (WaitForSingleObject(m_hStoppedEvent, INFINITE) != WAIT_OBJECT_0)
|
||||||
|
{
|
||||||
|
throw GetLastError();
|
||||||
|
}
|
||||||
|
_worker->join();
|
||||||
|
delete _worker;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::Pause()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SetServiceStatus(SERVICE_PAUSE_PENDING);
|
||||||
|
OnPause();
|
||||||
|
SetServiceStatus(SERVICE_PAUSED);
|
||||||
|
}
|
||||||
|
catch (DWORD dwError)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Pause error: ", dwError);
|
||||||
|
SetServiceStatus(SERVICE_RUNNING);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Failed to pause: ", EVENTLOG_ERROR_TYPE);
|
||||||
|
SetServiceStatus(SERVICE_RUNNING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::OnPause()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::Continue()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SetServiceStatus(SERVICE_CONTINUE_PENDING);
|
||||||
|
OnContinue();
|
||||||
|
SetServiceStatus(SERVICE_RUNNING);
|
||||||
|
}
|
||||||
|
catch (DWORD dwError)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Continue error: ", dwError);
|
||||||
|
SetServiceStatus(SERVICE_PAUSED);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Failed to resume: ", EVENTLOG_ERROR_TYPE);
|
||||||
|
SetServiceStatus(SERVICE_PAUSED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::OnContinue()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::Shutdown()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
OnShutdown();
|
||||||
|
SetServiceStatus(SERVICE_STOPPED);
|
||||||
|
}
|
||||||
|
catch (DWORD dwError)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Shutdown error: ", dwError);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
LogPrint(eLogCritical, "Win32Service: Failed to shut down: ", EVENTLOG_ERROR_TYPE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::OnShutdown()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PService::SetServiceStatus(DWORD dwCurrentState,
|
||||||
|
DWORD dwWin32ExitCode,
|
||||||
|
DWORD dwWaitHint)
|
||||||
|
{
|
||||||
|
static DWORD dwCheckPoint = 1;
|
||||||
|
m_status.dwCurrentState = dwCurrentState;
|
||||||
|
m_status.dwWin32ExitCode = dwWin32ExitCode;
|
||||||
|
m_status.dwWaitHint = dwWaitHint;
|
||||||
|
m_status.dwCheckPoint =
|
||||||
|
((dwCurrentState == SERVICE_RUNNING) ||
|
||||||
|
(dwCurrentState == SERVICE_STOPPED)) ?
|
||||||
|
0 : dwCheckPoint++;
|
||||||
|
|
||||||
|
::SetServiceStatus(m_statusHandle, &m_status);
|
||||||
|
}
|
||||||
|
|
||||||
|
//*****************************************************************************
|
||||||
|
|
||||||
|
void FreeHandles(SC_HANDLE schSCManager, SC_HANDLE schService)
|
||||||
|
{
|
||||||
|
if (schSCManager)
|
||||||
|
{
|
||||||
|
CloseServiceHandle(schSCManager);
|
||||||
|
schSCManager = NULL;
|
||||||
|
}
|
||||||
|
if (schService)
|
||||||
|
{
|
||||||
|
CloseServiceHandle(schService);
|
||||||
|
schService = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
63
Win32/Win32Service.h
Normal file
63
Win32/Win32Service.h
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||||
|
*
|
||||||
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
*
|
||||||
|
* See full license text in LICENSE file at top of project tree
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WIN_32_SERVICE_H__
|
||||||
|
#define WIN_32_SERVICE_H__
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#define SERVICE_NAME "i2pdService"
|
||||||
|
|
||||||
|
class I2PService
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
I2PService(PSTR pszServiceName,
|
||||||
|
BOOL fCanStop = TRUE,
|
||||||
|
BOOL fCanShutdown = TRUE,
|
||||||
|
BOOL fCanPauseContinue = FALSE);
|
||||||
|
|
||||||
|
virtual ~I2PService(void);
|
||||||
|
|
||||||
|
static BOOL isService();
|
||||||
|
static BOOL Run(I2PService &service);
|
||||||
|
void Stop();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
virtual void OnStart(DWORD dwArgc, PSTR *pszArgv);
|
||||||
|
virtual void OnStop();
|
||||||
|
virtual void OnPause();
|
||||||
|
virtual void OnContinue();
|
||||||
|
virtual void OnShutdown();
|
||||||
|
void SetServiceStatus(DWORD dwCurrentState,
|
||||||
|
DWORD dwWin32ExitCode = NO_ERROR,
|
||||||
|
DWORD dwWaitHint = 0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
static void WINAPI ServiceMain(DWORD dwArgc, LPSTR *lpszArgv);
|
||||||
|
static void WINAPI ServiceCtrlHandler(DWORD dwCtrl);
|
||||||
|
void WorkerThread();
|
||||||
|
void Start(DWORD dwArgc, PSTR *pszArgv);
|
||||||
|
void Pause();
|
||||||
|
void Continue();
|
||||||
|
void Shutdown();
|
||||||
|
static I2PService* s_service;
|
||||||
|
PSTR m_name;
|
||||||
|
SERVICE_STATUS m_status;
|
||||||
|
SERVICE_STATUS_HANDLE m_statusHandle;
|
||||||
|
|
||||||
|
BOOL m_fStopping;
|
||||||
|
HANDLE m_hStoppedEvent;
|
||||||
|
|
||||||
|
std::thread* _worker;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WIN_32_SERVICE_H__
|
||||||
BIN
Win32/mask.bmp
BIN
Win32/mask.bmp
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
14
build/.gitignore
vendored
14
build/.gitignore
vendored
@@ -1,6 +1,13 @@
|
|||||||
# Various generated files
|
# Various generated files
|
||||||
/CMakeFiles/
|
/CMakeFiles/
|
||||||
|
/Testing/
|
||||||
|
/tests/
|
||||||
|
/.ninja_*
|
||||||
|
/arch.c
|
||||||
|
/build.ninja
|
||||||
/i2pd
|
/i2pd
|
||||||
|
/i2pd.exe
|
||||||
|
/i2pd.exe.debug
|
||||||
/libi2pd.a
|
/libi2pd.a
|
||||||
/libi2pdclient.a
|
/libi2pdclient.a
|
||||||
/libi2pdlang.a
|
/libi2pdlang.a
|
||||||
@@ -8,8 +15,13 @@
|
|||||||
/CMakeCache.txt
|
/CMakeCache.txt
|
||||||
/CPackConfig.cmake
|
/CPackConfig.cmake
|
||||||
/CPackSourceConfig.cmake
|
/CPackSourceConfig.cmake
|
||||||
|
/CTestTestfile.cmake
|
||||||
/install_manifest.txt
|
/install_manifest.txt
|
||||||
/arch.c
|
/Makefile
|
||||||
# windows build script
|
# windows build script
|
||||||
i2pd*.zip
|
i2pd*.zip
|
||||||
build*.log
|
build*.log
|
||||||
|
# MVS project files
|
||||||
|
*.vcxproj
|
||||||
|
*.vcxproj.filters
|
||||||
|
*.sln
|
||||||
|
|||||||
@@ -1,49 +1,64 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
# this addresses CMP0059 with CMake > 3.3 for PCH flags
|
|
||||||
cmake_policy(VERSION 2.8.12)
|
if(${CMAKE_VERSION} VERSION_LESS 3.22)
|
||||||
project("i2pd")
|
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||||
|
else()
|
||||||
|
cmake_policy(VERSION 3.22)
|
||||||
|
endif()
|
||||||
|
|
||||||
# for debugging
|
# for debugging
|
||||||
#set(CMAKE_VERBOSE_MAKEFILE on)
|
#set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
||||||
# Win32 build with cmake is not supported
|
# paths
|
||||||
if(WIN32 OR MSVC OR MSYS OR MINGW)
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
|
||||||
message(SEND_ERROR "cmake build for windows is not supported. Please use MSYS2 with makefiles in project root.")
|
set(CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||||
endif()
|
|
||||||
|
set(LIBI2PD_SRC_DIR ${CMAKE_SOURCE_DIR}/libi2pd)
|
||||||
|
set(LIBI2PD_CLIENT_SRC_DIR ${CMAKE_SOURCE_DIR}/libi2pd_client)
|
||||||
|
set(LANG_SRC_DIR ${CMAKE_SOURCE_DIR}/i18n)
|
||||||
|
set(DAEMON_SRC_DIR ${CMAKE_SOURCE_DIR}/daemon)
|
||||||
|
|
||||||
|
include(Version)
|
||||||
|
set_version("${LIBI2PD_SRC_DIR}/version.h" PROJECT_VERSION)
|
||||||
|
|
||||||
|
project(
|
||||||
|
i2pd
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
|
HOMEPAGE_URL "https://i2pd.website/"
|
||||||
|
LANGUAGES C CXX
|
||||||
|
)
|
||||||
|
|
||||||
# configurable options
|
# configurable options
|
||||||
option(WITH_AESNI "Use AES-NI instructions set" ON)
|
|
||||||
option(WITH_HARDENING "Use hardening compiler flags" OFF)
|
option(WITH_HARDENING "Use hardening compiler flags" OFF)
|
||||||
option(WITH_LIBRARY "Build library" ON)
|
option(WITH_LIBRARY "Build library" ON)
|
||||||
option(WITH_BINARY "Build binary" ON)
|
option(WITH_BINARY "Build binary" ON)
|
||||||
option(WITH_STATIC "Static build" OFF)
|
option(WITH_STATIC "Static build" OFF)
|
||||||
option(WITH_UPNP "Include support for UPnP client" OFF)
|
option(WITH_UPNP "Include support for UPnP client" OFF)
|
||||||
option(WITH_PCH "Use precompiled header" OFF)
|
option(WITH_GIT_VERSION "Use git commit info as version" OFF)
|
||||||
option(WITH_MESHNET "Build for cjdns test network" OFF)
|
|
||||||
option(WITH_ADDRSANITIZER "Build with address sanitizer unix only" OFF)
|
option(WITH_ADDRSANITIZER "Build with address sanitizer unix only" OFF)
|
||||||
option(WITH_THREADSANITIZER "Build with thread sanitizer unix only" OFF)
|
option(WITH_THREADSANITIZER "Build with thread sanitizer unix only" OFF)
|
||||||
|
option(BUILD_TESTING "Build tests" OFF)
|
||||||
|
|
||||||
# paths
|
IF(BUILD_TESTING)
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
|
enable_testing()
|
||||||
set(CMAKE_SOURCE_DIR "..")
|
ENDIF()
|
||||||
|
|
||||||
#Handle paths nicely
|
# Handle paths nicely
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# architecture
|
# Architecture
|
||||||
include(TargetArch)
|
include(TargetArch)
|
||||||
target_architecture(ARCHITECTURE)
|
target_architecture(ARCHITECTURE)
|
||||||
|
|
||||||
set(LIBI2PD_SRC_DIR ../libi2pd)
|
include(CheckAtomic)
|
||||||
set(LIBI2PD_CLIENT_SRC_DIR ../libi2pd_client)
|
|
||||||
set(LANG_SRC_DIR ../i18n)
|
if(WITH_STATIC)
|
||||||
set(DAEMON_SRC_DIR ../daemon)
|
if(MSVC)
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(${LIBI2PD_SRC_DIR})
|
include_directories(${LIBI2PD_SRC_DIR})
|
||||||
include_directories(${LIBI2PD_CLIENT_SRC_DIR})
|
|
||||||
include_directories(${LANG_SRC_DIR})
|
|
||||||
include_directories(${DAEMON_SRC_DIR})
|
|
||||||
|
|
||||||
FILE(GLOB LIBI2PD_SRC ${LIBI2PD_SRC_DIR}/*.cpp)
|
FILE(GLOB LIBI2PD_SRC ${LIBI2PD_SRC_DIR}/*.cpp)
|
||||||
add_library(libi2pd ${LIBI2PD_SRC})
|
add_library(libi2pd ${LIBI2PD_SRC})
|
||||||
set_target_properties(libi2pd PROPERTIES PREFIX "")
|
set_target_properties(libi2pd PROPERTIES PREFIX "")
|
||||||
@@ -54,11 +69,9 @@ if(WITH_LIBRARY)
|
|||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
COMPONENT Libraries)
|
COMPONENT Libraries)
|
||||||
# TODO Make libi2pd available to 3rd party projects via CMake as imported target
|
|
||||||
# FIXME This pulls stdafx
|
|
||||||
# install(EXPORT libi2pd DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include_directories(${LIBI2PD_CLIENT_SRC_DIR})
|
||||||
FILE(GLOB CLIENT_SRC ${LIBI2PD_CLIENT_SRC_DIR}/*.cpp)
|
FILE(GLOB CLIENT_SRC ${LIBI2PD_CLIENT_SRC_DIR}/*.cpp)
|
||||||
add_library(libi2pdclient ${CLIENT_SRC})
|
add_library(libi2pdclient ${CLIENT_SRC})
|
||||||
set_target_properties(libi2pdclient PROPERTIES PREFIX "")
|
set_target_properties(libi2pdclient PROPERTIES PREFIX "")
|
||||||
@@ -71,6 +84,7 @@ if(WITH_LIBRARY)
|
|||||||
COMPONENT Libraries)
|
COMPONENT Libraries)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include_directories(${LANG_SRC_DIR})
|
||||||
FILE(GLOB LANG_SRC ${LANG_SRC_DIR}/*.cpp)
|
FILE(GLOB LANG_SRC ${LANG_SRC_DIR}/*.cpp)
|
||||||
add_library(libi2pdlang ${LANG_SRC})
|
add_library(libi2pdlang ${LANG_SRC})
|
||||||
set_target_properties(libi2pdlang PROPERTIES PREFIX "")
|
set_target_properties(libi2pdlang PROPERTIES PREFIX "")
|
||||||
@@ -83,39 +97,64 @@ if(WITH_LIBRARY)
|
|||||||
COMPONENT Libraries)
|
COMPONENT Libraries)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include_directories(${DAEMON_SRC_DIR})
|
||||||
|
|
||||||
set(DAEMON_SRC
|
set(DAEMON_SRC
|
||||||
"${DAEMON_SRC_DIR}/Daemon.cpp"
|
"${DAEMON_SRC_DIR}/Daemon.cpp"
|
||||||
"${DAEMON_SRC_DIR}/HTTPServer.cpp"
|
"${DAEMON_SRC_DIR}/HTTPServer.cpp"
|
||||||
"${DAEMON_SRC_DIR}/I2PControl.cpp"
|
"${DAEMON_SRC_DIR}/I2PControl.cpp"
|
||||||
|
"${DAEMON_SRC_DIR}/I2PControlHandlers.cpp"
|
||||||
"${DAEMON_SRC_DIR}/i2pd.cpp"
|
"${DAEMON_SRC_DIR}/i2pd.cpp"
|
||||||
"${DAEMON_SRC_DIR}/UPnP.cpp"
|
"${DAEMON_SRC_DIR}/UPnP.cpp"
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_MESHNET)
|
if(WIN32)
|
||||||
add_definitions(-DMESHNET)
|
set(WIN32_SRC_DIR ${CMAKE_SOURCE_DIR}/Win32)
|
||||||
|
include_directories(${WIN32_SRC_DIR})
|
||||||
|
|
||||||
|
list(APPEND DAEMON_SRC
|
||||||
|
"${WIN32_SRC_DIR}/DaemonWin32.cpp"
|
||||||
|
"${WIN32_SRC_DIR}/Win32App.cpp"
|
||||||
|
"${WIN32_SRC_DIR}/Win32Service.cpp"
|
||||||
|
"${WIN32_SRC_DIR}/Win32NetState.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
file(GLOB WIN32_RC ${WIN32_SRC_DIR}/*.rc)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_UPNP)
|
if(WITH_UPNP)
|
||||||
add_definitions(-DUSE_UPNP)
|
add_definitions(-DUSE_UPNP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wno-unused-parameter")
|
if(WITH_GIT_VERSION)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pedantic")
|
include(GetGitRevisionDescription)
|
||||||
# TODO: The following is incompatible with static build and enabled hardening for OpenWRT.
|
git_describe(GIT_VERSION)
|
||||||
# Multiple definitions of __stack_chk_fail(libssp & libc)
|
add_definitions(-DGITVER=${GIT_VERSION})
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -flto -s -ffunction-sections -fdata-sections")
|
endif()
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,--gc-sections") # -flto is added from above
|
|
||||||
|
|
||||||
# check for c++17 & c++11 support
|
if(APPLE)
|
||||||
include(CheckCXXCompilerFlag)
|
add_definitions(-DMAC_OSX)
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=c++17" CXX17_SUPPORTED)
|
endif()
|
||||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" CXX11_SUPPORTED)
|
|
||||||
if(CXX17_SUPPORTED)
|
if(HAIKU)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
add_definitions(-D_DEFAULT_SOURCE -D_GNU_SOURCE)
|
||||||
elseif(CXX11_SUPPORTED)
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
|
if(MSVC)
|
||||||
|
add_definitions(-DWINVER=0x0600)
|
||||||
|
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||||
else()
|
else()
|
||||||
message(SEND_ERROR "C++17 nor C++11 standard not seems to be supported by compiler. Too old version?")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wno-unused-parameter -Wno-uninitialized")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pedantic")
|
||||||
|
# TODO: The following is incompatible with static build and enabled hardening for OpenWRT.
|
||||||
|
# Multiple definitions of __stack_chk_fail(libssp & libc)
|
||||||
|
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -flto -s")
|
||||||
|
endif()
|
||||||
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -ffunction-sections -fdata-sections")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,--gc-sections") # -flto is added from above
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
@@ -145,13 +184,6 @@ if(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Note: AES-NI and AVX is available on x86-based CPU's.
|
|
||||||
# Here also ARM64 implementation, but currently we don't support it.
|
|
||||||
if(WITH_AESNI AND (ARCHITECTURE MATCHES "x86_64" OR ARCHITECTURE MATCHES "i386"))
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
|
||||||
add_definitions(-D__AES__)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_ADDRSANITIZER)
|
if(WITH_ADDRSANITIZER)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||||
@@ -166,27 +198,52 @@ if(WITH_THREADSANITIZER)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0) # gcc 8-9
|
||||||
|
list(APPEND CMAKE_REQUIRED_LIBRARIES "stdc++fs")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Use std::atomic instead of GCC builtins on macOS PowerPC:
|
||||||
|
# For more information refer to: https://github.com/PurpleI2P/i2pd/issues/1726#issuecomment-1306335111
|
||||||
|
# This has been fixed in Boost 1.81, nevertheless we retain the setting for the sake of compatibility.
|
||||||
|
if(APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
|
||||||
|
add_definitions(-DBOOST_SP_USE_STD_ATOMIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
# libraries
|
# libraries
|
||||||
# TODO: once CMake 3.1+ becomes mainstream, see e.g. http://stackoverflow.com/a/29871891/673826
|
|
||||||
# use imported Threads::Threads instead
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
if(IOS)
|
find_package(Threads REQUIRED)
|
||||||
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
|
||||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
|
||||||
set(CMAKE_USE_WIN32_THREADS_INIT 0)
|
|
||||||
set(CMAKE_USE_PTHREADS_INIT 1)
|
|
||||||
else()
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
endif()
|
|
||||||
if(THREADS_HAVE_PTHREAD_ARG) # compile time flag
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_STATIC)
|
if(WITH_STATIC)
|
||||||
|
if(NOT MSVC)
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
set(Boost_USE_STATIC_RUNTIME ON)
|
if(MSVC)
|
||||||
|
set(Boost_USE_STATIC_RUNTIME ON)
|
||||||
|
else()
|
||||||
|
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(OPENSSL_MSVC_STATIC_RT ON)
|
||||||
|
endif()
|
||||||
|
set(OPENSSL_USE_STATIC_LIBS ON)
|
||||||
|
|
||||||
|
set(ZLIB_USE_STATIC_LIBS ON)
|
||||||
|
if(MSVC)
|
||||||
|
set(ZLIB_NAMES zlibstatic zlibstat)
|
||||||
|
else()
|
||||||
|
set(ZLIB_NAMES libz zlibstatic zlibstat zlib z)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_UPNP)
|
||||||
|
set(MINIUPNPC_USE_STATIC_LIBS ON)
|
||||||
|
add_definitions(-DMINIUPNP_STATICLIB)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
|
|
||||||
if(${CMAKE_CXX_COMPILER} MATCHES ".*-openwrt-.*")
|
if(${CMAKE_CXX_COMPILER} MATCHES ".*-openwrt-.*")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||||
# set(CMAKE_THREAD_LIBS_INIT "gcc_eh -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
|
# set(CMAKE_THREAD_LIBS_INIT "gcc_eh -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
|
||||||
@@ -196,37 +253,30 @@ else()
|
|||||||
# TODO: Consider separate compilation for LIBI2PD_SRC for library.
|
# TODO: Consider separate compilation for LIBI2PD_SRC for library.
|
||||||
# No need in -fPIC overhead for binary if not interested in library
|
# No need in -fPIC overhead for binary if not interested in library
|
||||||
# HINT: revert c266cff CMakeLists.txt: compilation speed up
|
# HINT: revert c266cff CMakeLists.txt: compilation speed up
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
if(NOT MSVC)
|
||||||
add_definitions(-DBOOST_SYSTEM_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_REGEX_DYN_LINK)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
|
endif()
|
||||||
|
add_definitions(-DBOOST_ATOMIC_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK)
|
||||||
|
if(WIN32)
|
||||||
|
set(Boost_USE_STATIC_LIBS OFF)
|
||||||
|
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_PCH)
|
find_package(Boost REQUIRED COMPONENTS system filesystem program_options)
|
||||||
include_directories(BEFORE ${CMAKE_BINARY_DIR})
|
if(NOT DEFINED Boost_FOUND)
|
||||||
add_library(stdafx STATIC "${LIBI2PD_SRC_DIR}/stdafx.cpp")
|
|
||||||
string(TOUPPER ${CMAKE_BUILD_TYPE} BTU)
|
|
||||||
get_directory_property(DEFS DEFINITIONS)
|
|
||||||
string(REPLACE " " ";" FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTU}} ${DEFS}")
|
|
||||||
add_custom_command(TARGET stdafx PRE_BUILD
|
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} ${FLAGS} -c ${CMAKE_CURRENT_SOURCE_DIR}/../libi2pd/stdafx.h -o ${CMAKE_BINARY_DIR}/stdafx.h.gch
|
|
||||||
)
|
|
||||||
target_compile_options(libi2pd PRIVATE -include libi2pd/stdafx.h)
|
|
||||||
target_compile_options(libi2pdclient PRIVATE -include libi2pd/stdafx.h)
|
|
||||||
target_compile_options(libi2pdlang PRIVATE -include libi2pd/stdafx.h)
|
|
||||||
target_link_libraries(libi2pd stdafx)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(libi2pdclient libi2pd libi2pdlang)
|
|
||||||
|
|
||||||
find_package(Boost COMPONENTS system filesystem program_options date_time REQUIRED)
|
|
||||||
if(NOT DEFINED Boost_INCLUDE_DIRS)
|
|
||||||
message(SEND_ERROR "Boost is not found, or your boost version was below 1.46. Please download Boost!")
|
message(SEND_ERROR "Boost is not found, or your boost version was below 1.46. Please download Boost!")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
if(NOT DEFINED OPENSSL_INCLUDE_DIR)
|
if(NOT DEFINED OPENSSL_FOUND)
|
||||||
message(SEND_ERROR "Could not find OpenSSL. Please download and install it first!")
|
message(SEND_ERROR "Could not find OpenSSL. Please download and install it first!")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(OPENSSL_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||||
|
add_definitions(-DOPENSSL_SUPPRESS_DEPRECATED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_UPNP)
|
if(WITH_UPNP)
|
||||||
find_package(MiniUPnPc REQUIRED)
|
find_package(MiniUPnPc REQUIRED)
|
||||||
if(NOT MINIUPNPC_FOUND)
|
if(NOT MINIUPNPC_FOUND)
|
||||||
@@ -241,19 +291,29 @@ if(ZLIB_FOUND)
|
|||||||
link_directories(${ZLIB_ROOT}/lib)
|
link_directories(${ZLIB_ROOT}/lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# C++ standard to use, based on compiler and version of boost
|
||||||
|
if(NOT MSVC)
|
||||||
|
# check for c++20 & c++17 support
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
|
if(Boost_VERSION VERSION_GREATER_EQUAL "1.83") # min boost version for c++20
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-std=c++20" CXX20_SUPPORTED)
|
||||||
|
endif()
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-std=c++17" CXX17_SUPPORTED)
|
||||||
|
|
||||||
|
|
||||||
|
if(CXX20_SUPPORTED)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
|
||||||
|
elseif(CXX17_SUPPORTED)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||||
|
else()
|
||||||
|
message(SEND_ERROR "C++20 nor C++17 standard not seems to be supported by compiler. Too old version?")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# load includes
|
# load includes
|
||||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
# warn if for meshnet
|
|
||||||
if(WITH_MESHNET)
|
|
||||||
message(STATUS "Building for testnet")
|
|
||||||
message(WARNING "This build will NOT work on mainline i2p")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT MSYS)
|
|
||||||
include(CheckAtomic)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# show summary
|
# show summary
|
||||||
message(STATUS "---------------------------------------")
|
message(STATUS "---------------------------------------")
|
||||||
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}")
|
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}")
|
||||||
@@ -261,54 +321,72 @@ message(STATUS "Compiler vendor : ${CMAKE_CXX_COMPILER_ID}")
|
|||||||
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}")
|
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}")
|
message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}")
|
||||||
message(STATUS "Architecture : ${ARCHITECTURE}")
|
message(STATUS "Architecture : ${ARCHITECTURE}")
|
||||||
|
message(STATUS "Compiler flags : ${CMAKE_CXX_FLAGS}")
|
||||||
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}")
|
||||||
message(STATUS "Options:")
|
message(STATUS "Options:")
|
||||||
message(STATUS " AESNI : ${WITH_AESNI}")
|
|
||||||
message(STATUS " HARDENING : ${WITH_HARDENING}")
|
message(STATUS " HARDENING : ${WITH_HARDENING}")
|
||||||
message(STATUS " LIBRARY : ${WITH_LIBRARY}")
|
message(STATUS " LIBRARY : ${WITH_LIBRARY}")
|
||||||
message(STATUS " BINARY : ${WITH_BINARY}")
|
message(STATUS " BINARY : ${WITH_BINARY}")
|
||||||
message(STATUS " STATIC BUILD : ${WITH_STATIC}")
|
message(STATUS " STATIC BUILD : ${WITH_STATIC}")
|
||||||
message(STATUS " UPnP : ${WITH_UPNP}")
|
message(STATUS " UPnP : ${WITH_UPNP}")
|
||||||
message(STATUS " PCH : ${WITH_PCH}")
|
if(WITH_GIT_VERSION)
|
||||||
message(STATUS " MESHNET : ${WITH_MESHNET}")
|
message(STATUS " GIT VERSION : ${WITH_GIT_VERSION} (${GIT_VERSION})")
|
||||||
|
else()
|
||||||
|
message(STATUS " GIT VERSION : ${WITH_GIT_VERSION}")
|
||||||
|
endif()
|
||||||
message(STATUS " ADDRSANITIZER : ${WITH_ADDRSANITIZER}")
|
message(STATUS " ADDRSANITIZER : ${WITH_ADDRSANITIZER}")
|
||||||
message(STATUS " THREADSANITIZER : ${WITH_THREADSANITIZER}")
|
message(STATUS " THREADSANITIZER : ${WITH_THREADSANITIZER}")
|
||||||
message(STATUS "---------------------------------------")
|
message(STATUS "---------------------------------------")
|
||||||
|
|
||||||
if(WITH_BINARY)
|
if(WITH_BINARY)
|
||||||
add_executable("${PROJECT_NAME}" ${DAEMON_SRC})
|
if(WIN32)
|
||||||
|
add_executable("${PROJECT_NAME}" WIN32 ${DAEMON_SRC} ${WIN32_RC})
|
||||||
if(WITH_STATIC)
|
else()
|
||||||
set_target_properties("${PROJECT_NAME}" PROPERTIES LINK_FLAGS "-static")
|
add_executable("${PROJECT_NAME}" ${DAEMON_SRC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_PCH)
|
if(WIN32)
|
||||||
target_compile_options("${PROJECT_NAME}" PRIVATE -include libi2pd/stdafx.h)
|
list(APPEND MINGW_EXTRA "wsock32" "ws2_32" "iphlpapi")
|
||||||
|
# OpenSSL may require Crypt32 library on MSVC build, which is not added by CMake lesser than 3.21
|
||||||
|
if(MSVC AND ${CMAKE_VERSION} VERSION_LESS 3.21)
|
||||||
|
list(APPEND MINGW_EXTRA "crypt32")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_STATIC)
|
||||||
|
if(NOT MSVC)
|
||||||
|
set_target_properties("${PROJECT_NAME}" PROPERTIES LINK_FLAGS "-static")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_HARDENING AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(WITH_HARDENING AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
set_target_properties("${PROJECT_NAME}" PROPERTIES LINK_FLAGS "-z relro -z now")
|
set_target_properties("${PROJECT_NAME}" PROPERTIES LINK_FLAGS "-z relro -z now")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_UPNP)
|
|
||||||
set(UPNP_LIB ${MINIUPNPC_LIBRARY})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# FindBoost pulls pthread for thread which is broken for static linking at least on Ubuntu 15.04
|
# FindBoost pulls pthread for thread which is broken for static linking at least on Ubuntu 15.04
|
||||||
list(GET Boost_LIBRARIES -1 LAST_Boost_LIBRARIES)
|
list(GET Boost_LIBRARIES -1 LAST_Boost_LIBRARIES)
|
||||||
if(${LAST_Boost_LIBRARIES} MATCHES ".*pthread.*")
|
if(${LAST_Boost_LIBRARIES} MATCHES ".*pthread.*")
|
||||||
list(REMOVE_AT Boost_LIBRARIES -1)
|
list(REMOVE_AT Boost_LIBRARIES -1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# synchronization library is incompatible with Windows 7
|
||||||
|
if(WIN32)
|
||||||
|
get_target_property(BOOSTFSLIBS Boost::filesystem INTERFACE_LINK_LIBRARIES)
|
||||||
|
list(REMOVE_ITEM BOOSTFSLIBS synchronization)
|
||||||
|
set_target_properties(Boost::filesystem PROPERTIES INTERFACE_LINK_LIBRARIES "${BOOSTFSLIBS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_STATIC)
|
if(WITH_STATIC)
|
||||||
set(DL_LIB ${CMAKE_DL_LIBS})
|
set(DL_LIB ${CMAKE_DL_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(libi2pd ${Boost_LIBRARIES} ${ZLIB_LIBRARY})
|
target_link_libraries("${PROJECT_NAME}" libi2pd libi2pdclient libi2pdlang ${Boost_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto ${MINIUPNPC_LIBRARY} ZLIB::ZLIB Threads::Threads ${MINGW_EXTRA} ${DL_LIB} ${CMAKE_REQUIRED_LIBRARIES})
|
||||||
target_link_libraries("${PROJECT_NAME}" libi2pd libi2pdclient libi2pdlang ${DL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${UPNP_LIB} ${ZLIB_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MINGW_EXTRA} ${DL_LIB} ${CMAKE_REQUIRED_LIBRARIES})
|
|
||||||
|
|
||||||
install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
|
install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
|
||||||
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||||
set(DIRS "${Boost_LIBRARY_DIR};${OPENSSL_INCLUDE_DIR}/../bin;${ZLIB_INCLUDE_DIR}/../bin;/mingw32/bin")
|
set(DIRS "${Boost_LIBRARY_DIR};${OPENSSL_INCLUDE_DIR}/../bin;${ZLIB_INCLUDE_DIR}/../bin;/mingw32/bin")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_TESTING)
|
||||||
|
add_subdirectory(${CMAKE_SOURCE_DIR}/tests ${CMAKE_CURRENT_BINARY_DIR}/tests)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -2,23 +2,22 @@
|
|||||||
setlocal enableextensions enabledelayedexpansion
|
setlocal enableextensions enabledelayedexpansion
|
||||||
title Building i2pd
|
title Building i2pd
|
||||||
|
|
||||||
REM Copyright (c) 2013-2020, The PurpleI2P Project
|
REM Copyright (c) 2013-2022, The PurpleI2P Project
|
||||||
REM This file is part of Purple i2pd project and licensed under BSD3
|
REM This file is part of Purple i2pd project and licensed under BSD3
|
||||||
REM See full license text in LICENSE file at top of project tree
|
REM See full license text in LICENSE file at top of project tree
|
||||||
|
|
||||||
REM To use that script, you must have installed in your MSYS installation these packages:
|
REM To use that script, you must have installed in your MSYS installation these packages:
|
||||||
REM Base: git make zip
|
REM Base: git make zip
|
||||||
REM x86_64: mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-gcc
|
REM UCRT64: mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-gcc
|
||||||
REM i686: mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-gcc
|
REM MINGW32: mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-gcc
|
||||||
|
|
||||||
REM setting up variables for MSYS
|
REM setting up variables for MSYS
|
||||||
REM Note: if you installed MSYS64 to different path, edit WD variable (only C:\msys64 needed to edit)!
|
REM Note: if you installed MSYS64 to different path, edit WD variable (only C:\msys64 needed to edit)
|
||||||
set "WD=C:\msys64\usr\bin\"
|
|
||||||
set MSYS2_PATH_TYPE=inherit
|
set MSYS2_PATH_TYPE=inherit
|
||||||
set CHERE_INVOKING=enabled_from_arguments
|
set CHERE_INVOKING=enabled_from_arguments
|
||||||
REM set MSYSTEM=MSYS
|
|
||||||
set MSYSTEM=MINGW32
|
set MSYSTEM=MINGW32
|
||||||
|
|
||||||
|
set "WD=C:\msys64\usr\bin\"
|
||||||
set "xSH=%WD%bash -lc"
|
set "xSH=%WD%bash -lc"
|
||||||
|
|
||||||
set "FILELIST=i2pd.exe README.txt contrib/i2pd.conf contrib/tunnels.conf contrib/certificates contrib/tunnels.d contrib/webconsole"
|
set "FILELIST=i2pd.exe README.txt contrib/i2pd.conf contrib/tunnels.conf contrib/certificates contrib/tunnels.d contrib/webconsole"
|
||||||
@@ -36,12 +35,12 @@ echo Receiving latest commit and cleaning up...
|
|||||||
%xSH% "git checkout contrib/* && git pull && make clean" > build\build.log 2>&1
|
%xSH% "git checkout contrib/* && git pull && make clean" > build\build.log 2>&1
|
||||||
|
|
||||||
REM set to variable current commit hash
|
REM set to variable current commit hash
|
||||||
FOR /F "usebackq" %%a IN (`%xSH% "git describe --tags"`) DO (
|
for /F "usebackq" %%a in (`%xSH% "git describe --tags"`) DO (
|
||||||
set tag=%%a
|
set tag=%%a
|
||||||
)
|
)
|
||||||
|
|
||||||
REM set to variable latest released tag
|
REM set to variable latest released tag
|
||||||
FOR /F "usebackq" %%b IN (`%xSH% "git describe --abbrev=0"`) DO (
|
for /F "usebackq" %%b in (`%xSH% "git describe --abbrev=0"`) DO (
|
||||||
set reltag=%%b
|
set reltag=%%b
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -49,31 +48,57 @@ echo Preparing configuration files and README for packaging...
|
|||||||
|
|
||||||
%xSH% "echo To use configs and certificates, move all files and certificates folder from contrib directory here. > README.txt" >> nul
|
%xSH% "echo To use configs and certificates, move all files and certificates folder from contrib directory here. > README.txt" >> nul
|
||||||
|
|
||||||
REM converting configuration files to DOS format (usable in default notepad)
|
REM converting configuration files to DOS format (make usable in Windows Notepad)
|
||||||
%xSH% "unix2dos contrib/i2pd.conf contrib/tunnels.conf contrib/tunnels.d/* contrib/webconsole/style.css" >> build\build.log 2>&1
|
%xSH% "unix2dos contrib/i2pd.conf contrib/tunnels.conf contrib/tunnels.d/* contrib/webconsole/style.css" >> build\build.log 2>&1
|
||||||
|
|
||||||
|
REM Prepare binary signing command if signing key and password provided
|
||||||
|
if defined SIGN (
|
||||||
|
echo Signing enabled
|
||||||
|
|
||||||
|
for %%X in (signtool.exe) do (set xSIGNTOOL=%%~$PATH:X)
|
||||||
|
if not defined xSIGNTOOL (
|
||||||
|
if not defined SIGNTOOL (
|
||||||
|
echo Error: Can't find signtool. Please provide path to binary using SIGNTOOL variable.
|
||||||
|
exit /b 1
|
||||||
|
) else (
|
||||||
|
set "xSIGNTOOL=%SIGNTOOL%"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined SIGNKEY (
|
||||||
|
set "xSIGNKEYOPTS=/f ^"%SIGNKEY%^""
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined SIGNPASS (
|
||||||
|
set "xSIGNPASSOPTS=/p ^"%SIGNPASS%^""
|
||||||
|
)
|
||||||
|
|
||||||
|
set "xSIGNOPTS=sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 %xSIGNKEYOPTS% %xSIGNPASSOPTS%"
|
||||||
|
)
|
||||||
|
|
||||||
REM starting building
|
REM starting building
|
||||||
set MSYSTEM=MINGW32
|
set MSYSTEM=MINGW32
|
||||||
set bitness=32
|
set bitness=32
|
||||||
call :BUILDING
|
call :BUILDING
|
||||||
|
|
||||||
set MSYSTEM=MINGW64
|
set MSYSTEM=UCRT64
|
||||||
set bitness=64
|
set bitness=64
|
||||||
call :BUILDING
|
call :BUILDING
|
||||||
|
|
||||||
IF exist C:\msys64-xp\ (
|
REM build for Windows XP
|
||||||
REM building for WinXP
|
if exist C:\msys64-xp\ ( call :BUILDING_XP )
|
||||||
set "WD=C:\msys64-xp\usr\bin\"
|
|
||||||
set MSYSTEM=MINGW32
|
echo.
|
||||||
set bitness=32
|
|
||||||
set "xSH=%WD%bash -lc"
|
|
||||||
call :BUILDING_XP
|
|
||||||
echo.
|
|
||||||
)
|
|
||||||
|
|
||||||
REM compile installer
|
REM compile installer
|
||||||
|
echo Building installer...
|
||||||
C:\PROGRA~2\INNOSE~1\ISCC.exe /dI2Pd_TextVer="%tag%" /dI2Pd_Ver="%reltag%.0" build\win_installer.iss >> build\build.log 2>&1
|
C:\PROGRA~2\INNOSE~1\ISCC.exe /dI2Pd_TextVer="%tag%" /dI2Pd_Ver="%reltag%.0" build\win_installer.iss >> build\build.log 2>&1
|
||||||
|
|
||||||
|
REM Sign binary
|
||||||
|
if defined xSIGNOPTS (
|
||||||
|
"%xSIGNTOOL%" %xSIGNOPTS% build\setup_i2pd_v%tag%.exe
|
||||||
|
)
|
||||||
|
|
||||||
%xSH% "git checkout contrib/*" >> build\build.log 2>&1
|
%xSH% "git checkout contrib/*" >> build\build.log 2>&1
|
||||||
del README.txt i2pd_x32.exe i2pd_x64.exe i2pd_xp.exe >> nul
|
del README.txt i2pd_x32.exe i2pd_x64.exe i2pd_xp.exe >> nul
|
||||||
|
|
||||||
@@ -84,12 +109,41 @@ exit /b 0
|
|||||||
:BUILDING
|
:BUILDING
|
||||||
%xSH% "make clean" >> nul
|
%xSH% "make clean" >> nul
|
||||||
echo Building i2pd %tag% for win%bitness%...
|
echo Building i2pd %tag% for win%bitness%...
|
||||||
%xSH% "make DEBUG=no USE_UPNP=yes -j%threads% && cp i2pd.exe i2pd_x%bitness%.exe && zip -r9 build/i2pd_%tag%_win%bitness%_mingw.zip %FILELIST% && make clean" > build\build_win%bitness%_%tag%.log 2>&1
|
REM Build i2pd
|
||||||
|
%xSH% "make DEBUG=no USE_UPNP=yes -j%threads%" > build\build_win%bitness%_%tag%.log 2>&1
|
||||||
|
|
||||||
|
REM Sign binary
|
||||||
|
if defined xSIGNOPTS (
|
||||||
|
"%xSIGNTOOL%" %xSIGNOPTS% i2pd.exe
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Copy binary for installer and create distribution archive
|
||||||
|
%xSH% "cp i2pd.exe i2pd_x%bitness%.exe && zip -r9 build/i2pd_%tag%_win%bitness%_mingw.zip %FILELIST%" >> build\build_win%bitness%_%tag%.log 2>&1
|
||||||
|
|
||||||
|
REM Clean work directory
|
||||||
|
%xSH% "make clean" >> build\build_win%bitness%_%tag%.log 2>&1
|
||||||
goto EOF
|
goto EOF
|
||||||
|
|
||||||
:BUILDING_XP
|
:BUILDING_XP
|
||||||
|
set MSYSTEM=MINGW32
|
||||||
|
set bitness=32
|
||||||
|
set "WD=C:\msys64-xp\usr\bin\"
|
||||||
|
set "xSH=%WD%bash -lc"
|
||||||
|
|
||||||
%xSH% "make clean" >> nul
|
%xSH% "make clean" >> nul
|
||||||
echo Building i2pd %tag% for winxp...
|
echo Building i2pd %tag% for winxp...
|
||||||
%xSH% "make DEBUG=no USE_UPNP=yes USE_WINXP_FLAGS=yes -j%threads% && cp i2pd.exe i2pd_xp.exe && zip -r9 build/i2pd_%tag%_winxp_mingw.zip %FILELIST% && make clean" > build\build_winxp_%tag%.log 2>&1
|
%xSH% "make DEBUG=no USE_UPNP=yes USE_WINXP_FLAGS=yes -j%threads%" > build\build_winxp_%tag%.log 2>&1
|
||||||
|
|
||||||
:EOF
|
REM Sign binary
|
||||||
|
if defined xSIGNOPTS (
|
||||||
|
"%xSIGNTOOL%" %xSIGNOPTS% i2pd.exe
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Copy binary for installer and create distribution archive
|
||||||
|
%xSH% "cp i2pd.exe i2pd_xp.exe && zip -r9 build/i2pd_%tag%_winxp_mingw.zip %FILELIST%" >> build\build_winxp_%tag%.log 2>&1
|
||||||
|
|
||||||
|
REM Clean work directory
|
||||||
|
%xSH% "make clean" >> build\build_winxp_%tag%.log 2>&1
|
||||||
|
goto EOF
|
||||||
|
|
||||||
|
:EOF
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
# atomic builtins are required for threading support.
|
# atomic builtins are required for threading support.
|
||||||
|
|
||||||
INCLUDE(CheckCXXSourceCompiles)
|
INCLUDE(CheckCXXSourceCompiles)
|
||||||
|
INCLUDE(CheckLibraryExists)
|
||||||
|
|
||||||
# Sometimes linking against libatomic is required for atomic ops, if
|
# Sometimes linking against libatomic is required for atomic ops, if
|
||||||
# the platform doesn't support lock-free atomics.
|
# the platform doesn't support lock-free atomics.
|
||||||
|
|
||||||
function(check_working_cxx_atomics varname)
|
function(check_working_cxx_atomics varname)
|
||||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
|
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++17")
|
||||||
CHECK_CXX_SOURCE_COMPILES("
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
std::atomic<int> x;
|
std::atomic<int> x;
|
||||||
|
std::atomic<short> y;
|
||||||
|
std::atomic<char> z;
|
||||||
int main() {
|
int main() {
|
||||||
return x;
|
++z;
|
||||||
|
++y;
|
||||||
|
return ++x;
|
||||||
}
|
}
|
||||||
" ${varname})
|
" ${varname})
|
||||||
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
|
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
|
||||||
@@ -20,13 +25,14 @@ endfunction(check_working_cxx_atomics)
|
|||||||
|
|
||||||
function(check_working_cxx_atomics64 varname)
|
function(check_working_cxx_atomics64 varname)
|
||||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}")
|
set(CMAKE_REQUIRED_FLAGS "-std=c++17 ${CMAKE_REQUIRED_FLAGS}")
|
||||||
CHECK_CXX_SOURCE_COMPILES("
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
std::atomic<uint64_t> x (0);
|
std::atomic<uint64_t> x (0);
|
||||||
int main() {
|
int main() {
|
||||||
uint64_t i = x.load(std::memory_order_relaxed);
|
uint64_t i = x.load(std::memory_order_relaxed);
|
||||||
|
(void)i;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
" ${varname})
|
" ${varname})
|
||||||
@@ -34,15 +40,16 @@ int main() {
|
|||||||
endfunction(check_working_cxx_atomics64)
|
endfunction(check_working_cxx_atomics64)
|
||||||
|
|
||||||
|
|
||||||
# This isn't necessary on MSVC, so avoid command-line switch annoyance
|
# Check for (non-64-bit) atomic operations.
|
||||||
# by only running on GCC-like hosts.
|
if(MSVC)
|
||||||
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
|
set(HAVE_CXX_ATOMICS_WITHOUT_LIB True)
|
||||||
|
else()
|
||||||
# First check if atomics work without the library.
|
# First check if atomics work without the library.
|
||||||
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||||
# If not, check if the library exists, and atomics work with it.
|
# If not, check if the library exists, and atomics work with it.
|
||||||
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||||
check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
|
check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
|
||||||
if( HAVE_LIBATOMIC )
|
if(HAVE_LIBATOMIC)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||||
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
|
check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
|
||||||
if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
|
if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
|
||||||
@@ -58,20 +65,20 @@ endif()
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
|
set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
|
||||||
else()
|
else()
|
||||||
|
# First check if atomics work without the library.
|
||||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||||
endif()
|
# If not, check if the library exists, and atomics work with it.
|
||||||
|
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||||
# If not, check if the library exists, and atomics work with it.
|
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
||||||
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
if(HAVE_CXX_LIBATOMICS64)
|
||||||
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||||
if(HAVE_CXX_LIBATOMICS64)
|
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
|
message(FATAL_ERROR "Host compiler must support 64-bit std::atomic!")
|
||||||
if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
|
endif()
|
||||||
message(FATAL_ERROR "Host compiler must support std::atomic!")
|
else()
|
||||||
|
message(FATAL_ERROR "Host compiler appears to require libatomic for 64-bit operations, but cannot find it.")
|
||||||
endif()
|
endif()
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -80,7 +87,6 @@ endif()
|
|||||||
## assumes C++11 <atomic> works.
|
## assumes C++11 <atomic> works.
|
||||||
CHECK_CXX_SOURCE_COMPILES("
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <Intrin.h> /* Workaround for PR19898. */
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
int main() {
|
int main() {
|
||||||
|
|||||||
55
build/cmake_modules/FindCheck.cmake
Normal file
55
build/cmake_modules/FindCheck.cmake
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# - Try to find the CHECK libraries
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# CHECK_FOUND - system has check
|
||||||
|
# CHECK_INCLUDE_DIRS - the check include directory
|
||||||
|
# CHECK_LIBRARIES - check library
|
||||||
|
#
|
||||||
|
# Copyright (c) 2007 Daniel Gollub <gollub@b1-systems.de>
|
||||||
|
# Copyright (c) 2007-2009 Bjoern Ricks <bjoern.ricks@gmail.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the New
|
||||||
|
# BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
|
||||||
|
INCLUDE( FindPkgConfig )
|
||||||
|
|
||||||
|
IF ( Check_FIND_REQUIRED )
|
||||||
|
SET( _pkgconfig_REQUIRED "REQUIRED" )
|
||||||
|
ELSE( Check_FIND_REQUIRED )
|
||||||
|
SET( _pkgconfig_REQUIRED "" )
|
||||||
|
ENDIF ( Check_FIND_REQUIRED )
|
||||||
|
|
||||||
|
IF ( CHECK_MIN_VERSION )
|
||||||
|
PKG_SEARCH_MODULE( CHECK ${_pkgconfig_REQUIRED} check>=${CHECK_MIN_VERSION} )
|
||||||
|
ELSE ( CHECK_MIN_VERSION )
|
||||||
|
PKG_SEARCH_MODULE( CHECK ${_pkgconfig_REQUIRED} check )
|
||||||
|
ENDIF ( CHECK_MIN_VERSION )
|
||||||
|
|
||||||
|
# Look for CHECK include dir and libraries
|
||||||
|
IF( NOT CHECK_FOUND AND NOT PKG_CONFIG_FOUND )
|
||||||
|
|
||||||
|
FIND_PATH( CHECK_INCLUDE_DIRS check.h )
|
||||||
|
|
||||||
|
FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
|
||||||
|
|
||||||
|
IF ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES )
|
||||||
|
SET( CHECK_FOUND 1 )
|
||||||
|
IF ( NOT Check_FIND_QUIETLY )
|
||||||
|
MESSAGE ( STATUS "Found CHECK: ${CHECK_LIBRARIES}" )
|
||||||
|
ENDIF ( NOT Check_FIND_QUIETLY )
|
||||||
|
ELSE ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES )
|
||||||
|
IF ( Check_FIND_REQUIRED )
|
||||||
|
MESSAGE( FATAL_ERROR "Could NOT find CHECK" )
|
||||||
|
ELSE ( Check_FIND_REQUIRED )
|
||||||
|
IF ( NOT Check_FIND_QUIETLY )
|
||||||
|
MESSAGE( STATUS "Could NOT find CHECK" )
|
||||||
|
ENDIF ( NOT Check_FIND_QUIETLY )
|
||||||
|
ENDIF ( Check_FIND_REQUIRED )
|
||||||
|
ENDIF ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES )
|
||||||
|
ENDIF( NOT CHECK_FOUND AND NOT PKG_CONFIG_FOUND )
|
||||||
|
|
||||||
|
# Hide advanced variables from CMake GUIs
|
||||||
|
MARK_AS_ADVANCED( CHECK_INCLUDE_DIRS CHECK_LIBRARIES )
|
||||||
|
|
||||||
284
build/cmake_modules/GetGitRevisionDescription.cmake
Normal file
284
build/cmake_modules/GetGitRevisionDescription.cmake
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
# - Returns a version string from Git
|
||||||
|
#
|
||||||
|
# These functions force a re-configure on each git commit so that you can
|
||||||
|
# trust the values of the variables in your build system.
|
||||||
|
#
|
||||||
|
# get_git_head_revision(<refspecvar> <hashvar> [ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR])
|
||||||
|
#
|
||||||
|
# Returns the refspec and sha hash of the current head revision
|
||||||
|
#
|
||||||
|
# git_describe(<var> [<additional arguments to git describe> ...])
|
||||||
|
#
|
||||||
|
# Returns the results of git describe on the source tree, and adjusting
|
||||||
|
# the output so that it tests false if an error occurs.
|
||||||
|
#
|
||||||
|
# git_describe_working_tree(<var> [<additional arguments to git describe> ...])
|
||||||
|
#
|
||||||
|
# Returns the results of git describe on the working tree (--dirty option),
|
||||||
|
# and adjusting the output so that it tests false if an error occurs.
|
||||||
|
#
|
||||||
|
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
|
||||||
|
#
|
||||||
|
# Returns the results of git describe --exact-match on the source tree,
|
||||||
|
# and adjusting the output so that it tests false if there was no exact
|
||||||
|
# matching tag.
|
||||||
|
#
|
||||||
|
# git_local_changes(<var>)
|
||||||
|
#
|
||||||
|
# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes.
|
||||||
|
# Uses the return code of "git diff-index --quiet HEAD --".
|
||||||
|
# Does not regard untracked files.
|
||||||
|
#
|
||||||
|
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||||
|
#
|
||||||
|
# Original Author:
|
||||||
|
# 2009-2020 Ryan Pavlik <ryan.pavlik@gmail.com> <abiryan@ryand.net>
|
||||||
|
# http://academic.cleardefinition.com
|
||||||
|
#
|
||||||
|
# Copyright 2009-2013, Iowa State University.
|
||||||
|
# Copyright 2013-2020, Ryan Pavlik
|
||||||
|
# Copyright 2013-2020, Contributors
|
||||||
|
# SPDX-License-Identifier: BSL-1.0
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
if(__get_git_revision_description)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(__get_git_revision_description YES)
|
||||||
|
|
||||||
|
# We must run the following at "include" time, not at function call time,
|
||||||
|
# to find the path to this module rather than the path to a calling list file
|
||||||
|
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||||
|
|
||||||
|
# Function _git_find_closest_git_dir finds the next closest .git directory
|
||||||
|
# that is part of any directory in the path defined by _start_dir.
|
||||||
|
# The result is returned in the parent scope variable whose name is passed
|
||||||
|
# as variable _git_dir_var. If no .git directory can be found, the
|
||||||
|
# function returns an empty string via _git_dir_var.
|
||||||
|
#
|
||||||
|
# Example: Given a path C:/bla/foo/bar and assuming C:/bla/.git exists and
|
||||||
|
# neither foo nor bar contain a file/directory .git. This will return
|
||||||
|
# C:/bla/.git
|
||||||
|
#
|
||||||
|
function(_git_find_closest_git_dir _start_dir _git_dir_var)
|
||||||
|
set(cur_dir "${_start_dir}")
|
||||||
|
set(git_dir "${_start_dir}/.git")
|
||||||
|
while(NOT EXISTS "${git_dir}")
|
||||||
|
# .git dir not found, search parent directories
|
||||||
|
set(git_previous_parent "${cur_dir}")
|
||||||
|
get_filename_component(cur_dir "${cur_dir}" DIRECTORY)
|
||||||
|
if(cur_dir STREQUAL git_previous_parent)
|
||||||
|
# We have reached the root directory, we are not in git
|
||||||
|
set(${_git_dir_var}
|
||||||
|
""
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(git_dir "${cur_dir}/.git")
|
||||||
|
endwhile()
|
||||||
|
set(${_git_dir_var}
|
||||||
|
"${git_dir}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(get_git_head_revision _refspecvar _hashvar)
|
||||||
|
_git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR)
|
||||||
|
|
||||||
|
if("${ARGN}" STREQUAL "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR")
|
||||||
|
set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR TRUE)
|
||||||
|
else()
|
||||||
|
set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR FALSE)
|
||||||
|
endif()
|
||||||
|
if(NOT "${GIT_DIR}" STREQUAL "")
|
||||||
|
file(RELATIVE_PATH _relative_to_source_dir "${CMAKE_SOURCE_DIR}"
|
||||||
|
"${GIT_DIR}")
|
||||||
|
if("${_relative_to_source_dir}" MATCHES "[.][.]" AND NOT ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)
|
||||||
|
# We've gone above the CMake root dir.
|
||||||
|
set(GIT_DIR "")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if("${GIT_DIR}" STREQUAL "")
|
||||||
|
set(${_refspecvar}
|
||||||
|
"GITDIR-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
set(${_hashvar}
|
||||||
|
"GITDIR-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Check if the current source dir is a git submodule or a worktree.
|
||||||
|
# In both cases .git is a file instead of a directory.
|
||||||
|
#
|
||||||
|
if(NOT IS_DIRECTORY ${GIT_DIR})
|
||||||
|
# The following git command will return a non empty string that
|
||||||
|
# points to the super project working tree if the current
|
||||||
|
# source dir is inside a git submodule.
|
||||||
|
# Otherwise the command will return an empty string.
|
||||||
|
#
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${GIT_EXECUTABLE}" rev-parse
|
||||||
|
--show-superproject-working-tree
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
OUTPUT_VARIABLE out
|
||||||
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(NOT "${out}" STREQUAL "")
|
||||||
|
# If out is empty, GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a submodule
|
||||||
|
file(READ ${GIT_DIR} submodule)
|
||||||
|
string(REGEX REPLACE "gitdir: (.*)$" "\\1" GIT_DIR_RELATIVE
|
||||||
|
${submodule})
|
||||||
|
string(STRIP ${GIT_DIR_RELATIVE} GIT_DIR_RELATIVE)
|
||||||
|
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
|
||||||
|
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE}
|
||||||
|
ABSOLUTE)
|
||||||
|
set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
|
||||||
|
else()
|
||||||
|
# GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a worktree
|
||||||
|
file(READ ${GIT_DIR} worktree_ref)
|
||||||
|
# The .git directory contains a path to the worktree information directory
|
||||||
|
# inside the parent git repo of the worktree.
|
||||||
|
#
|
||||||
|
string(REGEX REPLACE "gitdir: (.*)$" "\\1" git_worktree_dir
|
||||||
|
${worktree_ref})
|
||||||
|
string(STRIP ${git_worktree_dir} git_worktree_dir)
|
||||||
|
_git_find_closest_git_dir("${git_worktree_dir}" GIT_DIR)
|
||||||
|
set(HEAD_SOURCE_FILE "${git_worktree_dir}/HEAD")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
|
||||||
|
endif()
|
||||||
|
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
|
||||||
|
if(NOT EXISTS "${GIT_DATA}")
|
||||||
|
file(MAKE_DIRECTORY "${GIT_DATA}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EXISTS "${HEAD_SOURCE_FILE}")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(HEAD_FILE "${GIT_DATA}/HEAD")
|
||||||
|
configure_file("${HEAD_SOURCE_FILE}" "${HEAD_FILE}" COPYONLY)
|
||||||
|
|
||||||
|
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
|
||||||
|
"${GIT_DATA}/grabRef.cmake" @ONLY)
|
||||||
|
include("${GIT_DATA}/grabRef.cmake")
|
||||||
|
|
||||||
|
set(${_refspecvar}
|
||||||
|
"${HEAD_REF}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
set(${_hashvar}
|
||||||
|
"${HEAD_HASH}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(git_describe _var)
|
||||||
|
if(NOT GIT_FOUND)
|
||||||
|
find_package(Git QUIET)
|
||||||
|
endif()
|
||||||
|
get_git_head_revision(refspec hash)
|
||||||
|
if(NOT GIT_FOUND)
|
||||||
|
set(${_var}
|
||||||
|
"GIT-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
if(NOT hash)
|
||||||
|
set(${_var}
|
||||||
|
"HEAD-HASH-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO sanitize
|
||||||
|
#if((${ARGN}" MATCHES "&&") OR
|
||||||
|
# (ARGN MATCHES "||") OR
|
||||||
|
# (ARGN MATCHES "\\;"))
|
||||||
|
# message("Please report the following error to the project!")
|
||||||
|
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
|
||||||
|
#endif()
|
||||||
|
|
||||||
|
#message(STATUS "Arguments to execute_process: ${ARGN}")
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${GIT_EXECUTABLE}" describe --tags --always ${hash} ${ARGN}
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
RESULT_VARIABLE res
|
||||||
|
OUTPUT_VARIABLE out
|
||||||
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(NOT res EQUAL 0)
|
||||||
|
set(out "${out}-${res}-NOTFOUND")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${_var}
|
||||||
|
"${out}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(git_describe_working_tree _var)
|
||||||
|
if(NOT GIT_FOUND)
|
||||||
|
find_package(Git QUIET)
|
||||||
|
endif()
|
||||||
|
if(NOT GIT_FOUND)
|
||||||
|
set(${_var}
|
||||||
|
"GIT-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${GIT_EXECUTABLE}" describe --dirty ${ARGN}
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
RESULT_VARIABLE res
|
||||||
|
OUTPUT_VARIABLE out
|
||||||
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(NOT res EQUAL 0)
|
||||||
|
set(out "${out}-${res}-NOTFOUND")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${_var}
|
||||||
|
"${out}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(git_get_exact_tag _var)
|
||||||
|
git_describe(out --exact-match ${ARGN})
|
||||||
|
set(${_var}
|
||||||
|
"${out}"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(git_local_changes _var)
|
||||||
|
if(NOT GIT_FOUND)
|
||||||
|
find_package(Git QUIET)
|
||||||
|
endif()
|
||||||
|
get_git_head_revision(refspec hash)
|
||||||
|
if(NOT GIT_FOUND)
|
||||||
|
set(${_var}
|
||||||
|
"GIT-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
if(NOT hash)
|
||||||
|
set(${_var}
|
||||||
|
"HEAD-HASH-NOTFOUND"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD --
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
RESULT_VARIABLE res
|
||||||
|
OUTPUT_VARIABLE out
|
||||||
|
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
if(res EQUAL 0)
|
||||||
|
set(${_var}
|
||||||
|
"CLEAN"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
set(${_var}
|
||||||
|
"DIRTY"
|
||||||
|
PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
43
build/cmake_modules/GetGitRevisionDescription.cmake.in
Normal file
43
build/cmake_modules/GetGitRevisionDescription.cmake.in
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# Internal file for GetGitRevisionDescription.cmake
|
||||||
|
#
|
||||||
|
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||||
|
#
|
||||||
|
# Original Author:
|
||||||
|
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||||
|
# http://academic.cleardefinition.com
|
||||||
|
# Iowa State University HCI Graduate Program/VRAC
|
||||||
|
#
|
||||||
|
# Copyright 2009-2012, Iowa State University
|
||||||
|
# Copyright 2011-2015, Contributors
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
# SPDX-License-Identifier: BSL-1.0
|
||||||
|
|
||||||
|
set(HEAD_HASH)
|
||||||
|
|
||||||
|
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
|
||||||
|
|
||||||
|
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
|
||||||
|
if(HEAD_CONTENTS MATCHES "ref")
|
||||||
|
# named branch
|
||||||
|
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||||
|
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||||
|
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
|
else()
|
||||||
|
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
|
||||||
|
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
|
||||||
|
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
|
||||||
|
set(HEAD_HASH "${CMAKE_MATCH_1}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# detached HEAD
|
||||||
|
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT HEAD_HASH)
|
||||||
|
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||||
|
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||||
|
endif()
|
||||||
@@ -1,16 +1,30 @@
|
|||||||
|
# Copyright (c) 2017-2023, The PurpleI2P Project
|
||||||
|
# This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
# See full license text in LICENSE file at top of project tree
|
||||||
|
|
||||||
# Based on the Qt 5 processor detection code, so should be very accurate
|
# Based on the Qt 5 processor detection code, so should be very accurate
|
||||||
# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h
|
# https://github.com/qt/qtbase/blob/dev/src/corelib/global/qprocessordetection.h
|
||||||
# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64)
|
# Currently handles arm (v5, v6, v7, v8), x86 (32/64), ia64, mips (32/64, mipsel, mips64el) and ppc (32/64)
|
||||||
|
|
||||||
# Regarding POWER/PowerPC, just as is noted in the Qt source,
|
# Regarding POWER/PowerPC, just as is noted in the Qt source,
|
||||||
# "There are many more known variants/revisions that we do not handle/detect."
|
# "There are many more known variants/revisions that we do not handle/detect."
|
||||||
|
|
||||||
set(archdetect_c_code "
|
set(archdetect_c_code "
|
||||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
|
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)|| defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__)
|
||||||
#if defined(__ARM_ARCH_7__) \\
|
#if defined(__ARM64_ARCH_8__) \\
|
||||||
|
|| defined(__aarch64__) \\
|
||||||
|
|| defined(__ARMv8__) \\
|
||||||
|
|| defined(__ARMv8_A__) \\
|
||||||
|
|| defined(_M_ARM64) \\
|
||||||
|
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 8)
|
||||||
|
#error cmake_ARCH arm64
|
||||||
|
#elif defined(__ARM_ARCH_7__) \\
|
||||||
|| defined(__ARM_ARCH_7A__) \\
|
|| defined(__ARM_ARCH_7A__) \\
|
||||||
|| defined(__ARM_ARCH_7R__) \\
|
|| defined(__ARM_ARCH_7R__) \\
|
||||||
|| defined(__ARM_ARCH_7M__) \\
|
|| defined(__ARM_ARCH_7M__) \\
|
||||||
|
|| defined(__ARM_ARCH_7S__) \\
|
||||||
|
|| defined(_ARM_ARCH_7) \\
|
||||||
|
|| defined(__CORE_CORTEXA__) \\
|
||||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7)
|
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7)
|
||||||
#error cmake_ARCH armv7
|
#error cmake_ARCH armv7
|
||||||
#elif defined(__ARM_ARCH_6__) \\
|
#elif defined(__ARM_ARCH_6__) \\
|
||||||
@@ -23,6 +37,7 @@ set(archdetect_c_code "
|
|||||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6)
|
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6)
|
||||||
#error cmake_ARCH armv6
|
#error cmake_ARCH armv6
|
||||||
#elif defined(__ARM_ARCH_5TEJ__) \\
|
#elif defined(__ARM_ARCH_5TEJ__) \\
|
||||||
|
|| defined(__ARM_ARCH_5TE__) \\
|
||||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5)
|
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5)
|
||||||
#error cmake_ARCH armv5
|
#error cmake_ARCH armv5
|
||||||
#else
|
#else
|
||||||
@@ -34,7 +49,19 @@ set(archdetect_c_code "
|
|||||||
#error cmake_ARCH x86_64
|
#error cmake_ARCH x86_64
|
||||||
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||||
#error cmake_ARCH ia64
|
#error cmake_ARCH ia64
|
||||||
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\
|
#elif defined(__mips) || defined(__mips__) || defined(_M_MRX000)
|
||||||
|
#if defined(_MIPS_ARCH_MIPS64) || defined(__mips64)
|
||||||
|
#if defined(__MIPSEL__)
|
||||||
|
#error cmake_ARCH mips64el
|
||||||
|
#else
|
||||||
|
#error cmake_ARCH mips64
|
||||||
|
#endif
|
||||||
|
#elif defined(__MIPSEL__)
|
||||||
|
#error cmake_ARCH mipsel
|
||||||
|
#else
|
||||||
|
#error cmake_ARCH mips
|
||||||
|
#endif
|
||||||
|
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(__POWERPC__) \\
|
||||||
|| defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\
|
|| defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \\
|
||||||
|| defined(_M_MPPC) || defined(_M_PPC)
|
|| defined(_M_MPPC) || defined(_M_PPC)
|
||||||
#if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
|
#if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
|
||||||
@@ -47,7 +74,7 @@ set(archdetect_c_code "
|
|||||||
#error cmake_ARCH unknown
|
#error cmake_ARCH unknown
|
||||||
")
|
")
|
||||||
|
|
||||||
# Set ppc_support to TRUE before including this file or ppc and ppc64
|
# Set ppc_support to TRUE before including this file on ppc and ppc64
|
||||||
# will be treated as invalid architectures since they are no longer supported by Apple
|
# will be treated as invalid architectures since they are no longer supported by Apple
|
||||||
|
|
||||||
function(target_architecture output_var)
|
function(target_architecture output_var)
|
||||||
@@ -56,23 +83,25 @@ function(target_architecture output_var)
|
|||||||
# First let's normalize the order of the values
|
# First let's normalize the order of the values
|
||||||
|
|
||||||
# Note that it's not possible to compile PowerPC applications if you are using
|
# Note that it's not possible to compile PowerPC applications if you are using
|
||||||
# the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we
|
# the OS X SDK version 10.7 or later - you'll need 10.4/10.5/10.6 for that, so we
|
||||||
# disable it by default
|
# disable it by default. Also, ppc64 is not supported in 10.6.
|
||||||
# See this page for more information:
|
# See this page for more information:
|
||||||
# http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4
|
# http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4
|
||||||
|
|
||||||
# Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
|
# Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
|
||||||
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise.
|
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise; 10.6 also supports ppc.
|
||||||
|
|
||||||
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
|
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
|
||||||
if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
|
if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
|
||||||
set(osx_arch_ppc TRUE)
|
set(osx_arch_ppc TRUE)
|
||||||
|
elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support)
|
||||||
|
set(osx_arch_ppc64 TRUE)
|
||||||
elseif("${osx_arch}" STREQUAL "i386")
|
elseif("${osx_arch}" STREQUAL "i386")
|
||||||
set(osx_arch_i386 TRUE)
|
set(osx_arch_i386 TRUE)
|
||||||
elseif("${osx_arch}" STREQUAL "x86_64")
|
elseif("${osx_arch}" STREQUAL "x86_64")
|
||||||
set(osx_arch_x86_64 TRUE)
|
set(osx_arch_x86_64 TRUE)
|
||||||
elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support)
|
elseif("${osx_arch}" STREQUAL "arm64")
|
||||||
set(osx_arch_ppc64 TRUE)
|
set(osx_arch_arm64 TRUE)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}")
|
message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}")
|
||||||
endif()
|
endif()
|
||||||
@@ -83,6 +112,10 @@ function(target_architecture output_var)
|
|||||||
list(APPEND ARCH ppc)
|
list(APPEND ARCH ppc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(osx_arch_ppc64)
|
||||||
|
list(APPEND ARCH ppc64)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(osx_arch_i386)
|
if(osx_arch_i386)
|
||||||
list(APPEND ARCH i386)
|
list(APPEND ARCH i386)
|
||||||
endif()
|
endif()
|
||||||
@@ -91,8 +124,8 @@ function(target_architecture output_var)
|
|||||||
list(APPEND ARCH x86_64)
|
list(APPEND ARCH x86_64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(osx_arch_ppc64)
|
if(osx_arch_arm64)
|
||||||
list(APPEND ARCH ppc64)
|
list(APPEND ARCH arm64)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
|
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
|
||||||
@@ -100,11 +133,11 @@ function(target_architecture output_var)
|
|||||||
enable_language(C)
|
enable_language(C)
|
||||||
|
|
||||||
# Detect the architecture in a rather creative way...
|
# Detect the architecture in a rather creative way...
|
||||||
# This compiles a small C program which is a series of ifdefs that selects a
|
# This compiles a small C program which is a series of ifdefs that selects
|
||||||
# particular #error preprocessor directive whose message string contains the
|
# a particular #error preprocessor directive whose message string contains
|
||||||
# target architecture. The program will always fail to compile (both because
|
# the target architecture. The program will always fail to compile (both because
|
||||||
# file is not a valid C program, and obviously because of the presence of the
|
# file is not a valid C program, and obviously because of the presence of
|
||||||
# #error preprocessor directives... but by exploiting the preprocessor in this
|
# the #error preprocessor directives... but by exploiting the preprocessor in this
|
||||||
# way, we can detect the correct target architecture even when cross-compiling,
|
# way, we can detect the correct target architecture even when cross-compiling,
|
||||||
# since the program itself never needs to be run (only the compiler/preprocessor)
|
# since the program itself never needs to be run (only the compiler/preprocessor)
|
||||||
try_run(
|
try_run(
|
||||||
|
|||||||
16
build/cmake_modules/Version.cmake
Normal file
16
build/cmake_modules/Version.cmake
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# read version
|
||||||
|
|
||||||
|
function(set_version version_file output_var)
|
||||||
|
file(READ "${version_file}" version_data)
|
||||||
|
|
||||||
|
string(REGEX MATCH "I2PD_VERSION_MAJOR ([0-9]*)" _ ${version_data})
|
||||||
|
set(version_major ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
|
string(REGEX MATCH "I2PD_VERSION_MINOR ([0-9]*)" _ ${version_data})
|
||||||
|
set(version_minor ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
|
string(REGEX MATCH "I2PD_VERSION_MICRO ([0-9]*)" _ ${version_data})
|
||||||
|
set(version_micro ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
|
set(${output_var} "${version_major}.${version_minor}.${version_micro}" PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
#define I2Pd_AppName "i2pd"
|
#define I2Pd_AppName "i2pd"
|
||||||
#define I2Pd_Publisher "PurpleI2P"
|
#define I2Pd_Publisher "PurpleI2P"
|
||||||
; Get application version from compiled binary
|
|
||||||
; Disabled to use definition from command line
|
|
||||||
;#define I2Pd_ver GetFileVersionString(AddBackslash(SourcePath) + "..\i2pd_x64.exe")
|
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName={#I2Pd_AppName}
|
AppName={#I2Pd_AppName}
|
||||||
@@ -27,7 +24,7 @@ ExtraDiskSpaceRequired=15
|
|||||||
|
|
||||||
AppID={{621A23E0-3CF4-4BD6-97BC-4835EA5206A2}
|
AppID={{621A23E0-3CF4-4BD6-97BC-4835EA5206A2}
|
||||||
AppVerName={#I2Pd_AppName}
|
AppVerName={#I2Pd_AppName}
|
||||||
AppCopyright=Copyright (c) 2013-2020, The PurpleI2P Project
|
AppCopyright=Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
AppPublisherURL=http://i2pd.website/
|
AppPublisherURL=http://i2pd.website/
|
||||||
AppSupportURL=https://github.com/PurpleI2P/i2pd/issues
|
AppSupportURL=https://github.com/PurpleI2P/i2pd/issues
|
||||||
AppUpdatesURL=https://github.com/PurpleI2P/i2pd/releases
|
AppUpdatesURL=https://github.com/PurpleI2P/i2pd/releases
|
||||||
|
|||||||
18
contrib/android_binary_only/.gitignore
vendored
18
contrib/android_binary_only/.gitignore
vendored
@@ -1,18 +0,0 @@
|
|||||||
gen
|
|
||||||
tests
|
|
||||||
bin
|
|
||||||
libs
|
|
||||||
log*
|
|
||||||
obj
|
|
||||||
.gradle
|
|
||||||
.idea
|
|
||||||
.externalNativeBuild
|
|
||||||
ant.properties
|
|
||||||
local.properties
|
|
||||||
build.sh
|
|
||||||
android.iml
|
|
||||||
build
|
|
||||||
gradle
|
|
||||||
gradlew
|
|
||||||
gradlew.bat
|
|
||||||
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := i2pd
|
|
||||||
LOCAL_CPP_FEATURES := rtti exceptions
|
|
||||||
LOCAL_C_INCLUDES += $(IFADDRS_PATH) $(LIB_SRC_PATH) $(LIB_CLIENT_SRC_PATH) $(DAEMON_SRC_PATH)
|
|
||||||
LOCAL_STATIC_LIBRARIES := \
|
|
||||||
boost_system \
|
|
||||||
boost_date_time \
|
|
||||||
boost_filesystem \
|
|
||||||
boost_program_options \
|
|
||||||
crypto ssl \
|
|
||||||
miniupnpc
|
|
||||||
LOCAL_LDLIBS := -lz
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(IFADDRS_PATH)/ifaddrs.c \
|
|
||||||
$(wildcard $(LIB_SRC_PATH)/*.cpp)\
|
|
||||||
$(wildcard $(LIB_CLIENT_SRC_PATH)/*.cpp)\
|
|
||||||
$(DAEMON_SRC_PATH)/UnixDaemon.cpp \
|
|
||||||
$(DAEMON_SRC_PATH)/Daemon.cpp \
|
|
||||||
$(DAEMON_SRC_PATH)/UPnP.cpp \
|
|
||||||
$(DAEMON_SRC_PATH)/HTTPServer.cpp \
|
|
||||||
$(DAEMON_SRC_PATH)/I2PControl.cpp \
|
|
||||||
$(DAEMON_SRC_PATH)/i2pd.cpp
|
|
||||||
include $(BUILD_EXECUTABLE)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := boost_system
|
|
||||||
LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_system.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := boost_date_time
|
|
||||||
LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_date_time.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := boost_filesystem
|
|
||||||
LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_filesystem.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := boost_program_options
|
|
||||||
LOCAL_SRC_FILES := $(BOOST_PATH)/boost-1_72_0/$(TARGET_ARCH_ABI)/lib/libboost_program_options.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/boost-1_72_0/include
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := crypto
|
|
||||||
LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/$(TARGET_ARCH_ABI)/lib/libcrypto.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/include
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := ssl
|
|
||||||
LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/$(TARGET_ARCH_ABI)/lib/libssl.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/include
|
|
||||||
LOCAL_STATIC_LIBRARIES := crypto
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := miniupnpc
|
|
||||||
LOCAL_SRC_FILES := $(MINIUPNP_PATH)/miniupnpc-2.1/$(TARGET_ARCH_ABI)/lib/libminiupnpc.a
|
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(MINIUPNP_PATH)/miniupnpc-2.1/include
|
|
||||||
include $(PREBUILT_STATIC_LIBRARY)
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
APP_ABI := all
|
|
||||||
#APP_ABI += x86
|
|
||||||
#APP_ABI += x86_64
|
|
||||||
#APP_ABI += armeabi-v7a
|
|
||||||
#APP_ABI += arm64-v8a
|
|
||||||
#can be android-3 but will fail for x86 since arch-x86 is not present at ndkroot/platforms/android-3/ . libz is taken from there.
|
|
||||||
APP_PLATFORM := android-14
|
|
||||||
|
|
||||||
NDK_TOOLCHAIN_VERSION := clang
|
|
||||||
APP_STL := c++_static
|
|
||||||
|
|
||||||
# Enable c++17 extensions in source code
|
|
||||||
APP_CPPFLAGS += -std=c++17 -fvisibility=default -fPIE
|
|
||||||
|
|
||||||
APP_CPPFLAGS += -DANDROID_BINARY -DANDROID -D__ANDROID__ -DUSE_UPNP
|
|
||||||
APP_LDFLAGS += -rdynamic -fPIE -pie
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
|
||||||
APP_CPPFLAGS += -DANDROID_ARM7A
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Forcing debug optimization. Use `ndk-build NDK_DEBUG=1` instead.
|
|
||||||
#APP_OPTIM := debug
|
|
||||||
|
|
||||||
# git clone https://github.com/PurpleI2P/Boost-for-Android-Prebuilt.git -b boost-1_72_0
|
|
||||||
# git clone https://github.com/PurpleI2P/OpenSSL-for-Android-Prebuilt.git
|
|
||||||
# git clone https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git
|
|
||||||
# git clone https://github.com/PurpleI2P/android-ifaddrs.git
|
|
||||||
# change to your own
|
|
||||||
I2PD_LIBS_PATH = /path/to/libraries
|
|
||||||
BOOST_PATH = $(I2PD_LIBS_PATH)/Boost-for-Android-Prebuilt
|
|
||||||
OPENSSL_PATH = $(I2PD_LIBS_PATH)/OpenSSL-for-Android-Prebuilt
|
|
||||||
MINIUPNP_PATH = $(I2PD_LIBS_PATH)/MiniUPnP-for-Android-Prebuilt
|
|
||||||
IFADDRS_PATH = $(I2PD_LIBS_PATH)/android-ifaddrs
|
|
||||||
|
|
||||||
# don't change me
|
|
||||||
I2PD_SRC_PATH = $(PWD)/../..
|
|
||||||
|
|
||||||
LIB_SRC_PATH = $(I2PD_SRC_PATH)/libi2pd
|
|
||||||
LIB_CLIENT_SRC_PATH = $(I2PD_SRC_PATH)/libi2pd_client
|
|
||||||
DAEMON_SRC_PATH = $(I2PD_SRC_PATH)/daemon
|
|
||||||
2
contrib/android_binary_pack/.gitignore
vendored
2
contrib/android_binary_pack/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
archive
|
|
||||||
i2pd_*_android_binary.zip
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright (c) 2013-2020, The PurpleI2P Project
|
|
||||||
#
|
|
||||||
# This file is part of Purple i2pd project and licensed under BSD3
|
|
||||||
#
|
|
||||||
# See full license text in LICENSE file at top of project tree
|
|
||||||
|
|
||||||
GITDESC=$(git describe --tags)
|
|
||||||
|
|
||||||
declare -A ABILIST=(
|
|
||||||
["armeabi-v7a"]="armv7l"
|
|
||||||
["arm64-v8a"]="aarch64"
|
|
||||||
["x86"]="x86"
|
|
||||||
["x86_64"]="x86_64"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Remove old files and archives
|
|
||||||
if [ -d archive ]; then
|
|
||||||
rm -r archive
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ../i2pd_*_android_binary.zip ]; then
|
|
||||||
rm i2pd_*_android_binary.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare files for package
|
|
||||||
mkdir archive
|
|
||||||
|
|
||||||
for ABI in "${!ABILIST[@]}"; do
|
|
||||||
if [ -f ../android_binary_only/libs/${ABI}/i2pd ]; then
|
|
||||||
cp ../android_binary_only/libs/${ABI}/i2pd archive/i2pd-${ABILIST[$ABI]}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cp i2pd archive/i2pd
|
|
||||||
cp -rH ../android/assets/certificates archive/
|
|
||||||
cp -rH ../android/assets/tunnels.conf.d archive/
|
|
||||||
cp -H ../android/assets/i2pd.conf archive/
|
|
||||||
cp -H ../android/assets/tunnels.conf archive/
|
|
||||||
|
|
||||||
# Compress files
|
|
||||||
cd archive
|
|
||||||
zip -r6 ../i2pd_${GITDESC}_android_binary.zip .
|
|
||||||
|
|
||||||
# Remove temporary folder
|
|
||||||
cd ..
|
|
||||||
rm -r archive
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Copyright (c) 2013-2020, The PurpleI2P Project
|
|
||||||
#
|
|
||||||
# This file is part of Purple i2pd project and licensed under BSD3
|
|
||||||
#
|
|
||||||
# See full license text in LICENSE file at top of project tree
|
|
||||||
#
|
|
||||||
# That script written for use with Termux.
|
|
||||||
|
|
||||||
# https://stackoverflow.com/a/246128
|
|
||||||
SOURCE="${0}"
|
|
||||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
|
||||||
SOURCE="$(readlink "$SOURCE")"
|
|
||||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
|
||||||
done
|
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
|
||||||
|
|
||||||
arch=$(uname -m)
|
|
||||||
|
|
||||||
screenfind=$(which screen)
|
|
||||||
if [ -z $screenfind ]; then
|
|
||||||
echo "Can't find 'screen' installed. That script needs it!";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z i2pd-$arch ]; then
|
|
||||||
echo "Can't find i2pd binary for your archtecture.";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
screen -AmdS i2pd ./i2pd-$arch --datadir=$DIR
|
|
||||||
42
contrib/apparmor/docker-i2pd
Normal file
42
contrib/apparmor/docker-i2pd
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# _________________________________________
|
||||||
|
# / Copy this file to the right location \
|
||||||
|
# | then load with: |
|
||||||
|
# | |
|
||||||
|
# | apparmor_parser -r -W |
|
||||||
|
# | /etc/apparmor.d/docker-i2pd |
|
||||||
|
# | |
|
||||||
|
# | docker run --security-opt |
|
||||||
|
# | "apparmor=docker-i2pd" ... |
|
||||||
|
# | purplei2p/i2pd |
|
||||||
|
# | |
|
||||||
|
# \ And "aa-status" to verify it's loaded. /
|
||||||
|
# -----------------------------------------
|
||||||
|
# \ ^__^
|
||||||
|
# \ (oo)\_______
|
||||||
|
# (__)\ )\/\
|
||||||
|
# ||----w |
|
||||||
|
# || ||
|
||||||
|
|
||||||
|
#include <tunables/global>
|
||||||
|
|
||||||
|
profile docker-i2pd flags=(attach_disconnected,mediate_deleted) {
|
||||||
|
#include <abstractions/base>
|
||||||
|
#include <abstractions/openssl>
|
||||||
|
#include <abstractions/nameservice>
|
||||||
|
|
||||||
|
/bin/busybox ix,
|
||||||
|
/usr/local/bin/i2pd ix,
|
||||||
|
/entrypoint.sh ixr,
|
||||||
|
|
||||||
|
/i2pd_certificates/** r,
|
||||||
|
|
||||||
|
/home/i2pd/data/** rw,
|
||||||
|
|
||||||
|
/home/i2pd/data/i2pd.pid k,
|
||||||
|
|
||||||
|
deny /home/i2pd/data/i2pd.conf w,
|
||||||
|
deny /home/i2pd/data/tunnels.conf w,
|
||||||
|
deny /home/i2pd/data/tunnels.d/** w,
|
||||||
|
deny /home/i2pd/data/certificates/** w,
|
||||||
|
deny /home/i2pd/data/i2pd.log r,
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
#include <tunables/global>
|
#include <tunables/global>
|
||||||
|
|
||||||
profile i2pd /{usr/,}sbin/i2pd {
|
profile i2pd /{usr/,}bin/i2pd {
|
||||||
#include <abstractions/base>
|
#include <abstractions/base>
|
||||||
#include <abstractions/openssl>
|
#include <abstractions/openssl>
|
||||||
#include <abstractions/nameservice>
|
#include <abstractions/nameservice>
|
||||||
@@ -14,12 +14,12 @@ profile i2pd /{usr/,}sbin/i2pd {
|
|||||||
/var/lib/i2pd/** rw,
|
/var/lib/i2pd/** rw,
|
||||||
/var/log/i2pd/i2pd.log w,
|
/var/log/i2pd/i2pd.log w,
|
||||||
/{var/,}run/i2pd/i2pd.pid rwk,
|
/{var/,}run/i2pd/i2pd.pid rwk,
|
||||||
/{usr/,}sbin/i2pd mr,
|
/{usr/,}bin/i2pd mr,
|
||||||
@{system_share_dirs}/i2pd/** r,
|
@{system_share_dirs}/i2pd/** r,
|
||||||
|
|
||||||
# user homedir (if started not by init.d or systemd)
|
# user homedir (if started not by init.d or systemd)
|
||||||
owner @{HOME}/.i2pd/ rw,
|
owner @{HOME}/.i2pd/ rw,
|
||||||
owner @{HOME}/.i2pd/** rwk,
|
owner @{HOME}/.i2pd/** rwk,
|
||||||
|
|
||||||
#include if exists <local/usr.sbin.i2pd>
|
#include if exists <local/usr.bin.i2pd>
|
||||||
}
|
}
|
||||||
14
contrib/certificates/family/stormycloud.crt
Normal file
14
contrib/certificates/family/stormycloud.crt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICKDCCAc6gAwIBAgIUcPHZXtYSqGNRCD6z8gp79WUFtI0wCgYIKoZIzj0EAwIw
|
||||||
|
gZMxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEPMA0GA1UEBwwGQXVzdGlu
|
||||||
|
MRgwFgYDVQQKDA9TdG9ybXlDbG91ZCBJbmMxIzAhBgNVBAMMGnN0b3JteWNsb3Vk
|
||||||
|
LmZhbWlseS5pMnAubmV0MSQwIgYJKoZIhvcNAQkBFhVhZG1pbkBzdG9ybXljbG91
|
||||||
|
ZC5vcmcwHhcNMjIwMzE5MTU1MjU2WhcNMzIwMzE2MTU1MjU2WjCBkzELMAkGA1UE
|
||||||
|
BhMCVVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYDVQQHDAZBdXN0aW4xGDAWBgNVBAoM
|
||||||
|
D1N0b3JteUNsb3VkIEluYzEjMCEGA1UEAwwac3Rvcm15Y2xvdWQuZmFtaWx5Lmky
|
||||||
|
cC5uZXQxJDAiBgkqhkiG9w0BCQEWFWFkbWluQHN0b3JteWNsb3VkLm9yZzBZMBMG
|
||||||
|
ByqGSM49AgEGCCqGSM49AwEHA0IABFUli0hvJEmowNjJVjbKEIWBJhqe973S4VdL
|
||||||
|
cJuA5yY3dC4Y998abWEox7/Y1BhnBbpJuiodA341bXKkLMXQy/kwCgYIKoZIzj0E
|
||||||
|
AwIDSAAwRQIgD12F/TfY3iV1/WDF7BSKgbD5g2MfELUIy1dtUlJQuJUCIQD69mZw
|
||||||
|
V1Z9j2x0ZsuirS3i6AMfVyTDj0RFS3U1jeHzIQ==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
34
contrib/certificates/reseed/admin_at_stormycloud.org.crt
Normal file
34
contrib/certificates/reseed/admin_at_stormycloud.org.crt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIF1zCCA7+gAwIBAgIRAMDqFR09Xuj8ZUu+oetSvAEwDQYJKoZIhvcNAQELBQAw
|
||||||
|
dTELMAkGA1UEBhMCWFgxCzAJBgNVBAcTAlhYMQswCQYDVQQJEwJYWDEeMBwGA1UE
|
||||||
|
ChMVSTJQIEFub255bW91cyBOZXR3b3JrMQwwCgYDVQQLEwNJMlAxHjAcBgNVBAMM
|
||||||
|
FWFkbWluQHN0b3JteWNsb3VkLm9yZzAeFw0yNDAxMjUxNDE1MzBaFw0zNDAxMjUx
|
||||||
|
NDE1MzBaMHUxCzAJBgNVBAYTAlhYMQswCQYDVQQHEwJYWDELMAkGA1UECRMCWFgx
|
||||||
|
HjAcBgNVBAoTFUkyUCBBbm9ueW1vdXMgTmV0d29yazEMMAoGA1UECxMDSTJQMR4w
|
||||||
|
HAYDVQQDDBVhZG1pbkBzdG9ybXljbG91ZC5vcmcwggIiMA0GCSqGSIb3DQEBAQUA
|
||||||
|
A4ICDwAwggIKAoICAQDbGX+GikPzQXr9zvkrhfO9g0l49KHLNQhUKYqd6T+PfnGo
|
||||||
|
Fm0d3ZZVVQZ045vWgroOXDGGZZWxUIlb2inRaR2DF1TxN3pPYt59RgY9ZQ9+TL7o
|
||||||
|
isY91krCRygY8EcAmHIjlfZQ9dBVcL7CfyT0MYZA5Efee9+NDHSewTfQP9T2faIE
|
||||||
|
83Fcyd93a2mIHYjKUbJnojng/wgsy8srbsEuuTok4MIQmDj+B5nz+za2FgI0/ydh
|
||||||
|
srlMt4aGJF4/DIem9z9d0zBCOkwrmtFIzjNF1mOSA8ES4m5YnKA/y9rZlRidLPGu
|
||||||
|
prbXhPVnqHeOnHMz2QCw1wbVo504kl0bMqyEz2tVWsO9ep7iZoQs2xkFAEaegYNT
|
||||||
|
QLUpwVGlyuq3wXXwopFRffOSimGSazICwWI6j+K0pOtgefNJaWrqKYvtkj1SbK2L
|
||||||
|
LBNUIENz6VnB7KPRckuX6zxC8PpOiBK9BcftfO+xAz/wC6qq3riBPw30KKSym0nC
|
||||||
|
Zp5KciDn4Phtw9PGq8Bkl8SyWl0jtFnfTB1tzJkisf2qKcNHaFTEe2JW763YLbh/
|
||||||
|
AU+8X8evFu40qLgvOgKoyy5DLy6i8zetX+3t9K0Fxt9+Vzzq6lm5V/RS8iIPPn+M
|
||||||
|
q1/3Z5kD0KQBG9h/Gl8BH+lB71ZxPAOZ3SMu8DJZcxBLVmDWqQPCr5CKnoz0swID
|
||||||
|
AQABo2IwYDAOBgNVHQ8BAf8EBAMCAoQwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG
|
||||||
|
AQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHgYDVR0OBBcEFWFkbWluQHN0b3JteWNs
|
||||||
|
b3VkLm9yZzANBgkqhkiG9w0BAQsFAAOCAgEARWOJ69vTHMneSXYscha+4Ytjg0RM
|
||||||
|
faewJNEGj8qy/Qvh9si2bWYNPRK6BlbHFS7pRYBLAnhaeLBGVv1CCR6GUMMe74zQ
|
||||||
|
UuMeAoWU6qMDmB3GfYoZJh8sIxpwHqyJeTdeccRbZ4sX4F6u3IHPXYiU/AgbYqH7
|
||||||
|
pYXQg2lCjXZYaDFAlEf5SlYUDOhhXe5kR8Edhlrsu32/JzA1DQK0JjxKCBp+DQmA
|
||||||
|
ltdOpQtAg03fHP4ssdj7VvjIDl28iIlATwBvHrdNm7T0tYWn6TWhvxbRqvfTxfaH
|
||||||
|
MvxnPdIJwNP4/9TyQkwjwHb1h+ucho3CnxI/AxspdOvT1ElMhP6Ce6rcS9pk11Rl
|
||||||
|
x0ChsqpWwDg7KYpg0qZFSKCTBp4zBq9xoMJ6BQcgMfyl736WbsCzFTEyfifp8beg
|
||||||
|
NxUa/Qk7w7cuSPGyMIKNOmOR7FLlFbtocy8sXVsUQdqnp/edelufdNe39U9uNtY6
|
||||||
|
yoXI9//Tc6NgOwy2Oyia0slZ5qHRkB7e4USXMRzJ3p4q9eCVKjAJs81Utp7O2U+9
|
||||||
|
vhbhwWP8CAnNTT1E5WS6EKtfrdqF7wjkV+noPGLDGmrXi01J1fSMAjMfVO+7/LOL
|
||||||
|
UN+G4ybKWnEhhOO27yidN8Xx6UrCS23DBlPPQAeA74dTsTExiOxf1o1EXzcQiMyO
|
||||||
|
LAj3/Ojbi1xkWhI=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
34
contrib/certificates/reseed/arnavbhatt288_at_mail.i2p.crt
Normal file
34
contrib/certificates/reseed/arnavbhatt288_at_mail.i2p.crt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIF2TCCA8GgAwIBAgIQIHQPtSoFU+cUpYD8PZaWZjANBgkqhkiG9w0BAQsFADB2
|
||||||
|
MQswCQYDVQQGEwJYWDELMAkGA1UEBxMCWFgxCzAJBgNVBAkTAlhYMR4wHAYDVQQK
|
||||||
|
ExVJMlAgQW5vbnltb3VzIE5ldHdvcmsxDDAKBgNVBAsTA0kyUDEfMB0GA1UEAwwW
|
||||||
|
YXJuYXZiaGF0dDI4OEBtYWlsLmkycDAeFw0yMzAxMjUxODUzNDFaFw0zMzAxMjUx
|
||||||
|
ODUzNDFaMHYxCzAJBgNVBAYTAlhYMQswCQYDVQQHEwJYWDELMAkGA1UECRMCWFgx
|
||||||
|
HjAcBgNVBAoTFUkyUCBBbm9ueW1vdXMgTmV0d29yazEMMAoGA1UECxMDSTJQMR8w
|
||||||
|
HQYDVQQDDBZhcm5hdmJoYXR0Mjg4QG1haWwuaTJwMIICIjANBgkqhkiG9w0BAQEF
|
||||||
|
AAOCAg8AMIICCgKCAgEAtwG73sC0jYd3fgEzZh0SveAdUd5yD35nINJRrdPSrSwY
|
||||||
|
n3i1qGe3fNLj877PvUDU+qiHH0fFZfyFkXTaq3TUp1u4YkmvaoPHy6FZlojB08lK
|
||||||
|
FBm+iJ1hifQ7MFmvIKUGv+cjlN6xSoQ0U6B2QOy6iZnBgFZ/7jbRY4iZOIj7VJtY
|
||||||
|
aodeHfy0bWe447VJovbkUi7NJPFZQS65LMcAIWcWTxrC0Gj8SmdxL3a5+hxpmmg0
|
||||||
|
+KCQvWQDdxAQjsc16sgUCdUc6cWYO4yw9H6fgdq9GJX+LnXR9OB58GsAjjlLlFoI
|
||||||
|
CZxdARDpoqcIj6AoKIanALf8yfbIyrqqJE47cuaqV9bht5MWKnXbwHplEkT4ZNkh
|
||||||
|
PnRDia7B5HY3uwbt39CBm264PEWXvWG2sozTWKQqBjmMN2cj/NFDUEqKv6BggMY1
|
||||||
|
HcqxWFKRcgKCtRvrmTmfp5l0/ou+OtUaFUg0a6Qhtb93Hj10vK6wZzidBqj0ggzB
|
||||||
|
eJDI95b89u8JgzRoOBriuMKTc91WTkOvBLkB3dgUbUpx2p8KHjvf/pppBH9u0oxp
|
||||||
|
qJFFK840DbnJydEvjKezeVe5Ax6YRSRxyEdKzRoWdvKVxb3qBBKMdCKTYEPxHPBu
|
||||||
|
JMEQVUCXJMti++1KEiQGhcfWvLyT7OewbcIZNk9XWNrxlKcGrTp9AOwaaNC5m1kC
|
||||||
|
AwEAAaNjMGEwDgYDVR0PAQH/BAQDAgKEMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggr
|
||||||
|
BgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MB8GA1UdDgQYBBZhcm5hdmJoYXR0Mjg4
|
||||||
|
QG1haWwuaTJwMA0GCSqGSIb3DQEBCwUAA4ICAQAHiK0ld/1PF9DIhutD660/bzBg
|
||||||
|
mF2Z76hcBqDZ8tnQai/u/RXYrH9wso9BYyrVsvk3fr6tpGT49Ian0MVpPOxMoTU2
|
||||||
|
oBEmQlYrfclQLFsOLmA0y2r1ggXzIrt69jB710Vhwdnz09oOE8rS4E2T5oDD8Wvy
|
||||||
|
Kony+AarRceqtkOlzyquc42KjzdrbHsosF7G2iGhNI6t+T3BfWJ+Q+d5sj3OIh6e
|
||||||
|
gSfvHL44E4vZt6dtofRN3MAZ60kNLF5YWyaUo3Snv9Lso1IwIz3AVr5ehv+8sFL/
|
||||||
|
KxaXdkZ5Yn2YUX7p1t4VQd+eXVPYjf1befg4PvrwSkylu3Jpee3fllZSKXeSVx9x
|
||||||
|
jpJiq5vIakqk22pnWb1Vn7xzSW1vtEG7QLjobOr1WrcGiwdv+HKiWcXJXDzKoWXs
|
||||||
|
h3VEfr51Kap8cIJv+D6lJIG9IcIhiQ6CXWBmtjWJvbdVwFBy1/3Fhaou9liHi+gK
|
||||||
|
4Yh5a5OGCzc7xjtpGaTmoLEz7NzDNOdd/r840qRDOh70izzmFZd5Gwq4hoVcPJcS
|
||||||
|
EAySwtgqK0/4d0zDd2Wg9ASJV9DnDf8QuSmHZgZ9Efs47XcWz9TvkWUS1E66AJsN
|
||||||
|
mmI1NDQ3mv3dv5+WPq+dqqYFsnx3xWL1g5Z3buk0opeuXMzoHwM7UfN8h7Q1M5+t
|
||||||
|
+XBgkaYA4iEwYKqlCQ==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
33
contrib/certificates/reseed/echelon3_at_mail.i2p.crt
Normal file
33
contrib/certificates/reseed/echelon3_at_mail.i2p.crt
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFyzCCA7OgAwIBAgIRALWNWsnQ0Vmn/99iCNT7cdQwDQYJKoZIhvcNAQELBQAw
|
||||||
|
cTELMAkGA1UEBhMCWFgxCzAJBgNVBAcTAlhYMQswCQYDVQQJEwJYWDEeMBwGA1UE
|
||||||
|
ChMVSTJQIEFub255bW91cyBOZXR3b3JrMQwwCgYDVQQLEwNJMlAxGjAYBgNVBAMM
|
||||||
|
EWVjaGVsb24zQG1haWwuaTJwMB4XDTIxMTEyOTE5MzU1OVoXDTMxMTEyOTE5MzU1
|
||||||
|
OVowcTELMAkGA1UEBhMCWFgxCzAJBgNVBAcTAlhYMQswCQYDVQQJEwJYWDEeMBwG
|
||||||
|
A1UEChMVSTJQIEFub255bW91cyBOZXR3b3JrMQwwCgYDVQQLEwNJMlAxGjAYBgNV
|
||||||
|
BAMMEWVjaGVsb24zQG1haWwuaTJwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
|
||||||
|
CgKCAgEA3pccNiQWJUS1t3QHK7rBCNKAsM2dz4szN3+3SrDy1w+rOrK8Vt5aypPU
|
||||||
|
QYUQwG+odjEPacuoRtO/W14KJl5yAI3eQS+X/cYDXmxvfm4zx5JRumYptXwJD57G
|
||||||
|
rlPHnFvk8R+Hvh+/UyqgSAZ9ZaKjEzYK4AtbYEXtopaM4U2VYN8xKjvKyWlhPdxo
|
||||||
|
kI3//qcTlSqGHHeHrkItLG1LubM1EnPu+9zI2WN2zBBRcm8ZtWqHoqFJ1zgJr/49
|
||||||
|
nMK8Lnb3I54ctva8x5+gsSk4dbG/mMsOIZekFqYJJs3+u9w5fmOYI7v9GlQr7UhE
|
||||||
|
G3MwjJ5Cj1LmLVlz/4LApZrDSd2JvwIUdGL3UW8+blaTeCPKIRvmsTeRxo1gORMF
|
||||||
|
ZH0dg39722lK7ScwOlOUX9ggzRUlYCmvnjQJZGJEUoP68QxjlQfkXZyffmMfvm6K
|
||||||
|
V6mcZ5aHMGO1lYAl40kWNJ0jGpmxJqTDhNFDEKr0TlRGVxXGWzObEOrcJ8ysRMc1
|
||||||
|
x6oXQhh79HXZcKwhZaXLx23ZvVoTfhRm4JH0SSP6XqQm35j4NI1SllEsDns29wU3
|
||||||
|
Re4wOWJCCYlPG3CtY32CinwQRoVgtiJk18W8+Pxw7sBFq8sL5L0Z+5bB6nTkBfV6
|
||||||
|
7OrZGWL0i344zQE0e3yIsLih+5Wyqw6RSSMysenl3alnUB9EvE0CAwEAAaNeMFww
|
||||||
|
DgYDVR0PAQH/BAQDAgKEMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAP
|
||||||
|
BgNVHRMBAf8EBTADAQH/MBoGA1UdDgQTBBFlY2hlbG9uM0BtYWlsLmkycDANBgkq
|
||||||
|
hkiG9w0BAQsFAAOCAgEAaUMnMYtNFBl9dFON6e4EjYo53Wknj61uIVO11dvLqjnh
|
||||||
|
7X6guPML+GgNZsPQGLu7Bqw4hVgy/cV5AlFc7SXOhzpaYo1ycpjg3Ws1VK2wrk7+
|
||||||
|
4bvUThNcS1KZVFDdRE62549rYNfYNfPxXvccOTW9meTCC1kLHerh65ySDr9J02O6
|
||||||
|
o5Mf685PgBasBH6dlosOLTtee2gRLNFcAluQYKerawS1gDys5239UNHPCqTgO+Od
|
||||||
|
FiKfl48OIOzPGLKEf4lXC+lkwZElewShrHhzd8aGueedTi0UHOtQuY7ocsofqXc8
|
||||||
|
OnyT/y2X6wn/YkzviKgfxYDSI7FJiUgXCPcT0jUNmuwR168yL5BfzoQmrCvlOOQg
|
||||||
|
P7ibdBJ6UkL8pRpv/SYpvaX/kf4agYtwh5IL9FzNCwNu54ZC6JilLUhYAU38Eolq
|
||||||
|
OZ/cGiMoSFQIeBPvB3cdsqEud9W4P+MqN5A76fMzdVV77lGsIS1eCGMceR3CjOiF
|
||||||
|
6SdAskcBZWhFiRNQweC0iv57/nPCeTCuNAqbZSHd7zC1AKhNmmsKSJUJQCGijcce
|
||||||
|
P8Gl0AFfZneN2bVEFvJ/zd71pD8ll1Gkju16bfdWn0V4NRaxFiXNr2bL+ah9blud
|
||||||
|
EXOomE3R6ow1QZk+Gnpy3wh9jfwlrJuFoANvHnv4WREbdjwr//71XjBri5p1wPE=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIFfzCCA2egAwIBAgIESg3kkzANBgkqhkiG9w0BAQ0FADBwMQswCQYDVQQGEwJY
|
|
||||||
WDELMAkGA1UECBMCWFgxCzAJBgNVBAcTAlhYMR4wHAYDVQQKExVJMlAgQW5vbnlt
|
|
||||||
b3VzIE5ldHdvcmsxDDAKBgNVBAsTA0kyUDEZMBcGA1UEAwwQZWNoZWxvbkBtYWls
|
|
||||||
LmkycDAeFw0xNDA3MzExNjQ3MDJaFw0yNDA3MzAxNjQ3MDJaMHAxCzAJBgNVBAYT
|
|
||||||
AlhYMQswCQYDVQQIEwJYWDELMAkGA1UEBxMCWFgxHjAcBgNVBAoTFUkyUCBBbm9u
|
|
||||||
eW1vdXMgTmV0d29yazEMMAoGA1UECxMDSTJQMRkwFwYDVQQDDBBlY2hlbG9uQG1h
|
|
||||||
aWwuaTJwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAmcEgLwwhzLNe
|
|
||||||
XLOMSrhwB8hWpOhfjo4s6S/wjBtjjUc8nI3D0hSn3HY26p0rvcvNEWexPUpPULmC
|
|
||||||
exGkU463nu7PiFONiORI1eJAiUFHibRiaA7Wboyo38pO73KirwjG07Y+Ua0jp+HS
|
|
||||||
+4FQ/I/9H/bPplReTOU/6hmRbgQ69U8nE68HzZHQxP68yVJ2rPHSXMPhF4R1h0G1
|
|
||||||
1mCAT+TgTsnwHNGF77XHJnY4/M4e2cgycEZjZow36C3t2mNDVkMgF19QQeb9WmLR
|
|
||||||
zREn3nq9BJqHpUkn9yWw0kKXTZSds+7UxESfzf3BzK0+hky2fh5H+qbYAo2lz4yj
|
|
||||||
81MXTAu+4RRkg4DBLlF+2dkclhwQLxxzvkRC6tPkn5i33Yltg7EfzA9IoQ05potJ
|
|
||||||
I+iOcF+aStfFgFj9u3B5UkcF4P0cH1QD3c6BK4hIezQYqRoPly1gHqg+XdwjG/dr
|
|
||||||
4as7HA9FTz3p2E8nClpIC1x3hfgwAdfd29aeBxO1WW/z99iMF7TBAF+u5T86XEW1
|
|
||||||
WpknqCbTli36yJ8a5fPWxZHrryBRJT5yLxejjFeadtutBSwljiVFq+Y38VqwFivq
|
|
||||||
VLiBt7IxAsZ8iilgfnnnAvBH6chWfSKb4H7kB4TJvDiV96QmmvoEaWYNHZozMhyK
|
|
||||||
tO3b5w+xqbJXyCLA3Q75jD0km76hjcECAwEAAaMhMB8wHQYDVR0OBBYEFAHQcAam
|
|
||||||
QRS/EUhuCSr9pB4Ux0rYMA0GCSqGSIb3DQEBDQUAA4ICAQBq1+1QLmgLAjrTg3tb
|
|
||||||
4XKgAVICQRoBDNUEobQg3pYeUX9eFNya2RxNljuvYpwT80ilGMPOXcjddmr5ngiK
|
|
||||||
dbGRcuuJk9MPEHtPaPT3+JJlvKQ3B3g2wva2Wz2OAyLZUGQs389K4nTbwh4QF0n2
|
|
||||||
aHFL8BHiD62hiKnCoNaW4ZovUNNvOxo9lMyAiaFU2gqQNcdad8hP9EAllbvbxDx9
|
|
||||||
Tjww2UbwQUIHS9rna4Tlu+f0hDXTWIutc2A51W2fJCb7L3+lYO7Wv55ND/WtryLZ
|
|
||||||
XpMp27+MpuEnN3kQmz/l9R0hIJsWc/x9GQkjm5wEaIZEyTtenqwRKGmVCtAj0Pgv
|
|
||||||
jn1L3/lWmrNq+OZHb/QeyfKtA3nXfQKVmT98ewQiK/S5i1xIAXCJPytOD887b/o1
|
|
||||||
cdurTmCiZMwgiQ+HLJqCg3MDa5mvKqRkRdZXfE6aQWEcSbpAhpV15R17q7L+Fg0W
|
|
||||||
shLSNucxyGNU8PjiC/nOmqfqUiPiMltJjPmscxBLim8foyxjakC4+6N6m+Jzgznj
|
|
||||||
PocBehFAfKYj66XEwzIBN7Z2uuXoYH9YptkocFjTzvchcryVulDWZ4FWxreUMhpM
|
|
||||||
4oyjjhSB4tB9clXlwMqg577q3D6Ms0zLTqsztyPN3zr6jGev3jpVq7Q1GOlciHPv
|
|
||||||
JNJOWTH/Vas1W6XlwGcOOAARTQ==
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
34
contrib/certificates/reseed/i2p-reseed_at_mk16.de.crt
Normal file
34
contrib/certificates/reseed/i2p-reseed_at_mk16.de.crt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFzTCCA7WgAwIBAgIQeUqFi0fHNQopg6BZlBLhVzANBgkqhkiG9w0BAQsFADBy
|
||||||
|
MQswCQYDVQQGEwJYWDELMAkGA1UEBxMCWFgxCzAJBgNVBAkTAlhYMR4wHAYDVQQK
|
||||||
|
ExVJMlAgQW5vbnltb3VzIE5ldHdvcmsxDDAKBgNVBAsTA0kyUDEbMBkGA1UEAwwS
|
||||||
|
aTJwLXJlc2VlZEBtazE2LmRlMB4XDTIyMDIwNTE3MzkzM1oXDTMyMDIwNTE3Mzkz
|
||||||
|
M1owcjELMAkGA1UEBhMCWFgxCzAJBgNVBAcTAlhYMQswCQYDVQQJEwJYWDEeMBwG
|
||||||
|
A1UEChMVSTJQIEFub255bW91cyBOZXR3b3JrMQwwCgYDVQQLEwNJMlAxGzAZBgNV
|
||||||
|
BAMMEmkycC1yZXNlZWRAbWsxNi5kZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
|
||||||
|
AgoCggIBAMYxs2D2xpN/8blGawvAlU9DemHIxApOEwaLNfh8aAvqEdB41NTqcx4U
|
||||||
|
H8VchSormCfkCvezuMHO+K2HX7ihEZ1v6tbr6aX6hY9UZUyDDYsKmJoB1oKEhddv
|
||||||
|
5UYfcWPE2eSykdFsWgTQD6Z+cRQWHEoCzb7qc+Jrw6KcnHMD0VrmBrEQPzTBxMHW
|
||||||
|
4HC97PVkSLJTDArnS6ZiX4IbWRPw/mbpJT6EoVZo8J/it0pdn/X4KodEXDcnEMSe
|
||||||
|
VRulfZH/nSmOOvKhoHPckmgz/u66BlnuSYXEIB0KfDIcAlSYiPDxGnAemTozJYXA
|
||||||
|
UVMeFMs+YE5wiPgzzu+vpC31xtZLq0gyaCfgEi1P9j2ES/8pH3Gw6W2OH4kBx+jO
|
||||||
|
TBsfI+ph6qFZ3WWT23MRVyl3ATuI/GHdczTxD9JaOn74lLI+Hnu8wXnyztVWkTMB
|
||||||
|
4sAnzjdeHkvNDyQ10vSaN0HnGfg6zuAuUSqFQujFF8Vg8ZCcsh8GouWfzYDvi9mj
|
||||||
|
9pfxx8v6UCC719I4J9CgFjWnn2Hqez3fO8fFulY61VPyCCZp4gKWbI2SIQP/n5gz
|
||||||
|
ecYJRrJoem+rYfEQ/fwxROsvm3fCO4D6dt7ILRuX286GDIw2qSvP1zZVAioMwSj3
|
||||||
|
9CAjKLwD/BhTRiMOlpaVv6IWqjtevbiaIKvbHTnoxvkGsDqe3gJhAgMBAAGjXzBd
|
||||||
|
MA4GA1UdDwEB/wQEAwIChDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw
|
||||||
|
DwYDVR0TAQH/BAUwAwEB/zAbBgNVHQ4EFAQSaTJwLXJlc2VlZEBtazE2LmRlMA0G
|
||||||
|
CSqGSIb3DQEBCwUAA4ICAQAb+x6XpJdjpVYw2bvWIUbatQJwq0YaEW5W61xGLgIG
|
||||||
|
a37oll3YZbSY9Vk+N1cE0f61L3ya4Ioz6zlH/MO2zUG/dEk8vqdgIPUYJvyF7wwF
|
||||||
|
w3/G4VMaDKOJx4bAZNmaiRFGYNhCOhCnZx6uZGrLNIJ2Dc+mflrGmGwYphtXVV3e
|
||||||
|
Iv+ki3gSRgfXuMfKi4B5bLPnz7XDe4TSmwZZSRac4ly4KqmZUyntqbilRxaGTej3
|
||||||
|
VYJ1tac8yppyk5N3VopMQNmBarNZG16wSOTD7CtKgn382jgRW8cR7BMeqhORivp0
|
||||||
|
ZnPJFhzh4uthdlPdXXo6lxfvZjfiwlDPytvEu2QBz3urTgopGqRLcTBnLucWg9li
|
||||||
|
OSy9z7hNEnIN3iIJJAwI1wBdDa7K0h3PFBbIUa7X2ybn81VeNSfO25Lo8YTZEKsc
|
||||||
|
wcThJrNV6qOQv8rM/7aXugi6+VzPlCR+18iKRbebCnlqGR2dT1zFtj3negtOkrjo
|
||||||
|
LH4H6VUr3q2Ie56IubS2hUKiUkDm0ckP3Vum35GGntyEAzl6uyog0hJFOJb3aq30
|
||||||
|
YQLzyVEOz8NnA+32oMRzJJdDxQ7pqG5fgq7EF4d++YSgEfdVXxvfgXQ6m3jAyC7Z
|
||||||
|
p/gX4rlxNsjeGU3Ds51wkmhH4IB1aSQr52PE6RaBhhh3SmADEv6S/3eGvE4F4MN5
|
||||||
|
2Q==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@@ -1,33 +1,33 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIFvjCCA6agAwIBAgIQIDtv8tGMh0FyB2w5XjfZxTANBgkqhkiG9w0BAQsFADBt
|
MIIFvjCCA6agAwIBAgIQBnsUOmOu2oZZIwHBmQc1BDANBgkqhkiG9w0BAQsFADBt
|
||||||
MQswCQYDVQQGEwJYWDELMAkGA1UEBxMCWFgxCzAJBgNVBAkTAlhYMR4wHAYDVQQK
|
MQswCQYDVQQGEwJYWDELMAkGA1UEBxMCWFgxCzAJBgNVBAkTAlhYMR4wHAYDVQQK
|
||||||
ExVJMlAgQW5vbnltb3VzIE5ldHdvcmsxDDAKBgNVBAsTA0kyUDEWMBQGA1UEAwwN
|
ExVJMlAgQW5vbnltb3VzIE5ldHdvcmsxDDAKBgNVBAsTA0kyUDEWMBQGA1UEAwwN
|
||||||
aWdvckBub3ZnLm5ldDAeFw0xNzA3MjQxODI4NThaFw0yNzA3MjQxODI4NThaMG0x
|
aWdvckBub3ZnLm5ldDAeFw0yMzAxMjgxNDM4MzFaFw0zMzAxMjgxNDM4MzFaMG0x
|
||||||
CzAJBgNVBAYTAlhYMQswCQYDVQQHEwJYWDELMAkGA1UECRMCWFgxHjAcBgNVBAoT
|
CzAJBgNVBAYTAlhYMQswCQYDVQQHEwJYWDELMAkGA1UECRMCWFgxHjAcBgNVBAoT
|
||||||
FUkyUCBBbm9ueW1vdXMgTmV0d29yazEMMAoGA1UECxMDSTJQMRYwFAYDVQQDDA1p
|
FUkyUCBBbm9ueW1vdXMgTmV0d29yazEMMAoGA1UECxMDSTJQMRYwFAYDVQQDDA1p
|
||||||
Z29yQG5vdmcubmV0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxst4
|
Z29yQG5vdmcubmV0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvLkf
|
||||||
cam3YibBtQHGPCPX13uRQti56U3XZytSZntaKrUFmJxjt41Q/mOy3KYo+lBvhfDF
|
bM3uiYfp9m0vgdoftyXtk2/9bHf3u5iaM0WfoJIsw1iizo/mxJl+Iy7SxLC16nV0
|
||||||
x3tWKjgP9LJOJ28zvddFhZVNxqZRjcnAoPuSOVCw88g01D9OAasKF11hCfdxZP6h
|
v5FpncVv+Z8x9dgoAYVuLq9zKfsAbpj6kuxAqw6vJMlD1TiIL3nSODV9BJLk47X5
|
||||||
vGm8WCnjD8KPcYFxJC4HJUiFeProAwuTzEAESTRk4CAQe3Ie91JspuqoLUc5Qxlm
|
tmvoOSj9BgvemYThTE3nj+DbuJRW5q90KyBV/LdLrQJX3k5R3FFL5tTad2LKFNZ4
|
||||||
w5QpjnjfZY4kaVHmZDKGIZDgNIt5v85bu4pWwZ6O+o90xQqjxvjyz/xccIec3sHw
|
vEOcYwwx6mvrkJ2lly6bAQUCtfc648Jyq+NO3Rba1fmn7gcP9zXXc5KYsj/ovyY2
|
||||||
MHJ8h8ZKMokCKEJTaRWBvdeNXki7nf3gUy/3GjYQlzo0Nxk/Hw4svPcA+eL0AYiy
|
OaocSF5wMhzBuPxO+M2HqbYLMAkc6/GesGds8Rm8wofuhJoI5YtqJuLKZm6nQXSc
|
||||||
Jn83bIB5VToW2zYUdV4u3qHeAhEg8Y7HI0kKcSUGm9AQXzbzP8YCHxi0sbb0GAJy
|
fx6PKgbKcTIUWNFMsxyfghz9hpbg0rkvC7PtfAjtV0yaDtUum1eZeNEx1HbRWN2n
|
||||||
f1Xf3XzoPfT64giD8ReUHhwKpyMB6uvG/NfWSZAzeAO/NT7DAwXpKIVQdkVdqy8b
|
TQNCVuv0yaKC41qxqzhEybkdjL9JlgUh7VuskaCelB0lz+kgYjGu8ezOa0ua2iKq
|
||||||
mvHvjf9/kWKOirA2Nygf3r79Vbg2mqbYC/b63XI9hheU689+O7qyhTEhNz+11X0d
|
4FC/1MbPulxN8NOt4pmbGqqoxmCdShp38wdnOBM3DsAS9f0JaQZd4CDyY4DCSfVn
|
||||||
Zax7UPrLrwOeB9TNfEnztsmrHNdv2n+KcOO2o11Wvz2nHP9g+dgwoZSD1ZEpFzWP
|
xPdWk31+VXVt3Ixh1EUqZWYTRSsZApkCyYzkiZ/qPGG6FR9Hq2SuhC5o4P44k7eo
|
||||||
0sD5knKLwAL/64qLlAQ1feqW7hMr80IADcKjLSODkIDIIGm0ksXqEzTjz1JzbRDq
|
6wwBWD8a5RjsZhvr05E5yBrKXh/PjLwmtG73QC+ouR54/5xtedvdTwNS94FnNctX
|
||||||
jUjq7EAlkw3G69rv1gHxIntllJRQidAqecyWHOMCAwEAAaNaMFgwDgYDVR0PAQH/
|
FT6QGZnRwCkhPaRe1oQMzP+88pGoCfO33GBAuwUCAwEAAaNaMFgwDgYDVR0PAQH/
|
||||||
BAQDAgKEMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8E
|
BAQDAgKEMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8E
|
||||||
BTADAQH/MBYGA1UdDgQPBA1pZ29yQG5vdmcubmV0MA0GCSqGSIb3DQEBCwUAA4IC
|
BTADAQH/MBYGA1UdDgQPBA1pZ29yQG5vdmcubmV0MA0GCSqGSIb3DQEBCwUAA4IC
|
||||||
AQADyPaec28qc1HQtAV5dscJr47k92RTfvan+GEgIwyQDHZQm38eyTb05xipQCdk
|
AQCteAb5/bqhHr/i5CJbDzlofprXFC826c19GxQ/9Hw0kA52l0J9Q8Vz8Vy7VQyP
|
||||||
5ruUDFXLB5qXXFJKUbQM6IpaktmWDJqk4Zn+1nGbtFEbKgrF55pd63+NQer5QW9o
|
QNa8MCv6FeNy8a/wXp6cafyFsBtvehVQO8lFlpCgMEl2Bma43+GaCwkrM6bFNXeW
|
||||||
3+dGj0eZJa3HX5EBkd2r7j2LFuB6uxv3r/xiTeHaaflCnsmyDLfb7axvYhyEzHQS
|
iQ9h4e1KjsUZ8cQDNEcamiJ80+xbMhBrj5bAZwKmZs8MoGEMyXKEZmcmwA+/fy1c
|
||||||
AUi1bR+ln+dXewdtuojqc1+YmVGDgzWZK2T0oOz2E21CpZUDiP3wv9QfMaotLEal
|
cx4izsOsmRXmEHXsvB9ydJHZZeKW8+r0DAtgPslwXuXHG6MuBQo7dKCqn+iMxHXV
|
||||||
zECnbhS++q889inN3GB4kIoN6WpPpeYtTV+/r7FLv9+KUOV1s2z6mxIqC5wBFhZs
|
Jxriq3yvNffdGx4maSLJrjQ1ealt/UMzql7huVSItnVFWoYf7GAELXNJ/PmqVyaK
|
||||||
0Sr1kVo8hB/EW/YYhDp99LoAOjIO6nn1h+qttfzBYr6C16j+8lGK2A12REJ4LiUQ
|
q11LQ8W/Aud6s/bblaJrFJnK8PbPpaw4RvHoWVLYaZYmQnV2msWs5EuESBlEADbv
|
||||||
cQI/0zTjt2C8Ns6ueNzMLQN1Mvmlg1Z8wIB7Az7jsIbY2zFJ0M5qR5VJveTj33K4
|
UklQXLMc2f9HKWPA5678nvYPrmu8IL5pMkAxgGRqmd+7vCz4lU9M5z3HObU+WRBt
|
||||||
4WSbC/zMWOBYHTVBvGmc6JGhu5ZUTZ+mWP7QfimGu+tdhvtrybFjE9ROIE/4yFr6
|
qEMYyXywV8o3tbmnlDS5S5Xxf+tLZn1cxz3ZrmcHPHDbLBNdvszF3CTJH/R2sQvD
|
||||||
GkxEyt0UY87TeKXJ/3KygvkMwdvqGWiZhItb807iy99+cySujtbGfF2ZXYGjBXVW
|
bizvYJM+p5F+GWM5mt6w0HrOut5MRlpOws/NRrkbijuVA/A45nzTtKplIFYE3qe8
|
||||||
dJOVRbyGQkHh6lrWHQM4ntBv4x+5QA+OAan5PBF3tcDx1vefPx+asYslbOXpzII5
|
q5SAbwYLc8cJcZCN3PxtWwbEv81V33abMt5QcjnWGLH5t2+1Z2KLCgKLSCQTxM8s
|
||||||
qhvoQxuRs6j5jsVFG6RdsKNeQAt87Mb2u2zK2ZakMdyD1w==
|
zBPHtUe8qtSQaElnNLILYbtJ1w67dPnGYTphHihC+CXjBg==
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
This forder contain systemd unit files.
|
This forder contain files required for building debian packages.
|
||||||
To use systemd daemon control, place files from this directory to debian folder before building package.
|
|
||||||
|
The trunk repository is contains the packaging files for the latest stable version of Debian (if we not forgot to update them).
|
||||||
|
|
||||||
|
Files in subdirectories contains fixes to make possible to build package on specific versions of Debian/Ubuntu. They are used when building the release package.
|
||||||
|
|||||||
1
contrib/debian/bionic/compat
Normal file
1
contrib/debian/bionic/compat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
11
|
||||||
18
contrib/debian/bionic/control
Normal file
18
contrib/debian/bionic/control
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Source: i2pd
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: r4sas <r4sas@i2pmail.org>
|
||||||
|
Build-Depends: debhelper (>= 11~), libboost-system-dev (>= 1.46), libboost-date-time-dev (>= 1.46), libboost-filesystem-dev (>= 1.46), libboost-program-options-dev (>= 1.46), libminiupnpc-dev, libssl-dev, zlib1g-dev
|
||||||
|
Standards-Version: 4.2.0
|
||||||
|
Homepage: http://i2pd.website/
|
||||||
|
Vcs-Git: git://github.com/PurpleI2P/i2pd.git
|
||||||
|
Vcs-Browser: https://github.com/PurpleI2P/i2pd
|
||||||
|
|
||||||
|
Package: i2pd
|
||||||
|
Architecture: any
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}, adduser
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base,
|
||||||
|
Description: Full-featured C++ implementation of I2P client.
|
||||||
|
I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
|
||||||
|
communications over I2P are anonymous and end-to-end encrypted, participants
|
||||||
|
don't reveal their real IP addresses.
|
||||||
1
contrib/debian/trusty/compat
Normal file
1
contrib/debian/trusty/compat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
18
contrib/debian/trusty/control
Normal file
18
contrib/debian/trusty/control
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Source: i2pd
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: r4sas <r4sas@i2pmail.org>
|
||||||
|
Build-Depends: debhelper (>= 9), libboost-system-dev (>= 1.46), libboost-date-time-dev (>= 1.46), libboost-filesystem-dev (>= 1.46), libboost-program-options-dev (>= 1.46), libminiupnpc-dev, libssl-dev, zlib1g-dev
|
||||||
|
Standards-Version: 3.9.8
|
||||||
|
Homepage: http://i2pd.website/
|
||||||
|
Vcs-Git: git://github.com/PurpleI2P/i2pd.git
|
||||||
|
Vcs-Browser: https://github.com/PurpleI2P/i2pd
|
||||||
|
|
||||||
|
Package: i2pd
|
||||||
|
Architecture: any
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}, adduser
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base,
|
||||||
|
Description: Full-featured C++ implementation of I2P client.
|
||||||
|
I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
|
||||||
|
communications over I2P are anonymous and end-to-end encrypted, participants
|
||||||
|
don't reveal their real IP addresses.
|
||||||
@@ -2,14 +2,14 @@ Description: Enable UPnP usage in package
|
|||||||
Author: r4sas <r4sas@i2pmail.org>
|
Author: r4sas <r4sas@i2pmail.org>
|
||||||
|
|
||||||
Reviewed-By: r4sas <r4sas@i2pmail.org>
|
Reviewed-By: r4sas <r4sas@i2pmail.org>
|
||||||
Last-Update: 2021-10-22
|
Last-Update: 2024-12-30
|
||||||
|
|
||||||
--- i2pd.orig/Makefile
|
--- i2pd.orig/Makefile
|
||||||
+++ i2pd/Makefile
|
+++ i2pd/Makefile
|
||||||
@@ -32,7 +32,7 @@ include filelist.mk
|
@@ -31,7 +31,7 @@ # import source files lists
|
||||||
USE_AESNI := $(or $(USE_AESNI),yes)
|
include filelist.mk
|
||||||
|
|
||||||
USE_STATIC := $(or $(USE_STATIC),no)
|
USE_STATIC := $(or $(USE_STATIC),no)
|
||||||
USE_MESHNET := $(or $(USE_MESHNET),no)
|
|
||||||
-USE_UPNP := $(or $(USE_UPNP),no)
|
-USE_UPNP := $(or $(USE_UPNP),no)
|
||||||
+USE_UPNP := $(or $(USE_UPNP),yes)
|
+USE_UPNP := $(or $(USE_UPNP),yes)
|
||||||
DEBUG := $(or $(DEBUG),yes)
|
DEBUG := $(or $(DEBUG),yes)
|
||||||
19
contrib/debian/trusty/patches/02-service.patch
Normal file
19
contrib/debian/trusty/patches/02-service.patch
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Description: Disable LogsDirectory and LogsDirectoryMode options in service
|
||||||
|
Author: r4sas <r4sas@i2pmail.org>
|
||||||
|
|
||||||
|
Reviewed-By: r4sas <r4sas@i2pmail.org>
|
||||||
|
Last-Update: 2024-07-19
|
||||||
|
|
||||||
|
--- a/contrib/i2pd.service
|
||||||
|
+++ b/contrib/i2pd.service
|
||||||
|
@@ -8,8 +8,8 @@ User=i2pd
|
||||||
|
Group=i2pd
|
||||||
|
RuntimeDirectory=i2pd
|
||||||
|
RuntimeDirectoryMode=0700
|
||||||
|
-LogsDirectory=i2pd
|
||||||
|
-LogsDirectoryMode=0700
|
||||||
|
+#LogsDirectory=i2pd
|
||||||
|
+#LogsDirectoryMode=0700
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --tunnelsdir=/etc/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
||||||
|
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
||||||
2
contrib/debian/trusty/patches/series
Normal file
2
contrib/debian/trusty/patches/series
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
01-upnp.patch
|
||||||
|
02-service.patch
|
||||||
18
contrib/debian/trusty/rules
Executable file
18
contrib/debian/trusty/rules
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
||||||
|
|
||||||
|
include /usr/share/dpkg/architecture.mk
|
||||||
|
|
||||||
|
ifeq ($(DEB_HOST_ARCH),i386)
|
||||||
|
export DEB_BUILD_OPTIONS=parallel=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
export DEB_CXXFLAGS_MAINT_APPEND=-Wall -pedantic
|
||||||
|
export DEB_LDFLAGS_MAINT_APPEND=
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --parallel
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
1
contrib/debian/xenial/compat
Normal file
1
contrib/debian/xenial/compat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
18
contrib/debian/xenial/control
Normal file
18
contrib/debian/xenial/control
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Source: i2pd
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: r4sas <r4sas@i2pmail.org>
|
||||||
|
Build-Depends: debhelper (>= 9), libboost-system-dev (>= 1.46), libboost-date-time-dev (>= 1.46), libboost-filesystem-dev (>= 1.46), libboost-program-options-dev (>= 1.46), libminiupnpc-dev, libssl-dev, zlib1g-dev
|
||||||
|
Standards-Version: 3.9.8
|
||||||
|
Homepage: http://i2pd.website/
|
||||||
|
Vcs-Git: git://github.com/PurpleI2P/i2pd.git
|
||||||
|
Vcs-Browser: https://github.com/PurpleI2P/i2pd
|
||||||
|
|
||||||
|
Package: i2pd
|
||||||
|
Architecture: any
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}, adduser
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base,
|
||||||
|
Description: Full-featured C++ implementation of I2P client.
|
||||||
|
I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
|
||||||
|
communications over I2P are anonymous and end-to-end encrypted, participants
|
||||||
|
don't reveal their real IP addresses.
|
||||||
17
contrib/debian/xenial/patches/01-upnp.patch
Normal file
17
contrib/debian/xenial/patches/01-upnp.patch
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Description: Enable UPnP usage in package
|
||||||
|
Author: r4sas <r4sas@i2pmail.org>
|
||||||
|
|
||||||
|
Reviewed-By: r4sas <r4sas@i2pmail.org>
|
||||||
|
Last-Update: 2024-12-30
|
||||||
|
|
||||||
|
--- i2pd.orig/Makefile
|
||||||
|
+++ i2pd/Makefile
|
||||||
|
@@ -31,7 +31,7 @@ # import source files lists
|
||||||
|
include filelist.mk
|
||||||
|
|
||||||
|
USE_STATIC := $(or $(USE_STATIC),no)
|
||||||
|
-USE_UPNP := $(or $(USE_UPNP),no)
|
||||||
|
+USE_UPNP := $(or $(USE_UPNP),yes)
|
||||||
|
DEBUG := $(or $(DEBUG),yes)
|
||||||
|
|
||||||
|
# for debugging purposes only, when commit hash needed in trunk builds in i2pd version string
|
||||||
19
contrib/debian/xenial/patches/02-service.patch
Normal file
19
contrib/debian/xenial/patches/02-service.patch
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Description: Disable LogsDirectory and LogsDirectoryMode options in service
|
||||||
|
Author: r4sas <r4sas@i2pmail.org>
|
||||||
|
|
||||||
|
Reviewed-By: r4sas <r4sas@i2pmail.org>
|
||||||
|
Last-Update: 2024-07-19
|
||||||
|
|
||||||
|
--- a/contrib/i2pd.service
|
||||||
|
+++ b/contrib/i2pd.service
|
||||||
|
@@ -8,8 +8,8 @@ User=i2pd
|
||||||
|
Group=i2pd
|
||||||
|
RuntimeDirectory=i2pd
|
||||||
|
RuntimeDirectoryMode=0700
|
||||||
|
-LogsDirectory=i2pd
|
||||||
|
-LogsDirectoryMode=0700
|
||||||
|
+#LogsDirectory=i2pd
|
||||||
|
+#LogsDirectoryMode=0700
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --tunnelsdir=/etc/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
||||||
|
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
||||||
2
contrib/debian/xenial/patches/series
Normal file
2
contrib/debian/xenial/patches/series
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
01-upnp.patch
|
||||||
|
02-service.patch
|
||||||
13
contrib/debian/xenial/rules
Executable file
13
contrib/debian/xenial/rules
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
|
include /usr/share/dpkg/architecture.mk
|
||||||
|
|
||||||
|
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||||
|
export DEB_LDFLAGS_MAINT_APPEND =
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --parallel
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
8
contrib/dinit/i2pd
Normal file
8
contrib/dinit/i2pd
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
type = bgprocess
|
||||||
|
run-as = i2pd
|
||||||
|
command = /usr/bin/i2pd --conf=/var/lib/i2pd/i2pd.conf --pidfile=/var/lib/i2pd/i2pd.pid --daemon --service
|
||||||
|
smooth-recovery = true
|
||||||
|
depends-on = ntpd
|
||||||
|
# uncomment if you want to use i2pd with yggdrasil
|
||||||
|
# depends-on = yggdrasil
|
||||||
|
pid-file = /var/lib/i2pd/i2pd.pid
|
||||||
@@ -1,5 +1,18 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2017-2022, The PurpleI2P Project
|
||||||
|
#
|
||||||
|
# This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
#
|
||||||
|
# See full license text in LICENSE file at top of project tree
|
||||||
|
#
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
LABEL authors "Mikal Villa <mikal@sigterm.no>, Darknet Villain <supervillain@riseup.net>"
|
LABEL authors="Mikal Villa <mikal@sigterm.no>, Darknet Villain <supervillain@riseup.net>"
|
||||||
|
LABEL maintainer="R4SAS <r4sas@i2pmail.org>"
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.source=https://github.com/PurpleI2P/i2pd
|
||||||
|
LABEL org.opencontainers.image.documentation=https://i2pd.readthedocs.io/en/latest/
|
||||||
|
LABEL org.opencontainers.image.licenses=BSD3
|
||||||
|
|
||||||
# Expose git branch, tag and URL variables as arguments
|
# Expose git branch, tag and URL variables as arguments
|
||||||
ARG GIT_BRANCH="openssl"
|
ARG GIT_BRANCH="openssl"
|
||||||
@@ -11,27 +24,28 @@ ENV REPO_URL=${REPO_URL}
|
|||||||
|
|
||||||
ENV I2PD_HOME="/home/i2pd"
|
ENV I2PD_HOME="/home/i2pd"
|
||||||
ENV DATA_DIR="${I2PD_HOME}/data"
|
ENV DATA_DIR="${I2PD_HOME}/data"
|
||||||
ENV DEFAULT_ARGS=" --datadir=$DATA_DIR --reseed.verify=true --upnp.enabled=false --http.enabled=true --http.address=0.0.0.0 --httpproxy.enabled=true --httpproxy.address=0.0.0.0 --socksproxy.enabled=true --socksproxy.address=0.0.0.0 --sam.enabled=true --sam.address=0.0.0.0"
|
ENV DEFAULT_ARGS=" --datadir=$DATA_DIR"
|
||||||
|
|
||||||
RUN mkdir -p "$I2PD_HOME" "$DATA_DIR" \
|
RUN mkdir -p "$I2PD_HOME" "$DATA_DIR" \
|
||||||
&& adduser -S -h "$I2PD_HOME" i2pd \
|
&& adduser -S -h "$I2PD_HOME" i2pd \
|
||||||
&& chown -R i2pd:nobody "$I2PD_HOME"
|
&& chown -R i2pd:nobody "$I2PD_HOME"
|
||||||
|
|
||||||
#
|
|
||||||
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
|
|
||||||
# image under 20mb we need to remove all the build dependencies in the same "RUN" / layer.
|
|
||||||
#
|
|
||||||
|
|
||||||
# 1. install deps, clone and build.
|
# 1. Building binary
|
||||||
# 2. strip binaries.
|
# Each RUN is a layer, adding the dependencies and building i2pd in one layer takes around 8-900Mb, so to keep the
|
||||||
# 3. Purge all dependencies and other unrelated packages, including build directory.
|
# image under 20mb we need to remove all the build dependencies in the same "RUN" / layer.
|
||||||
|
#
|
||||||
|
# 1. install deps, clone and build.
|
||||||
|
# 2. strip binaries.
|
||||||
|
# 3. Purge all dependencies and other unrelated packages, including build directory.
|
||||||
|
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk --no-cache --virtual build-dependendencies add make gcc g++ libtool zlib-dev boost-dev build-base openssl-dev openssl miniupnpc-dev git \
|
&& apk --no-cache --virtual build-dependendencies add make gcc g++ libtool zlib-dev boost-dev build-base openssl-dev openssl miniupnpc-dev git \
|
||||||
&& mkdir -p /tmp/build \
|
&& mkdir -p /tmp/build \
|
||||||
&& cd /tmp/build && git clone -b ${GIT_BRANCH} ${REPO_URL} \
|
&& cd /tmp/build && git clone -b ${GIT_BRANCH} ${REPO_URL} \
|
||||||
&& cd i2pd \
|
&& cd i2pd \
|
||||||
&& if [ -n "${GIT_TAG}" ]; then git checkout tags/${GIT_TAG}; fi \
|
&& if [ -n "${GIT_TAG}" ]; then git checkout tags/${GIT_TAG}; fi \
|
||||||
&& make USE_UPNP=yes \
|
&& make -j$(nproc) USE_UPNP=yes \
|
||||||
&& cp -R contrib/certificates /i2pd_certificates \
|
&& cp -R contrib/certificates /i2pd_certificates \
|
||||||
&& mkdir -p /usr/local/bin \
|
&& mkdir -p /usr/local/bin \
|
||||||
&& mv i2pd /usr/local/bin \
|
&& mv i2pd /usr/local/bin \
|
||||||
@@ -45,6 +59,9 @@ RUN apk update \
|
|||||||
# 2. Adding required libraries to run i2pd to ensure it will run.
|
# 2. Adding required libraries to run i2pd to ensure it will run.
|
||||||
RUN apk --no-cache add boost-filesystem boost-system boost-program_options boost-date_time boost-thread boost-iostreams openssl miniupnpc musl-utils libstdc++
|
RUN apk --no-cache add boost-filesystem boost-system boost-program_options boost-date_time boost-thread boost-iostreams openssl miniupnpc musl-utils libstdc++
|
||||||
|
|
||||||
|
# 3. Copy preconfigured config file and entrypoint
|
||||||
|
COPY i2pd-docker.conf "$DATA_DIR/i2pd.conf"
|
||||||
|
RUN chown i2pd:nobody "$DATA_DIR/i2pd.conf"
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod a+x /entrypoint.sh
|
RUN chmod a+x /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
52
contrib/docker/i2pd-docker.conf
Normal file
52
contrib/docker/i2pd-docker.conf
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
## Preconfigured i2pd configuration file for a Docker container
|
||||||
|
## See https://i2pd.readthedocs.io/en/latest/user-guide/configuration/
|
||||||
|
## for more options you can use in this file.
|
||||||
|
|
||||||
|
## Note that for exposing ports outside of container you need to bind all services to 0.0.0.0
|
||||||
|
|
||||||
|
log = file
|
||||||
|
loglevel = none
|
||||||
|
|
||||||
|
ipv4 = true
|
||||||
|
ipv6 = false
|
||||||
|
|
||||||
|
# bandwidth = L
|
||||||
|
# notransit = false
|
||||||
|
# floodfill = false
|
||||||
|
|
||||||
|
[ntcp2]
|
||||||
|
enabled = true
|
||||||
|
published = true
|
||||||
|
|
||||||
|
[ssu2]
|
||||||
|
enabled = true
|
||||||
|
published = true
|
||||||
|
|
||||||
|
[http]
|
||||||
|
enabled = true
|
||||||
|
address = 0.0.0.0
|
||||||
|
port = 7070
|
||||||
|
|
||||||
|
[httpproxy]
|
||||||
|
enabled = true
|
||||||
|
address = 0.0.0.0
|
||||||
|
port = 4444
|
||||||
|
|
||||||
|
[socksproxy]
|
||||||
|
enabled = true
|
||||||
|
address = 0.0.0.0
|
||||||
|
port = 4447
|
||||||
|
|
||||||
|
[sam]
|
||||||
|
enabled = true
|
||||||
|
address = 0.0.0.0
|
||||||
|
port = 7656
|
||||||
|
|
||||||
|
[upnp]
|
||||||
|
enabled = false
|
||||||
|
|
||||||
|
[reseed]
|
||||||
|
verify = true
|
||||||
|
|
||||||
|
[limits]
|
||||||
|
# transittunnels = 2500
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,29 +1,30 @@
|
|||||||
`xgettext` command for extracting translation
|
`xgettext` command for extracting translation
|
||||||
---
|
---
|
||||||
|
|
||||||
```
|
```
|
||||||
xgettext --omit-header -ctr: -ktr -ktr:1,2 daemon/HTTPServer.cpp libi2pd_client/HTTPProxy.cpp
|
xgettext --omit-header -ctr: -ktr -kntr:1,2 daemon/HTTPServer.cpp libi2pd_client/HTTPProxy.cpp
|
||||||
```
|
```
|
||||||
|
|
||||||
Regex for transforming gettext translations to our format:
|
Regex for transforming gettext translations to our format:
|
||||||
---
|
---
|
||||||
|
|
||||||
```
|
```
|
||||||
in: msgid\ \"(.*)\"\nmsgid_plural\ \"(.*)\"\nmsgstr\[0\]\ \"(.*)\"\nmsgstr\[1\]\ \"(.*)\"\n(msgstr\[2\]\ \"(.*)\"\n)?(msgstr\[3\]\ \"(.*)\"\n)?(msgstr\[4\]\ \"(.*)\"\n)?(msgstr\[5\]\ \"(.*)\"\n)?
|
in: ^(\"|#[:.,]|msgctxt)(.*)$\n
|
||||||
out: #{"$2", {"$3", "$4", "$6", "$8", "$10"}},\n
|
out: <to empty line>
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
in: msgid\ \"(.*)\"\nmsgstr\ \"(.*)\"\n
|
in: msgid\ \"(.*)\"\nmsgid_plural\ \"(.*)\"\nmsgstr\[0\]\ \"(.*)\"\n(msgstr\[1\]\ \"(.*)\"\n)?(msgstr\[2\]\ \"(.*)\"\n)?(msgstr\[3\]\ \"(.*)\"\n)?(msgstr\[4\]\ \"(.*)\"\n)?(msgstr\[5\]\ \"(.*)\"\n)?
|
||||||
out: {"$1", "$2"},\n
|
out: #{"$2", {"$3", "$5", "$7", "$9", "$11"}},\n
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
in: ^#[:.](.*)$\n
|
in: msgid\ \"(.*)\"\nmsgstr\ \"(.*)\"\n
|
||||||
out: <to empty line>
|
out: {"$1", "$2"},\n
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
|
||||||
in: \n\n
|
```
|
||||||
out: \n
|
in: \n\n
|
||||||
```
|
out: \n
|
||||||
|
```
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
## Default: ~/.i2pd/certificates or /var/lib/i2pd/certificates
|
## Default: ~/.i2pd/certificates or /var/lib/i2pd/certificates
|
||||||
# certsdir = /var/lib/i2pd/certificates
|
# certsdir = /var/lib/i2pd/certificates
|
||||||
|
|
||||||
## Where to write pidfile (default: i2pd.pid, not used in Windows)
|
## Where to write pidfile (default: /run/i2pd.pid, not used in Windows)
|
||||||
# pidfile = /run/i2pd.pid
|
# pidfile = /run/i2pd.pid
|
||||||
|
|
||||||
## Logging configuration section
|
## Logging configuration section
|
||||||
@@ -31,15 +31,16 @@
|
|||||||
## * file - log entries to a file
|
## * file - log entries to a file
|
||||||
## * syslog - use syslog, see man 3 syslog
|
## * syslog - use syslog, see man 3 syslog
|
||||||
# log = file
|
# log = file
|
||||||
## Path to logfile (default - autodetect)
|
## Path to logfile (default: autodetect)
|
||||||
# logfile = /var/log/i2pd/i2pd.log
|
# logfile = /var/log/i2pd/i2pd.log
|
||||||
## Log messages above this level (debug, info, *warn, error, none)
|
## Log messages above this level (debug, info, *warn, error, critical, none)
|
||||||
## If you set it to none, logging will be disabled
|
## If you set it to none, logging will be disabled
|
||||||
# loglevel = warn
|
# loglevel = warn
|
||||||
## Write full CLF-formatted date and time to log (default: write only time)
|
## Write full CLF-formatted date and time to log (default: write only time)
|
||||||
# logclftime = true
|
# logclftime = true
|
||||||
|
|
||||||
## Daemon mode. Router will go to background after start. Ignored on Windows
|
## Daemon mode. Router will go to background after start. Ignored on Windows
|
||||||
|
## (default: true)
|
||||||
# daemon = true
|
# daemon = true
|
||||||
|
|
||||||
## Specify a family, router belongs to (default - none)
|
## Specify a family, router belongs to (default - none)
|
||||||
@@ -70,74 +71,97 @@
|
|||||||
## don't just uncomment this
|
## don't just uncomment this
|
||||||
# port = 4567
|
# port = 4567
|
||||||
|
|
||||||
## Enable communication through ipv4
|
## Enable communication through ipv4 (default: true)
|
||||||
ipv4 = true
|
ipv4 = true
|
||||||
## Enable communication through ipv6
|
## Enable communication through ipv6 (default: false)
|
||||||
ipv6 = false
|
ipv6 = false
|
||||||
|
|
||||||
## Enable SSU transport (default = true)
|
|
||||||
# ssu = true
|
|
||||||
|
|
||||||
## Bandwidth configuration
|
## Bandwidth configuration
|
||||||
## L limit bandwidth to 32KBs/sec, O - to 256KBs/sec, P - to 2048KBs/sec,
|
## L limit bandwidth to 32 KB/sec, O - to 256 KB/sec, P - to 2048 KB/sec,
|
||||||
## X - unlimited
|
## X - unlimited
|
||||||
## Default is L (regular node) and X if floodfill mode enabled. If you want to
|
## Default is L (regular node) and X if floodfill mode enabled.
|
||||||
## share more bandwidth without floodfill mode, uncomment that line and adjust
|
## If you want to share more bandwidth without floodfill mode, uncomment
|
||||||
## value to your possibilities
|
## that line and adjust value to your possibilities. Value can be set to
|
||||||
|
## integer in kilobytes, it will apply that limit and flag will be used
|
||||||
|
## from next upper limit (example: if you set 4096 flag will be X, but real
|
||||||
|
## limit will be 4096 KB/s). Same can be done when floodfill mode is used,
|
||||||
|
## but keep in mind that low values may be negatively evaluated by Java
|
||||||
|
## router algorithms.
|
||||||
# bandwidth = L
|
# bandwidth = L
|
||||||
## Max % of bandwidth limit for transit. 0-100. 100 by default
|
## Max % of bandwidth limit for transit. 0-100 (default: 100)
|
||||||
# share = 100
|
# share = 100
|
||||||
|
|
||||||
## Router will not accept transit tunnels, disabling transit traffic completely
|
## Router will not accept transit tunnels, disabling transit traffic completely
|
||||||
## (default = false)
|
## (default: false)
|
||||||
# notransit = true
|
# notransit = true
|
||||||
|
|
||||||
## Router will be floodfill
|
## Router will be floodfill (default: false)
|
||||||
## Note: that mode uses much more network connections and CPU!
|
## Note: that mode uses much more network connections and CPU!
|
||||||
# floodfill = true
|
# floodfill = true
|
||||||
|
|
||||||
|
[ntcp2]
|
||||||
|
## Enable NTCP2 transport (default: true)
|
||||||
|
# enabled = true
|
||||||
|
## Publish address in RouterInfo (default: true)
|
||||||
|
# published = true
|
||||||
|
## Port for incoming connections (default is global port option value)
|
||||||
|
# port = 4567
|
||||||
|
|
||||||
|
[ssu2]
|
||||||
|
## Enable SSU2 transport (default: true)
|
||||||
|
# enabled = true
|
||||||
|
## Publish address in RouterInfo (default: true)
|
||||||
|
# published = true
|
||||||
|
## Port for incoming connections (default is global port option value)
|
||||||
|
# port = 4567
|
||||||
|
|
||||||
[http]
|
[http]
|
||||||
## Web Console settings
|
## Web Console settings
|
||||||
## Uncomment and set to 'false' to disable Web Console
|
## Enable the Web Console (default: true)
|
||||||
# enabled = true
|
# enabled = true
|
||||||
## Address and port service will listen on
|
## Address and port service will listen on (default: 127.0.0.1:7070)
|
||||||
address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
port = 7070
|
# port = 7070
|
||||||
## Path to web console, default "/"
|
## Path to web console (default: /)
|
||||||
# webroot = /
|
# webroot = /
|
||||||
## Uncomment following lines to enable Web Console authentication
|
## Enable Web Console authentication (default: false)
|
||||||
|
## You should not use Web Console via public networks without additional encryption.
|
||||||
|
## HTTP authentication is not encryption layer!
|
||||||
# auth = true
|
# auth = true
|
||||||
# user = i2pd
|
# user = i2pd
|
||||||
# pass = changeme
|
# pass = changeme
|
||||||
## Select webconsole language
|
## Select webconsole language
|
||||||
## Currently supported english (default), afrikaans, armenian, russian,
|
## Currently supported english (default), afrikaans, armenian, chinese, czech, french,
|
||||||
## turkmen, ukrainian and uzbek languages
|
## german, italian, polish, portuguese, russian, spanish, turkish, turkmen, ukrainian
|
||||||
|
## and uzbek languages
|
||||||
# lang = english
|
# lang = english
|
||||||
|
|
||||||
[httpproxy]
|
[httpproxy]
|
||||||
## Uncomment and set to 'false' to disable HTTP Proxy
|
## Enable the HTTP proxy (default: true)
|
||||||
# enabled = true
|
# enabled = true
|
||||||
## Address and port service will listen on
|
## Address and port service will listen on (default: 127.0.0.1:4444)
|
||||||
address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
port = 4444
|
# port = 4444
|
||||||
## Optional keys file for proxy local destination
|
## Optional keys file for proxy local destination (default: http-proxy-keys.dat)
|
||||||
# keys = http-proxy-keys.dat
|
# keys = http-proxy-keys.dat
|
||||||
## Enable address helper for adding .i2p domains with "jump URLs" (default: true)
|
## Enable address helper for adding .i2p domains with "jump URLs" (default: true)
|
||||||
|
## You should disable this feature if your i2pd HTTP Proxy is public,
|
||||||
|
## because anyone could spoof the short domain via addresshelper and forward other users to phishing links
|
||||||
# addresshelper = true
|
# addresshelper = true
|
||||||
## Address of a proxy server inside I2P, which is used to visit regular Internet
|
## Address of a proxy server inside I2P, which is used to visit regular Internet
|
||||||
# outproxy = http://false.i2p
|
# outproxy = http://false.i2p
|
||||||
## httpproxy section also accepts I2CP parameters, like "inbound.length" etc.
|
## httpproxy section also accepts I2CP parameters, like "inbound.length" etc.
|
||||||
|
|
||||||
[socksproxy]
|
[socksproxy]
|
||||||
## Uncomment and set to 'false' to disable SOCKS Proxy
|
## Enable the SOCKS proxy (default: true)
|
||||||
# enabled = true
|
# enabled = true
|
||||||
## Address and port service will listen on
|
## Address and port service will listen on (default: 127.0.0.1:4447)
|
||||||
address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
port = 4447
|
# port = 4447
|
||||||
## Optional keys file for proxy local destination
|
## Optional keys file for proxy local destination (default: socks-proxy-keys.dat)
|
||||||
# keys = socks-proxy-keys.dat
|
# keys = socks-proxy-keys.dat
|
||||||
## Socks outproxy. Example below is set to use Tor for all connections except i2p
|
## Socks outproxy. Example below is set to use Tor for all connections except i2p
|
||||||
## Uncomment and set to 'true' to enable using of SOCKS outproxy
|
## Enable using of SOCKS outproxy (works only with SOCKS4, default: false)
|
||||||
# outproxy.enabled = false
|
# outproxy.enabled = false
|
||||||
## Address and port of outproxy
|
## Address and port of outproxy
|
||||||
# outproxy = 127.0.0.1
|
# outproxy = 127.0.0.1
|
||||||
@@ -145,33 +169,34 @@ port = 4447
|
|||||||
## socksproxy section also accepts I2CP parameters, like "inbound.length" etc.
|
## socksproxy section also accepts I2CP parameters, like "inbound.length" etc.
|
||||||
|
|
||||||
[sam]
|
[sam]
|
||||||
## Comment or set to 'false' to disable SAM Bridge
|
## Enable the SAM bridge (default: true)
|
||||||
enabled = true
|
# enabled = false
|
||||||
## Address and port service will listen on
|
## Address and ports service will listen on (default: 127.0.0.1:7656, udp: 7655)
|
||||||
# address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
# port = 7656
|
# port = 7656
|
||||||
|
# portudp = 7655
|
||||||
|
|
||||||
[bob]
|
[bob]
|
||||||
## Uncomment and set to 'true' to enable BOB command channel
|
## Enable the BOB command channel (default: false)
|
||||||
# enabled = false
|
# enabled = false
|
||||||
## Address and port service will listen on
|
## Address and port service will listen on (default: 127.0.0.1:2827)
|
||||||
# address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
# port = 2827
|
# port = 2827
|
||||||
|
|
||||||
[i2cp]
|
[i2cp]
|
||||||
## Uncomment and set to 'true' to enable I2CP protocol
|
## Enable the I2CP protocol (default: false)
|
||||||
# enabled = false
|
# enabled = false
|
||||||
## Address and port service will listen on
|
## Address and port service will listen on (default: 127.0.0.1:7654)
|
||||||
# address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
# port = 7654
|
# port = 7654
|
||||||
|
|
||||||
[i2pcontrol]
|
[i2pcontrol]
|
||||||
## Uncomment and set to 'true' to enable I2PControl protocol
|
## Enable the I2PControl protocol (default: false)
|
||||||
# enabled = false
|
# enabled = false
|
||||||
## Address and port service will listen on
|
## Address and port service will listen on (default: 127.0.0.1:7650)
|
||||||
# address = 127.0.0.1
|
# address = 127.0.0.1
|
||||||
# port = 7650
|
# port = 7650
|
||||||
## Authentication password. "itoopie" by default
|
## Authentication password (default: itoopie)
|
||||||
# password = itoopie
|
# password = itoopie
|
||||||
|
|
||||||
[precomputation]
|
[precomputation]
|
||||||
@@ -182,11 +207,11 @@ enabled = true
|
|||||||
[upnp]
|
[upnp]
|
||||||
## Enable or disable UPnP: automatic port forwarding (enabled by default in WINDOWS, ANDROID)
|
## Enable or disable UPnP: automatic port forwarding (enabled by default in WINDOWS, ANDROID)
|
||||||
# enabled = false
|
# enabled = false
|
||||||
## Name i2pd appears in UPnP forwardings list (default = I2Pd)
|
## Name i2pd appears in UPnP forwardings list (default: I2Pd)
|
||||||
# name = I2Pd
|
# name = I2Pd
|
||||||
|
|
||||||
[meshnets]
|
[meshnets]
|
||||||
## Enable connectivity over the Yggdrasil network
|
## Enable connectivity over the Yggdrasil network (default: false)
|
||||||
# yggdrasil = false
|
# yggdrasil = false
|
||||||
## You can bind address from your Yggdrasil subnet 300::/64
|
## You can bind address from your Yggdrasil subnet 300::/64
|
||||||
## The address must first be added to the network interface
|
## The address must first be added to the network interface
|
||||||
@@ -194,13 +219,13 @@ enabled = true
|
|||||||
|
|
||||||
[reseed]
|
[reseed]
|
||||||
## Options for bootstrapping into I2P network, aka reseeding
|
## Options for bootstrapping into I2P network, aka reseeding
|
||||||
## Enable or disable reseed data verification.
|
## Enable reseed data verification (default: true)
|
||||||
verify = true
|
verify = true
|
||||||
## URLs to request reseed data from, separated by comma
|
## URLs to request reseed data from, separated by comma
|
||||||
## Default: "mainline" I2P Network reseeds
|
## Default: "mainline" I2P Network reseeds
|
||||||
# urls = https://reseed.i2p-projekt.de/,https://i2p.mooo.com/netDb/,https://netdb.i2p2.no/
|
# urls = https://reseed.i2p-projekt.de/,https://i2p.mooo.com/netDb/,https://netdb.i2p2.no/
|
||||||
## Reseed URLs through the Yggdrasil, separated by comma
|
## Reseed URLs through the Yggdrasil, separated by comma
|
||||||
# yggurls = http://[324:9de3:fea4:f6ac::ace]:7070/
|
# yggurls = http://[324:71e:281a:9ed3::ace]:7070/
|
||||||
## Path to local reseed data file (.su3) for manual reseeding
|
## Path to local reseed data file (.su3) for manual reseeding
|
||||||
# file = /path/to/i2pseeds.su3
|
# file = /path/to/i2pseeds.su3
|
||||||
## or HTTPS URL to reseed from
|
## or HTTPS URL to reseed from
|
||||||
@@ -210,7 +235,7 @@ verify = true
|
|||||||
## If you run i2pd behind a proxy server, set proxy server for reseeding here
|
## If you run i2pd behind a proxy server, set proxy server for reseeding here
|
||||||
## Should be http://address:port or socks://address:port
|
## Should be http://address:port or socks://address:port
|
||||||
# proxy = http://127.0.0.1:8118
|
# proxy = http://127.0.0.1:8118
|
||||||
## Minimum number of known routers, below which i2pd triggers reseeding. 25 by default
|
## Minimum number of known routers, below which i2pd triggers reseeding (default: 25)
|
||||||
# threshold = 25
|
# threshold = 25
|
||||||
|
|
||||||
[addressbook]
|
[addressbook]
|
||||||
@@ -218,24 +243,25 @@ verify = true
|
|||||||
## Default: reg.i2p at "mainline" I2P Network
|
## Default: reg.i2p at "mainline" I2P Network
|
||||||
# defaulturl = http://shx5vqsw7usdaunyzr2qmes2fq37oumybpudrd4jjj4e4vk4uusa.b32.i2p/hosts.txt
|
# defaulturl = http://shx5vqsw7usdaunyzr2qmes2fq37oumybpudrd4jjj4e4vk4uusa.b32.i2p/hosts.txt
|
||||||
## Optional subscriptions URLs, separated by comma
|
## Optional subscriptions URLs, separated by comma
|
||||||
# subscriptions = http://reg.i2p/hosts.txt,http://identiguy.i2p/hosts.txt,http://stats.i2p/cgi-bin/newhosts.txt,http://rus.i2p/hosts.txt
|
# subscriptions = http://reg.i2p/hosts.txt,http://identiguy.i2p/hosts.txt,http://stats.i2p/cgi-bin/newhosts.txt
|
||||||
|
|
||||||
[limits]
|
[limits]
|
||||||
## Maximum active transit sessions (default:2500)
|
## Maximum active transit sessions (default: 5000)
|
||||||
# transittunnels = 2500
|
## This value is doubled if floodfill mode is enabled!
|
||||||
|
# transittunnels = 5000
|
||||||
## Limit number of open file descriptors (0 - use system limit)
|
## Limit number of open file descriptors (0 - use system limit)
|
||||||
# openfiles = 0
|
# openfiles = 0
|
||||||
## Maximum size of corefile in Kb (0 - use system limit)
|
## Maximum size of corefile in Kb (0 - use system limit)
|
||||||
# coresize = 0
|
# coresize = 0
|
||||||
|
|
||||||
[trust]
|
[trust]
|
||||||
## Enable explicit trust options. false by default
|
## Enable explicit trust options. (default: false)
|
||||||
# enabled = true
|
# enabled = true
|
||||||
## Make direct I2P connections only to routers in specified Family.
|
## Make direct I2P connections only to routers in specified Family.
|
||||||
# family = MyFamily
|
# family = MyFamily
|
||||||
## Make direct I2P connections only to routers specified here. Comma separated list of base64 identities.
|
## Make direct I2P connections only to routers specified here. Comma separated list of base64 identities.
|
||||||
# routers =
|
# routers =
|
||||||
## Should we hide our router from other routers? false by default
|
## Should we hide our router from other routers? (default: false)
|
||||||
# hidden = true
|
# hidden = true
|
||||||
|
|
||||||
[exploratory]
|
[exploratory]
|
||||||
@@ -251,11 +277,3 @@ verify = true
|
|||||||
## Save full addresses on disk (default: true)
|
## Save full addresses on disk (default: true)
|
||||||
# addressbook = true
|
# addressbook = true
|
||||||
|
|
||||||
[cpuext]
|
|
||||||
## Use CPU AES-NI instructions set when work with cryptography when available (default: true)
|
|
||||||
# aesni = true
|
|
||||||
## Use CPU AVX instructions set when work with cryptography when available (default: true)
|
|
||||||
# avx = true
|
|
||||||
## Force usage of CPU instructions set, even if they not found
|
|
||||||
## DO NOT TOUCH that option if you really don't know what are you doing!
|
|
||||||
# force = false
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ RuntimeDirectoryMode=0700
|
|||||||
LogsDirectory=i2pd
|
LogsDirectory=i2pd
|
||||||
LogsDirectoryMode=0700
|
LogsDirectoryMode=0700
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --tunnelsdir=/etc/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
ExecStart=/usr/bin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --tunnelsdir=/etc/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
|
||||||
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
ExecReload=/bin/sh -c "kill -HUP $MAINPID"
|
||||||
PIDFile=/run/i2pd/i2pd.pid
|
PIDFile=/run/i2pd/i2pd.pid
|
||||||
### Uncomment, if auto restart needed
|
### Uncomment, if auto restart needed
|
||||||
@@ -29,7 +29,7 @@ SendSIGKILL=yes
|
|||||||
#TimeoutStopSec=10m
|
#TimeoutStopSec=10m
|
||||||
|
|
||||||
# If you have problems with hanging i2pd, you can try increase this
|
# If you have problems with hanging i2pd, you can try increase this
|
||||||
LimitNOFILE=4096
|
LimitNOFILE=8192
|
||||||
# To enable write of coredump uncomment this
|
# To enable write of coredump uncomment this
|
||||||
#LimitCORE=infinity
|
#LimitCORE=infinity
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ tunconf="/etc/i2pd/tunnels.conf"
|
|||||||
tundir="/etc/i2pd/tunnels.conf.d"
|
tundir="/etc/i2pd/tunnels.conf.d"
|
||||||
|
|
||||||
name="i2pd"
|
name="i2pd"
|
||||||
command="/usr/sbin/i2pd"
|
command="/usr/bin/i2pd"
|
||||||
command_args="--service --daemon --log=file --logfile=$logfile --conf=$mainconf --tunconf=$tunconf --tunnelsdir=$tundir --pidfile=$pidfile"
|
command_args="--service --daemon --log=file --logfile=$logfile --conf=$mainconf --tunconf=$tunconf --tunnelsdir=$tundir --pidfile=$pidfile"
|
||||||
description="i2p router written in C++"
|
description="i2p router written in C++"
|
||||||
required_dirs="/var/lib/i2pd"
|
required_dirs="/var/lib/i2pd"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
%define git_hash %(git rev-parse HEAD | cut -c -7)
|
%define git_hash %(git rev-parse HEAD | cut -c -7)
|
||||||
|
|
||||||
Name: i2pd-git
|
Name: i2pd-git
|
||||||
Version: 2.40.0
|
Version: 2.56.0
|
||||||
Release: git%{git_hash}%{?dist}
|
Release: git%{git_hash}%{?dist}
|
||||||
Summary: I2P router written in C++
|
Summary: I2P router written in C++
|
||||||
Conflicts: i2pd
|
Conflicts: i2pd
|
||||||
@@ -24,89 +24,91 @@ BuildRequires: openssl-devel
|
|||||||
BuildRequires: miniupnpc-devel
|
BuildRequires: miniupnpc-devel
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
|
|
||||||
|
%if 0%{?fedora} == 41
|
||||||
|
BuildRequires: openssl-devel-engine
|
||||||
|
%endif
|
||||||
|
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
|
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
C++ implementation of I2P.
|
C++ implementation of I2P.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n i2pd-openssl
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd build
|
cd build
|
||||||
%if 0%{?rhel} == 7
|
%if 0%{?rhel} == 7
|
||||||
%cmake3 \
|
%cmake3 \
|
||||||
-DWITH_LIBRARY=OFF \
|
-DWITH_LIBRARY=OFF \
|
||||||
-DWITH_UPNP=ON \
|
-DWITH_UPNP=ON \
|
||||||
-DWITH_HARDENING=ON \
|
-DWITH_HARDENING=ON \
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||||
%else
|
%else
|
||||||
%cmake \
|
%cmake \
|
||||||
-DWITH_LIBRARY=OFF \
|
-DWITH_LIBRARY=OFF \
|
||||||
-DWITH_UPNP=ON \
|
-DWITH_UPNP=ON \
|
||||||
-DWITH_HARDENING=ON \
|
-DWITH_HARDENING=ON \
|
||||||
%if 0%{?fedora} > 29
|
%if 0%{?fedora} > 29
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||||
.
|
.
|
||||||
%else
|
%else
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
|
||||||
%if 0%{?fedora} >= 35
|
pushd redhat-linux-build
|
||||||
pushd redhat-linux-build
|
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?fedora} >= 33
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?mageia} > 7
|
%if 0%{?mageia} > 7
|
||||||
pushd build
|
pushd build
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?rhel} == 9 || 0%{?fedora} >= 33 || 0%{?mageia} > 7
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?mageia} > 7
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd build
|
pushd build
|
||||||
|
|
||||||
%if 0%{?fedora} >= 35
|
%if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
|
||||||
pushd redhat-linux-build
|
pushd redhat-linux-build
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?fedora} >= 33
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?mageia}
|
%if 0%{?mageia}
|
||||||
pushd build
|
pushd build
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
chrpath -d i2pd
|
chrpath -d i2pd
|
||||||
%{__install} -D -m 755 i2pd %{buildroot}%{_sbindir}/i2pd
|
%{__install} -D -m 755 i2pd %{buildroot}%{_bindir}/i2pd
|
||||||
%{__install} -d -m 755 %{buildroot}%{_datadir}/i2pd
|
%{__install} -d -m 755 %{buildroot}%{_datadir}/i2pd
|
||||||
%{__install} -d -m 700 %{buildroot}%{_sharedstatedir}/i2pd
|
%{__install} -d -m 700 %{buildroot}%{_sharedstatedir}/i2pd
|
||||||
%{__install} -d -m 700 %{buildroot}%{_localstatedir}/log/i2pd
|
%{__install} -d -m 700 %{buildroot}%{_localstatedir}/log/i2pd
|
||||||
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/contrib/i2pd.conf %{buildroot}%{_sysconfdir}/i2pd/i2pd.conf
|
%{__install} -D -m 644 %{_builddir}/i2pd-openssl/contrib/i2pd.conf %{buildroot}%{_sysconfdir}/i2pd/i2pd.conf
|
||||||
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/contrib/subscriptions.txt %{buildroot}%{_sysconfdir}/i2pd/subscriptions.txt
|
%{__install} -D -m 644 %{_builddir}/i2pd-openssl/contrib/subscriptions.txt %{buildroot}%{_sysconfdir}/i2pd/subscriptions.txt
|
||||||
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/contrib/tunnels.conf %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf
|
%{__install} -D -m 644 %{_builddir}/i2pd-openssl/contrib/tunnels.conf %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf
|
||||||
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/contrib/i2pd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/i2pd
|
%{__install} -D -m 644 %{_builddir}/i2pd-openssl/contrib/i2pd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/i2pd
|
||||||
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/contrib/i2pd.service %{buildroot}%{_unitdir}/i2pd.service
|
%{__install} -D -m 644 %{_builddir}/i2pd-openssl/contrib/i2pd.service %{buildroot}%{_unitdir}/i2pd.service
|
||||||
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/debian/i2pd.1 %{buildroot}%{_mandir}/man1/i2pd.1
|
%{__install} -D -m 644 %{_builddir}/i2pd-openssl/debian/i2pd.1 %{buildroot}%{_mandir}/man1/i2pd.1
|
||||||
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/certificates/ %{buildroot}%{_datadir}/i2pd/certificates
|
%{__cp} -r %{_builddir}/i2pd-openssl/contrib/certificates/ %{buildroot}%{_datadir}/i2pd/certificates
|
||||||
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/tunnels.d/ %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf.d
|
%{__cp} -r %{_builddir}/i2pd-openssl/contrib/tunnels.d/ %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf.d
|
||||||
ln -s %{_datadir}/%{name}/certificates %{buildroot}%{_sharedstatedir}/i2pd/certificates
|
ln -s %{_datadir}/%{name}/certificates %{buildroot}%{_sharedstatedir}/i2pd/certificates
|
||||||
|
|
||||||
|
|
||||||
@@ -131,7 +133,7 @@ getent passwd i2pd >/dev/null || \
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%doc LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf contrib/tunnels.d
|
%doc LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf contrib/tunnels.d
|
||||||
%{_sbindir}/i2pd
|
%{_bindir}/i2pd
|
||||||
%config(noreplace) %{_sysconfdir}/i2pd/*.conf
|
%config(noreplace) %{_sysconfdir}/i2pd/*.conf
|
||||||
%config(noreplace) %{_sysconfdir}/i2pd/tunnels.conf.d/*.conf
|
%config(noreplace) %{_sysconfdir}/i2pd/tunnels.conf.d/*.conf
|
||||||
%config %{_sysconfdir}/i2pd/subscriptions.txt
|
%config %{_sysconfdir}/i2pd/subscriptions.txt
|
||||||
@@ -146,6 +148,73 @@ getent passwd i2pd >/dev/null || \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 11 2025 orignal <orignal@i2pmail.org> - 2.56.0
|
||||||
|
- update to 2.56.0
|
||||||
|
|
||||||
|
* Mon Dec 30 2024 orignal <orignal@i2pmail.org> - 2.55.0
|
||||||
|
- update to 2.55.0
|
||||||
|
|
||||||
|
* Sun Oct 6 2024 orignal <orignal@i2pmail.org> - 2.54.0
|
||||||
|
- update to 2.54.0
|
||||||
|
|
||||||
|
* Tue Jul 30 2024 orignal <orignal@i2pmail.org> - 2.53.1
|
||||||
|
- update to 2.53.1
|
||||||
|
|
||||||
|
* Fri Jul 19 2024 orignal <orignal@i2pmail.org> - 2.53.0
|
||||||
|
- update to 2.53.0
|
||||||
|
|
||||||
|
* Sun May 12 2024 orignal <orignal@i2pmail.org> - 2.52.0
|
||||||
|
- update to 2.52.0
|
||||||
|
|
||||||
|
* Sat Apr 06 2024 orignal <orignal@i2pmail.org> - 2.51.0
|
||||||
|
- update to 2.51.0
|
||||||
|
|
||||||
|
* Sat Jan 06 2024 orignal <orignal@i2pmail.org> - 2.50.2
|
||||||
|
- update to 2.50.2
|
||||||
|
|
||||||
|
* Sat Dec 23 2023 r4sas <r4sas@i2pmail.org> - 2.50.1
|
||||||
|
- update to 2.50.1
|
||||||
|
|
||||||
|
* Mon Dec 18 2023 orignal <orignal@i2pmail.org> - 2.50.0
|
||||||
|
- update to 2.50.0
|
||||||
|
|
||||||
|
* Mon Sep 18 2023 orignal <orignal@i2pmail.org> - 2.49.0
|
||||||
|
- update to 2.49.0
|
||||||
|
|
||||||
|
* Mon Jun 12 2023 orignal <orignal@i2pmail.org> - 2.48.0
|
||||||
|
- update to 2.48.0
|
||||||
|
|
||||||
|
* Sat Mar 11 2023 orignal <orignal@i2pmail.org> - 2.47.0
|
||||||
|
- update to 2.47.0
|
||||||
|
|
||||||
|
* Mon Feb 20 2023 r4sas <r4sas@i2pmail.org> - 2.46.1
|
||||||
|
- update to 2.46.1
|
||||||
|
|
||||||
|
* Wed Feb 15 2023 orignal <orignal@i2pmail.org> - 2.46.0
|
||||||
|
- update to 2.46.0
|
||||||
|
|
||||||
|
* Wed Jan 11 2023 orignal <orignal@i2pmail.org> - 2.45.1
|
||||||
|
- update to 2.45.1
|
||||||
|
|
||||||
|
* Tue Jan 3 2023 orignal <orignal@i2pmail.org> - 2.45.0
|
||||||
|
- update to 2.45.0
|
||||||
|
|
||||||
|
* Sun Nov 20 2022 orignal <orignal@i2pmail.org> - 2.44.0
|
||||||
|
- update to 2.44.0
|
||||||
|
|
||||||
|
* Mon Aug 22 2022 orignal <orignal@i2pmail.org> - 2.43.0
|
||||||
|
- update to 2.43.0
|
||||||
|
|
||||||
|
* Tue May 24 2022 r4sas <r4sas@i2pmail.org> - 2.42.1
|
||||||
|
- update to 2.42.1
|
||||||
|
|
||||||
|
* Sun May 22 2022 orignal <orignal@i2pmail.org> - 2.42.0
|
||||||
|
- update to 2.42.0
|
||||||
|
|
||||||
|
* Sun Feb 20 2022 r4sas <r4sas@i2pmail.org> - 2.41.0
|
||||||
|
- update to 2.41.0
|
||||||
|
- fixed build on Fedora Copr over openssl trunk code
|
||||||
|
|
||||||
* Mon Nov 29 2021 orignal <i2porignal@yandex.ru> - 2.40.0
|
* Mon Nov 29 2021 orignal <i2porignal@yandex.ru> - 2.40.0
|
||||||
- update to 2.40.0
|
- update to 2.40.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: i2pd
|
Name: i2pd
|
||||||
Version: 2.40.0
|
Version: 2.56.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: I2P router written in C++
|
Summary: I2P router written in C++
|
||||||
Conflicts: i2pd-git
|
Conflicts: i2pd-git
|
||||||
@@ -22,13 +22,19 @@ BuildRequires: openssl-devel
|
|||||||
BuildRequires: miniupnpc-devel
|
BuildRequires: miniupnpc-devel
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
|
|
||||||
|
%if 0%{?fedora} == 41
|
||||||
|
BuildRequires: openssl-devel-engine
|
||||||
|
%endif
|
||||||
|
|
||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
Requires: systemd
|
Requires: systemd
|
||||||
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
|
Requires(pre): %{_sbindir}/useradd %{_sbindir}/groupadd
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
C++ implementation of I2P.
|
C++ implementation of I2P.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
@@ -36,63 +42,60 @@ C++ implementation of I2P.
|
|||||||
%build
|
%build
|
||||||
cd build
|
cd build
|
||||||
%if 0%{?rhel} == 7
|
%if 0%{?rhel} == 7
|
||||||
%cmake3 \
|
%cmake3 \
|
||||||
-DWITH_LIBRARY=OFF \
|
-DWITH_LIBRARY=OFF \
|
||||||
-DWITH_UPNP=ON \
|
-DWITH_UPNP=ON \
|
||||||
-DWITH_HARDENING=ON \
|
-DWITH_HARDENING=ON \
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||||
%else
|
%else
|
||||||
%cmake \
|
%cmake \
|
||||||
-DWITH_LIBRARY=OFF \
|
-DWITH_LIBRARY=OFF \
|
||||||
-DWITH_UPNP=ON \
|
-DWITH_UPNP=ON \
|
||||||
-DWITH_HARDENING=ON \
|
-DWITH_HARDENING=ON \
|
||||||
%if 0%{?fedora} > 29
|
%if 0%{?fedora} > 29
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||||
.
|
.
|
||||||
%else
|
%else
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} >= 35
|
%if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
|
||||||
pushd redhat-linux-build
|
pushd redhat-linux-build
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?fedora} >= 33
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?mageia} > 7
|
%if 0%{?mageia} > 7
|
||||||
pushd build
|
pushd build
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?rhel} == 9 || 0%{?fedora} >= 33 || 0%{?mageia} > 7
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?mageia} > 7
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd build
|
pushd build
|
||||||
|
|
||||||
%if 0%{?fedora} >= 35
|
%if 0%{?rhel} == 9 || 0%{?fedora} >= 35 || 0%{?eln}
|
||||||
pushd redhat-linux-build
|
pushd redhat-linux-build
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?fedora} >= 33
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?mageia}
|
%if 0%{?mageia}
|
||||||
pushd build
|
pushd build
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
chrpath -d i2pd
|
chrpath -d i2pd
|
||||||
%{__install} -D -m 755 i2pd %{buildroot}%{_sbindir}/i2pd
|
%{__install} -D -m 755 i2pd %{buildroot}%{_bindir}/i2pd
|
||||||
%{__install} -d -m 755 %{buildroot}%{_datadir}/i2pd
|
%{__install} -d -m 755 %{buildroot}%{_datadir}/i2pd
|
||||||
%{__install} -d -m 700 %{buildroot}%{_sharedstatedir}/i2pd
|
%{__install} -d -m 700 %{buildroot}%{_sharedstatedir}/i2pd
|
||||||
%{__install} -d -m 700 %{buildroot}%{_localstatedir}/log/i2pd
|
%{__install} -d -m 700 %{buildroot}%{_localstatedir}/log/i2pd
|
||||||
@@ -128,7 +131,7 @@ getent passwd i2pd >/dev/null || \
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%doc LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf contrib/tunnels.d
|
%doc LICENSE README.md contrib/i2pd.conf contrib/subscriptions.txt contrib/tunnels.conf contrib/tunnels.d
|
||||||
%{_sbindir}/i2pd
|
%{_bindir}/i2pd
|
||||||
%config(noreplace) %{_sysconfdir}/i2pd/*.conf
|
%config(noreplace) %{_sysconfdir}/i2pd/*.conf
|
||||||
%config(noreplace) %{_sysconfdir}/i2pd/tunnels.conf.d/*.conf
|
%config(noreplace) %{_sysconfdir}/i2pd/tunnels.conf.d/*.conf
|
||||||
%config %{_sysconfdir}/i2pd/subscriptions.txt
|
%config %{_sysconfdir}/i2pd/subscriptions.txt
|
||||||
@@ -143,6 +146,72 @@ getent passwd i2pd >/dev/null || \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 11 2025 orignal <orignal@i2pmail.org> - 2.56.0
|
||||||
|
- update to 2.56.0
|
||||||
|
|
||||||
|
* Mon Dec 30 2024 orignal <orignal@i2pmail.org> - 2.55.0
|
||||||
|
- update to 2.55.0
|
||||||
|
|
||||||
|
* Sun Oct 6 2024 orignal <orignal@i2pmail.org> - 2.54.0
|
||||||
|
- update to 2.54.0
|
||||||
|
|
||||||
|
* Tue Jul 30 2024 orignal <orignal@i2pmail.org> - 2.53.1
|
||||||
|
- update to 2.53.1
|
||||||
|
|
||||||
|
* Fri Jul 19 2024 orignal <orignal@i2pmail.org> - 2.53.0
|
||||||
|
- update to 2.53.0
|
||||||
|
|
||||||
|
* Sun May 12 2024 orignal <orignal@i2pmail.org> - 2.52.0
|
||||||
|
- update to 2.52.0
|
||||||
|
|
||||||
|
* Sat Apr 06 2024 orignal <orignal@i2pmail.org> - 2.51.0
|
||||||
|
- update to 2.51.0
|
||||||
|
|
||||||
|
* Sat Jan 06 2024 orignal <orignal@i2pmail.org> - 2.50.2
|
||||||
|
- update to 2.50.2
|
||||||
|
|
||||||
|
* Sat Dec 23 2023 r4sas <r4sas@i2pmail.org> - 2.50.1
|
||||||
|
- update to 2.50.1
|
||||||
|
|
||||||
|
* Mon Dec 18 2023 orignal <orignal@i2pmail.org> - 2.50.0
|
||||||
|
- update to 2.50.0
|
||||||
|
|
||||||
|
* Mon Sep 18 2023 orignal <orignal@i2pmail.org> - 2.49.0
|
||||||
|
- update to 2.49.0
|
||||||
|
|
||||||
|
* Mon Jun 12 2023 orignal <orignal@i2pmail.org> - 2.48.0
|
||||||
|
- update to 2.48.0
|
||||||
|
|
||||||
|
* Sat Mar 11 2023 orignal <orignal@i2pmail.org> - 2.47.0
|
||||||
|
- update to 2.47.0
|
||||||
|
|
||||||
|
* Mon Feb 20 2023 r4sas <r4sas@i2pmail.org> - 2.46.1
|
||||||
|
- update to 2.46.1
|
||||||
|
|
||||||
|
* Wed Feb 15 2023 orignal <orignal@i2pmail.org> - 2.46.0
|
||||||
|
- update to 2.46.0
|
||||||
|
|
||||||
|
* Wed Jan 11 2023 orignal <orignal@i2pmail.org> - 2.45.1
|
||||||
|
- update to 2.45.1
|
||||||
|
|
||||||
|
* Tue Jan 3 2023 orignal <orignal@i2pmail.org> - 2.45.0
|
||||||
|
- update to 2.45.0
|
||||||
|
|
||||||
|
* Sun Nov 20 2022 orignal <orignal@i2pmail.org> - 2.44.0
|
||||||
|
- update to 2.44.0
|
||||||
|
|
||||||
|
* Mon Aug 22 2022 orignal <orignal@i2pmail.org> - 2.43.0
|
||||||
|
- update to 2.43.0
|
||||||
|
|
||||||
|
* Tue May 24 2022 r4sas <r4sas@i2pmail.org> - 2.42.1
|
||||||
|
- update to 2.42.1
|
||||||
|
|
||||||
|
* Sun May 22 2022 orignal <orignal@i2pmail.org> - 2.42.0
|
||||||
|
- update to 2.42.0
|
||||||
|
|
||||||
|
* Sun Feb 20 2022 r4sas <r4sas@i2pmail.org> - 2.41.0
|
||||||
|
- update to 2.41.0
|
||||||
|
|
||||||
* Mon Nov 29 2021 orignal <i2porignal@yandex.ru> - 2.40.0
|
* Mon Nov 29 2021 orignal <i2porignal@yandex.ru> - 2.40.0
|
||||||
- update to 2.40.0
|
- update to 2.40.0
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ port = 6668
|
|||||||
destination = irc.ilita.i2p
|
destination = irc.ilita.i2p
|
||||||
destinationport = 6667
|
destinationport = 6667
|
||||||
keys = irc-keys.dat
|
keys = irc-keys.dat
|
||||||
|
i2p.streaming.profile=2
|
||||||
|
|
||||||
#[IRC-IRC2P]
|
#[IRC-IRC2P]
|
||||||
#type = client
|
#type = client
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ env LOGFILE="/var/log/i2pd/i2pd.log"
|
|||||||
|
|
||||||
expect fork
|
expect fork
|
||||||
|
|
||||||
exec /usr/sbin/i2pd --daemon --service --log=file --logfile=$LOGFILE
|
exec /usr/bin/i2pd --daemon --service --log=file --logfile=$LOGFILE
|
||||||
|
|||||||
@@ -1,291 +1,293 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
* Copyright (c) 2021-2023, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
* See full license text in LICENSE file at top of project tree
|
* See full license text in LICENSE file at top of project tree
|
||||||
*
|
*
|
||||||
******************************************************************
|
******************************************************************
|
||||||
*
|
*
|
||||||
* This is style sheet for webconsole, with @media selectors for adaptive
|
* This is style sheet for webconsole, with @media selectors for adaptive
|
||||||
* view on desktop and mobile devices, respecting preferred user's color
|
* view on desktop and mobile devices, respecting preferred user's color
|
||||||
* scheme used in system/browser.
|
* scheme used in system/browser.
|
||||||
*
|
*
|
||||||
* Minified copy of that style sheet is bundled inside i2pd sources.
|
* Minified copy of that style sheet is bundled inside i2pd sources.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--main-bg-color: #FAFAFA;
|
--main-bg-color: #fafafa;
|
||||||
--main-text-color: #103456;
|
--main-text-color: #103456;
|
||||||
--main-link-color: #894C84;
|
--main-link-color: #894c84;
|
||||||
}
|
--main-link-hover-color: #fafafa;
|
||||||
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
@media (prefers-color-scheme: dark) {
|
||||||
--main-bg-color: #181818;
|
:root {
|
||||||
--main-text-color: #156A3D;
|
--main-bg-color: #242424;
|
||||||
--main-link-color: #894C84;
|
--main-text-color: #17ab5c;
|
||||||
}
|
--main-link-color: #bf64b7;
|
||||||
}
|
--main-link-hover-color: #000000;
|
||||||
|
}
|
||||||
body {
|
}
|
||||||
font: 100%/1.5em sans-serif;
|
|
||||||
margin: 0;
|
body {
|
||||||
padding: 1.5em;
|
font: 100%/1.5em sans-serif;
|
||||||
background: var(--main-bg-color);
|
margin: 0;
|
||||||
color: var(--main-text-color);
|
padding: 1.5em;
|
||||||
}
|
background: var(--main-bg-color);
|
||||||
|
color: var(--main-text-color);
|
||||||
a, .slide label {
|
}
|
||||||
text-decoration: none;
|
|
||||||
color: var(--main-link-color);
|
a, .slide label {
|
||||||
}
|
text-decoration: none;
|
||||||
|
color: var(--main-link-color);
|
||||||
a:hover, .slide label:hover, button[type=submit]:hover {
|
}
|
||||||
color: #FAFAFA;
|
|
||||||
background: var(--main-link-color);
|
a:hover, a.button.selected, .slide label:hover, button[type=submit]:hover {
|
||||||
}
|
color: var(--main-link-hover-color);
|
||||||
|
background: var(--main-link-color);
|
||||||
a.button {
|
}
|
||||||
appearance: button;
|
|
||||||
text-decoration: none;
|
a.button {
|
||||||
padding: 0 5px;
|
appearance: button;
|
||||||
border: 1px solid var(--main-link-color);
|
text-decoration: none;
|
||||||
}
|
padding: 0 5px;
|
||||||
|
border: 1px solid var(--main-link-color);
|
||||||
.header {
|
}
|
||||||
font-size: 2.5em;
|
|
||||||
text-align: center;
|
.header {
|
||||||
margin: 1em 0;
|
font-size: 2.5em;
|
||||||
color: var(--main-link-color);
|
text-align: center;
|
||||||
}
|
margin: 1em 0;
|
||||||
|
color: var(--main-link-color);
|
||||||
.wrapper {
|
}
|
||||||
margin: 0 auto;
|
|
||||||
padding: 1em;
|
.wrapper {
|
||||||
max-width: 64em;
|
margin: 0 auto;
|
||||||
}
|
padding: 1em;
|
||||||
|
max-width: 64em;
|
||||||
.menu {
|
}
|
||||||
display: block;
|
|
||||||
float: left;
|
.menu {
|
||||||
overflow: hidden;
|
display: block;
|
||||||
padding: 4px;
|
float: left;
|
||||||
max-width: 12em;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
padding: 4px;
|
||||||
text-overflow: ellipsis;
|
max-width: 12em;
|
||||||
}
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
.listitem {
|
}
|
||||||
display: block;
|
|
||||||
font-family: monospace;
|
.listitem {
|
||||||
font-size: 1.2em;
|
display: block;
|
||||||
white-space: nowrap;
|
font-family: monospace;
|
||||||
}
|
font-size: 1.2em;
|
||||||
|
white-space: nowrap;
|
||||||
.tableitem {
|
}
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1.2em;
|
.tableitem {
|
||||||
white-space: nowrap;
|
font-family: monospace;
|
||||||
}
|
font-size: 1.2em;
|
||||||
|
white-space: nowrap;
|
||||||
.content {
|
}
|
||||||
float: left;
|
|
||||||
font-size: 1em;
|
.content {
|
||||||
margin-left: 2em;
|
float: left;
|
||||||
padding: 4px;
|
font-size: 1em;
|
||||||
max-width: 50em;
|
margin-left: 2em;
|
||||||
overflow: auto;
|
padding: 4px;
|
||||||
}
|
max-width: 50em;
|
||||||
|
overflow: auto;
|
||||||
.tunnel.established {
|
}
|
||||||
color: #56B734;
|
|
||||||
}
|
.tunnel.established {
|
||||||
|
color: #56B734;
|
||||||
.tunnel.expiring {
|
}
|
||||||
color: #D3AE3F;
|
|
||||||
}
|
.tunnel.expiring {
|
||||||
|
color: #D3AE3F;
|
||||||
.tunnel.failed {
|
}
|
||||||
color: #D33F3F;
|
|
||||||
}
|
.tunnel.failed {
|
||||||
|
color: #D33F3F;
|
||||||
.tunnel.building {
|
}
|
||||||
color: #434343;
|
|
||||||
}
|
.tunnel.building {
|
||||||
|
color: #434343;
|
||||||
caption {
|
}
|
||||||
font-size: 1.5em;
|
|
||||||
text-align: center;
|
caption {
|
||||||
color: var(--main-link-color);
|
font-size: 1.5em;
|
||||||
}
|
text-align: center;
|
||||||
|
color: var(--main-link-color);
|
||||||
table {
|
}
|
||||||
display: table;
|
|
||||||
border-collapse: collapse;
|
table {
|
||||||
text-align: center;
|
display: table;
|
||||||
}
|
border-collapse: collapse;
|
||||||
|
text-align: center;
|
||||||
table.extaddr {
|
}
|
||||||
text-align: left;
|
|
||||||
}
|
table.extaddr {
|
||||||
|
text-align: left;
|
||||||
table.services {
|
}
|
||||||
width: 100%;
|
|
||||||
}
|
table.services {
|
||||||
|
width: 100%;
|
||||||
textarea {
|
}
|
||||||
background-color: var(--main-bg-color);
|
|
||||||
color: var(--main-text-color);
|
textarea {
|
||||||
word-break: break-all;
|
background-color: var(--main-bg-color);
|
||||||
}
|
color: var(--main-text-color);
|
||||||
|
word-break: break-all;
|
||||||
.streamdest {
|
}
|
||||||
width: 120px;
|
|
||||||
max-width: 240px;
|
.streamdest {
|
||||||
overflow: hidden;
|
width: 120px;
|
||||||
text-overflow: ellipsis;
|
max-width: 240px;
|
||||||
}
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
.slide div.slidecontent, .slide [type="checkbox"] {
|
}
|
||||||
display: none;
|
|
||||||
}
|
.slide div.slidecontent, .slide [type="checkbox"] {
|
||||||
|
display: none;
|
||||||
.slide [type="checkbox"]:checked ~ div.slidecontent {
|
}
|
||||||
display: block;
|
|
||||||
margin-top: 0;
|
.slide [type="checkbox"]:checked ~ div.slidecontent {
|
||||||
padding: 0;
|
display: block;
|
||||||
}
|
margin-top: 0;
|
||||||
|
padding: 0;
|
||||||
.disabled {
|
}
|
||||||
color: #D33F3F;
|
|
||||||
}
|
.disabled {
|
||||||
|
color: #D33F3F;
|
||||||
.enabled {
|
}
|
||||||
color: #56B734;
|
|
||||||
}
|
.enabled {
|
||||||
|
color: #56B734;
|
||||||
button[type=submit] {
|
}
|
||||||
background-color: transparent;
|
|
||||||
color: var(--main-link-color);
|
button[type=submit] {
|
||||||
text-decoration: none;
|
background-color: transparent;
|
||||||
padding: 5px;
|
color: var(--main-link-color);
|
||||||
border: 1px solid var(--main-link-color);
|
text-decoration: none;
|
||||||
font-size: 14px;
|
padding: 5px;
|
||||||
}
|
border: 1px solid var(--main-link-color);
|
||||||
|
font-size: 14px;
|
||||||
input, select, select option {
|
}
|
||||||
background-color: var(--main-bg-color);
|
|
||||||
color: var(--main-link-color);
|
input, select, select option {
|
||||||
padding: 5px;
|
background-color: var(--main-bg-color);
|
||||||
border: 1px solid var(--main-link-color);
|
color: var(--main-link-color);
|
||||||
font-size: 14px;
|
padding: 5px;
|
||||||
}
|
border: 1px solid var(--main-link-color);
|
||||||
|
font-size: 14px;
|
||||||
input:focus, select:focus, select option:focus {
|
}
|
||||||
outline: none;
|
|
||||||
}
|
input:focus, select:focus, select option:focus {
|
||||||
|
outline: none;
|
||||||
input[type=number]::-webkit-inner-spin-button {
|
}
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
input[type=number]::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
@media screen and (max-width: 1150px) { /* adaptive style */
|
}
|
||||||
.wrapper {
|
|
||||||
max-width: 58em;
|
@media screen and (max-width: 1150px) { /* adaptive style */
|
||||||
}
|
.wrapper {
|
||||||
|
max-width: 58em;
|
||||||
.content {
|
}
|
||||||
max-width: 40em;
|
|
||||||
}
|
.content {
|
||||||
}
|
max-width: 40em;
|
||||||
|
}
|
||||||
@media screen and (max-width: 980px) {
|
}
|
||||||
body {
|
|
||||||
font: 100%/1.2em sans-serif;
|
@media screen and (max-width: 980px) {
|
||||||
padding: 1.2em 0 0 0;
|
body {
|
||||||
}
|
font: 100%/1.2em sans-serif;
|
||||||
|
padding: 1.2em 0 0 0;
|
||||||
.menu {
|
}
|
||||||
width: 100%;
|
|
||||||
max-width: unset;
|
.menu {
|
||||||
display: block;
|
width: 100%;
|
||||||
float: none;
|
max-width: unset;
|
||||||
position: unset;
|
display: block;
|
||||||
font-size: 16px;
|
float: none;
|
||||||
text-align: center;
|
position: unset;
|
||||||
}
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
.menu a, .commands a {
|
}
|
||||||
display: inline-block;
|
|
||||||
padding: 4px;
|
.menu a, .commands a {
|
||||||
}
|
display: inline-block;
|
||||||
|
padding: 4px;
|
||||||
.content {
|
}
|
||||||
float: none;
|
|
||||||
margin-left: unset;
|
.content {
|
||||||
margin-top: 16px;
|
float: none;
|
||||||
max-width: 100%;
|
margin-left: unset;
|
||||||
width: 100%;
|
margin-top: 16px;
|
||||||
text-align: center;
|
max-width: 100%;
|
||||||
}
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
a, .slide label {
|
}
|
||||||
display: block;
|
|
||||||
}
|
a, .slide label {
|
||||||
|
display: block;
|
||||||
.header {
|
}
|
||||||
margin: unset;
|
|
||||||
font-size: 1.5em;
|
.header {
|
||||||
}
|
margin: unset;
|
||||||
|
font-size: 1.5em;
|
||||||
small {
|
}
|
||||||
display: block
|
|
||||||
}
|
small {
|
||||||
|
display: block
|
||||||
a.button {
|
}
|
||||||
appearance: button;
|
|
||||||
text-decoration: none;
|
a.button {
|
||||||
margin-top: 10px;
|
appearance: button;
|
||||||
padding: 6px;
|
text-decoration: none;
|
||||||
border: 2px solid var(--main-link-color);
|
margin-top: 10px;
|
||||||
border-radius: 5px;
|
padding: 6px;
|
||||||
width: -webkit-fill-available;
|
border: 2px solid var(--main-link-color);
|
||||||
}
|
border-radius: 5px;
|
||||||
|
width: -webkit-fill-available;
|
||||||
input, select {
|
}
|
||||||
width: 35%;
|
|
||||||
text-align: center;
|
input, select {
|
||||||
padding: 5px;
|
width: 35%;
|
||||||
border: 2px solid var(--main-link-color);
|
text-align: center;
|
||||||
border-radius: 5px;
|
padding: 5px;
|
||||||
font-size: 18px;
|
border: 2px solid var(--main-link-color);
|
||||||
}
|
border-radius: 5px;
|
||||||
|
font-size: 18px;
|
||||||
table.extaddr {
|
}
|
||||||
margin: auto;
|
|
||||||
text-align: unset;
|
table.extaddr {
|
||||||
}
|
margin: auto;
|
||||||
|
text-align: unset;
|
||||||
textarea {
|
}
|
||||||
width: -webkit-fill-available;
|
|
||||||
height: auto;
|
textarea {
|
||||||
padding: 5px;
|
width: -webkit-fill-available;
|
||||||
border: 2px solid var(--main-link-color);
|
height: auto;
|
||||||
border-radius: 5px;
|
padding: 5px;
|
||||||
font-size: 12px;
|
border: 2px solid var(--main-link-color);
|
||||||
}
|
border-radius: 5px;
|
||||||
|
font-size: 12px;
|
||||||
button[type=submit] {
|
}
|
||||||
padding: 5px 15px;
|
|
||||||
background: transparent;
|
button[type=submit] {
|
||||||
border: 2px solid var(--main-link-color);
|
padding: 5px 15px;
|
||||||
cursor: pointer;
|
background: transparent;
|
||||||
-webkit-border-radius: 5px;
|
border: 2px solid var(--main-link-color);
|
||||||
border-radius: 5px;
|
cursor: pointer;
|
||||||
position: relative;
|
-webkit-border-radius: 5px;
|
||||||
height: 36px;
|
border-radius: 5px;
|
||||||
display: -webkit-inline-box;
|
position: relative;
|
||||||
margin-top: 10px;
|
height: 36px;
|
||||||
}
|
display: -webkit-inline-box;
|
||||||
}
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -31,7 +31,6 @@
|
|||||||
#include "Crypto.h"
|
#include "Crypto.h"
|
||||||
#include "UPnP.h"
|
#include "UPnP.h"
|
||||||
#include "Timestamp.h"
|
#include "Timestamp.h"
|
||||||
#include "util.h"
|
|
||||||
#include "I18N.h"
|
#include "I18N.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
@@ -58,12 +57,16 @@ namespace util
|
|||||||
bool Daemon_Singleton::IsService () const
|
bool Daemon_Singleton::IsService () const
|
||||||
{
|
{
|
||||||
bool service = false;
|
bool service = false;
|
||||||
#ifndef _WIN32
|
|
||||||
i2p::config::GetOption("service", service);
|
i2p::config::GetOption("service", service);
|
||||||
#endif
|
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Daemon_Singleton::setDataDir(std::string path)
|
||||||
|
{
|
||||||
|
if (path != "")
|
||||||
|
DaemonDataDir = path;
|
||||||
|
}
|
||||||
|
|
||||||
bool Daemon_Singleton::init(int argc, char* argv[]) {
|
bool Daemon_Singleton::init(int argc, char* argv[]) {
|
||||||
return init(argc, argv, nullptr);
|
return init(argc, argv, nullptr);
|
||||||
}
|
}
|
||||||
@@ -73,8 +76,14 @@ namespace util
|
|||||||
i2p::config::Init();
|
i2p::config::Init();
|
||||||
i2p::config::ParseCmdline(argc, argv);
|
i2p::config::ParseCmdline(argc, argv);
|
||||||
|
|
||||||
std::string config; i2p::config::GetOption("conf", config);
|
std::string config; i2p::config::GetOption("conf", config);
|
||||||
std::string datadir; i2p::config::GetOption("datadir", datadir);
|
std::string datadir;
|
||||||
|
if(DaemonDataDir != "") {
|
||||||
|
datadir = DaemonDataDir;
|
||||||
|
} else {
|
||||||
|
i2p::config::GetOption("datadir", datadir);
|
||||||
|
}
|
||||||
|
|
||||||
i2p::fs::DetectDataDir(datadir, IsService());
|
i2p::fs::DetectDataDir(datadir, IsService());
|
||||||
i2p::fs::Init();
|
i2p::fs::Init();
|
||||||
|
|
||||||
@@ -99,9 +108,9 @@ namespace util
|
|||||||
|
|
||||||
certsdir = i2p::fs::GetCertsDir();
|
certsdir = i2p::fs::GetCertsDir();
|
||||||
|
|
||||||
std::string logs = ""; i2p::config::GetOption("log", logs);
|
std::string logs = ""; i2p::config::GetOption("log", logs);
|
||||||
std::string logfile = ""; i2p::config::GetOption("logfile", logfile);
|
std::string logfile = ""; i2p::config::GetOption("logfile", logfile);
|
||||||
std::string loglevel = ""; i2p::config::GetOption("loglevel", loglevel);
|
std::string loglevel = ""; i2p::config::GetOption("loglevel", loglevel);
|
||||||
bool logclftime; i2p::config::GetOption("logclftime", logclftime);
|
bool logclftime; i2p::config::GetOption("logclftime", logclftime);
|
||||||
|
|
||||||
/* setup logging */
|
/* setup logging */
|
||||||
@@ -140,131 +149,44 @@ namespace util
|
|||||||
LogPrint(eLogDebug, "FS: Certificates directory: ", certsdir);
|
LogPrint(eLogDebug, "FS: Certificates directory: ", certsdir);
|
||||||
|
|
||||||
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
bool precomputation; i2p::config::GetOption("precomputation.elgamal", precomputation);
|
||||||
bool aesni; i2p::config::GetOption("cpuext.aesni", aesni);
|
bool ssu; i2p::config::GetOption("ssu", ssu);
|
||||||
bool avx; i2p::config::GetOption("cpuext.avx", avx);
|
if (!ssu && i2p::config::IsDefault ("precomputation.elgamal"))
|
||||||
bool forceCpuExt; i2p::config::GetOption("cpuext.force", forceCpuExt);
|
precomputation = false; // we don't elgamal table if no ssu, unless it's specified explicitly
|
||||||
i2p::crypto::InitCrypto (precomputation, aesni, avx, forceCpuExt);
|
i2p::crypto::InitCrypto (precomputation);
|
||||||
|
|
||||||
|
i2p::transport::InitAddressFromIface (); // get address4/6 from interfaces
|
||||||
|
|
||||||
int netID; i2p::config::GetOption("netid", netID);
|
int netID; i2p::config::GetOption("netid", netID);
|
||||||
i2p::context.SetNetID (netID);
|
i2p::context.SetNetID (netID);
|
||||||
|
|
||||||
|
bool checkReserved; i2p::config::GetOption("reservedrange", checkReserved);
|
||||||
|
i2p::transport::transports.SetCheckReserved(checkReserved);
|
||||||
|
|
||||||
i2p::context.Init ();
|
i2p::context.Init ();
|
||||||
|
|
||||||
bool ipv6; i2p::config::GetOption("ipv6", ipv6);
|
i2p::transport::InitTransports ();
|
||||||
bool ipv4; i2p::config::GetOption("ipv4", ipv4);
|
|
||||||
#ifdef MESHNET
|
|
||||||
// manual override for meshnet
|
|
||||||
ipv4 = false;
|
|
||||||
ipv6 = true;
|
|
||||||
#endif
|
|
||||||
// ifname -> address
|
|
||||||
std::string ifname; i2p::config::GetOption("ifname", ifname);
|
|
||||||
if (ipv4 && i2p::config::IsDefault ("address4"))
|
|
||||||
{
|
|
||||||
std::string ifname4; i2p::config::GetOption("ifname4", ifname4);
|
|
||||||
if (!ifname4.empty ())
|
|
||||||
i2p::config::SetOption ("address4", i2p::util::net::GetInterfaceAddress(ifname4, false).to_string ()); // v4
|
|
||||||
else if (!ifname.empty ())
|
|
||||||
i2p::config::SetOption ("address4", i2p::util::net::GetInterfaceAddress(ifname, false).to_string ()); // v4
|
|
||||||
}
|
|
||||||
if (ipv6 && i2p::config::IsDefault ("address6"))
|
|
||||||
{
|
|
||||||
std::string ifname6; i2p::config::GetOption("ifname6", ifname6);
|
|
||||||
if (!ifname6.empty ())
|
|
||||||
i2p::config::SetOption ("address6", i2p::util::net::GetInterfaceAddress(ifname6, true).to_string ()); // v6
|
|
||||||
else if (!ifname.empty ())
|
|
||||||
i2p::config::SetOption ("address6", i2p::util::net::GetInterfaceAddress(ifname, true).to_string ()); // v6
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ygg; i2p::config::GetOption("meshnets.yggdrasil", ygg);
|
|
||||||
boost::asio::ip::address_v6 yggaddr;
|
|
||||||
if (ygg)
|
|
||||||
{
|
|
||||||
std::string yggaddress; i2p::config::GetOption ("meshnets.yggaddress", yggaddress);
|
|
||||||
if (!yggaddress.empty ())
|
|
||||||
{
|
|
||||||
yggaddr = boost::asio::ip::address_v6::from_string (yggaddress);
|
|
||||||
if (yggaddr.is_unspecified () || !i2p::util::net::IsYggdrasilAddress (yggaddr) ||
|
|
||||||
!i2p::util::net::IsLocalAddress (yggaddr))
|
|
||||||
{
|
|
||||||
LogPrint(eLogWarning, "Daemon: Can't find Yggdrasil address ", yggaddress);
|
|
||||||
ygg = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
yggaddr = i2p::util::net::GetYggdrasilAddress ();
|
|
||||||
if (yggaddr.is_unspecified ())
|
|
||||||
{
|
|
||||||
LogPrint(eLogWarning, "Daemon: Yggdrasil is not running. Disabled");
|
|
||||||
ygg = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t port; i2p::config::GetOption("port", port);
|
|
||||||
if (!i2p::config::IsDefault("port"))
|
|
||||||
{
|
|
||||||
LogPrint(eLogInfo, "Daemon: Accepting incoming connections at port ", port);
|
|
||||||
i2p::context.UpdatePort (port);
|
|
||||||
}
|
|
||||||
i2p::context.SetSupportsV6 (ipv6);
|
|
||||||
i2p::context.SetSupportsV4 (ipv4);
|
|
||||||
i2p::context.SetSupportsMesh (ygg, yggaddr);
|
|
||||||
|
|
||||||
i2p::context.RemoveNTCPAddress (!ipv6); // TODO: remove later
|
|
||||||
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
|
|
||||||
if (ntcp2)
|
|
||||||
{
|
|
||||||
bool published; i2p::config::GetOption("ntcp2.published", published);
|
|
||||||
if (published)
|
|
||||||
{
|
|
||||||
std::string ntcp2proxy; i2p::config::GetOption("ntcp2.proxy", ntcp2proxy);
|
|
||||||
if (!ntcp2proxy.empty ()) published = false;
|
|
||||||
}
|
|
||||||
if (published)
|
|
||||||
{
|
|
||||||
uint16_t ntcp2port; i2p::config::GetOption("ntcp2.port", ntcp2port);
|
|
||||||
if (!ntcp2port) ntcp2port = port; // use standard port
|
|
||||||
i2p::context.PublishNTCP2Address (ntcp2port, true, ipv4, ipv6, false); // publish
|
|
||||||
if (ipv6)
|
|
||||||
{
|
|
||||||
std::string ipv6Addr; i2p::config::GetOption("ntcp2.addressv6", ipv6Addr);
|
|
||||||
auto addr = boost::asio::ip::address_v6::from_string (ipv6Addr);
|
|
||||||
if (!addr.is_unspecified () && addr != boost::asio::ip::address_v6::any ())
|
|
||||||
i2p::context.UpdateNTCP2V6Address (addr); // set ipv6 address if configured
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
i2p::context.PublishNTCP2Address (port, false, ipv4, ipv6, false); // unpublish
|
|
||||||
}
|
|
||||||
if (ygg)
|
|
||||||
{
|
|
||||||
i2p::context.PublishNTCP2Address (port, true, false, false, true);
|
|
||||||
i2p::context.UpdateNTCP2V6Address (yggaddr);
|
|
||||||
if (!ipv4 && !ipv6)
|
|
||||||
i2p::context.SetStatus (eRouterStatusMesh);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool transit; i2p::config::GetOption("notransit", transit);
|
|
||||||
i2p::context.SetAcceptsTunnels (!transit);
|
|
||||||
uint16_t transitTunnels; i2p::config::GetOption("limits.transittunnels", transitTunnels);
|
|
||||||
SetMaxNumTransitTunnels (transitTunnels);
|
|
||||||
|
|
||||||
bool isFloodfill; i2p::config::GetOption("floodfill", isFloodfill);
|
bool isFloodfill; i2p::config::GetOption("floodfill", isFloodfill);
|
||||||
if (isFloodfill) {
|
if (isFloodfill)
|
||||||
|
{
|
||||||
LogPrint(eLogInfo, "Daemon: Router configured as floodfill");
|
LogPrint(eLogInfo, "Daemon: Router configured as floodfill");
|
||||||
i2p::context.SetFloodfill (true);
|
i2p::context.SetFloodfill (true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
i2p::context.SetFloodfill (false);
|
i2p::context.SetFloodfill (false);
|
||||||
}
|
|
||||||
|
bool transit; i2p::config::GetOption("notransit", transit);
|
||||||
|
i2p::context.SetAcceptsTunnels (!transit);
|
||||||
|
uint32_t transitTunnels; i2p::config::GetOption("limits.transittunnels", transitTunnels);
|
||||||
|
if (isFloodfill && i2p::config::IsDefault ("limits.transittunnels"))
|
||||||
|
transitTunnels *= 2; // double default number of transit tunnels for floodfill
|
||||||
|
i2p::tunnel::tunnels.SetMaxNumTransitTunnels (transitTunnels);
|
||||||
|
|
||||||
/* this section also honors 'floodfill' flag, if set above */
|
/* this section also honors 'floodfill' flag, if set above */
|
||||||
std::string bandwidth; i2p::config::GetOption("bandwidth", bandwidth);
|
std::string bandwidth; i2p::config::GetOption("bandwidth", bandwidth);
|
||||||
if (bandwidth.length () > 0)
|
if (bandwidth.length () > 0)
|
||||||
{
|
{
|
||||||
if (bandwidth[0] >= 'K' && bandwidth[0] <= 'X')
|
if (bandwidth.length () == 1 && ((bandwidth[0] >= 'K' && bandwidth[0] <= 'P') || bandwidth[0] == 'X' ))
|
||||||
{
|
{
|
||||||
i2p::context.SetBandwidth (bandwidth[0]);
|
i2p::context.SetBandwidth (bandwidth[0]);
|
||||||
LogPrint(eLogInfo, "Daemon: Bandwidth set to ", i2p::context.GetBandwidthLimit (), "KBps");
|
LogPrint(eLogInfo, "Daemon: Bandwidth set to ", i2p::context.GetBandwidthLimit (), "KBps");
|
||||||
@@ -348,7 +270,7 @@ namespace util
|
|||||||
if (hidden)
|
if (hidden)
|
||||||
{
|
{
|
||||||
LogPrint(eLogInfo, "Daemon: Hidden mode enabled");
|
LogPrint(eLogInfo, "Daemon: Hidden mode enabled");
|
||||||
i2p::data::netdb.SetHidden(true);
|
i2p::context.SetHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string httpLang; i2p::config::GetOption("http.lang", httpLang);
|
std::string httpLang; i2p::config::GetOption("http.lang", httpLang);
|
||||||
@@ -377,19 +299,17 @@ namespace util
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
|
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
|
||||||
bool ssu; i2p::config::GetOption("ssu", ssu);
|
bool ssu2; i2p::config::GetOption("ssu2.enabled", ssu2);
|
||||||
bool checkInReserved; i2p::config::GetOption("reservedrange", checkInReserved);
|
|
||||||
LogPrint(eLogInfo, "Daemon: Starting Transports");
|
LogPrint(eLogInfo, "Daemon: Starting Transports");
|
||||||
if(!ssu) LogPrint(eLogInfo, "Daemon: SSU disabled");
|
if(!ssu2) LogPrint(eLogInfo, "Daemon: SSU2 disabled");
|
||||||
if(!ntcp2) LogPrint(eLogInfo, "Daemon: NTCP2 disabled");
|
if(!ntcp2) LogPrint(eLogInfo, "Daemon: NTCP2 disabled");
|
||||||
|
|
||||||
i2p::transport::transports.SetCheckReserved(checkInReserved);
|
i2p::transport::transports.Start(ntcp2, ssu2);
|
||||||
i2p::transport::transports.Start(ntcp2, ssu);
|
if (i2p::transport::transports.IsBoundSSU2() || i2p::transport::transports.IsBoundNTCP2())
|
||||||
if (i2p::transport::transports.IsBoundSSU() || i2p::transport::transports.IsBoundNTCP2())
|
|
||||||
LogPrint(eLogInfo, "Daemon: Transports started");
|
LogPrint(eLogInfo, "Daemon: Transports started");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Failed to start Transports");
|
LogPrint(eLogCritical, "Daemon: Failed to start Transports");
|
||||||
/** shut down netdb right away */
|
/** shut down netdb right away */
|
||||||
i2p::transport::transports.Stop();
|
i2p::transport::transports.Stop();
|
||||||
i2p::data::netdb.Stop();
|
i2p::data::netdb.Stop();
|
||||||
@@ -408,15 +328,17 @@ namespace util
|
|||||||
}
|
}
|
||||||
catch (std::exception& ex)
|
catch (std::exception& ex)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "Daemon: Failed to start Webconsole: ", ex.what ());
|
LogPrint (eLogCritical, "Daemon: Failed to start Webconsole: ", ex.what ());
|
||||||
ThrowFatal ("Unable to start webconsole at ", httpAddr, ":", httpPort, ": ", ex.what ());
|
ThrowFatal ("Unable to start webconsole at ", httpAddr, ":", httpPort, ": ", ex.what ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LogPrint(eLogInfo, "Daemon: Starting Tunnels");
|
LogPrint(eLogInfo, "Daemon: Starting Tunnels");
|
||||||
i2p::tunnel::tunnels.Start();
|
i2p::tunnel::tunnels.Start();
|
||||||
|
|
||||||
|
LogPrint(eLogInfo, "Daemon: Starting Router context");
|
||||||
|
i2p::context.Start();
|
||||||
|
|
||||||
LogPrint(eLogInfo, "Daemon: Starting Client");
|
LogPrint(eLogInfo, "Daemon: Starting Client");
|
||||||
i2p::client::context.Start ();
|
i2p::client::context.Start ();
|
||||||
|
|
||||||
@@ -433,7 +355,7 @@ namespace util
|
|||||||
}
|
}
|
||||||
catch (std::exception& ex)
|
catch (std::exception& ex)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "Daemon: Failed to start I2PControl: ", ex.what ());
|
LogPrint (eLogCritical, "Daemon: Failed to start I2PControl: ", ex.what ());
|
||||||
ThrowFatal ("Unable to start I2PControl service at ", i2pcpAddr, ":", i2pcpPort, ": ", ex.what ());
|
ThrowFatal ("Unable to start I2PControl service at ", i2pcpAddr, ":", i2pcpPort, ": ", ex.what ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -445,6 +367,8 @@ namespace util
|
|||||||
LogPrint(eLogInfo, "Daemon: Shutting down");
|
LogPrint(eLogInfo, "Daemon: Shutting down");
|
||||||
LogPrint(eLogInfo, "Daemon: Stopping Client");
|
LogPrint(eLogInfo, "Daemon: Stopping Client");
|
||||||
i2p::client::context.Stop();
|
i2p::client::context.Stop();
|
||||||
|
LogPrint(eLogInfo, "Daemon: Stopping Router context");
|
||||||
|
i2p::context.Stop();
|
||||||
LogPrint(eLogInfo, "Daemon: Stopping Tunnels");
|
LogPrint(eLogInfo, "Daemon: Stopping Tunnels");
|
||||||
i2p::tunnel::tunnels.Stop();
|
i2p::tunnel::tunnels.Stop();
|
||||||
|
|
||||||
|
|||||||
@@ -20,27 +20,33 @@ namespace util
|
|||||||
class Daemon_Singleton_Private;
|
class Daemon_Singleton_Private;
|
||||||
class Daemon_Singleton
|
class Daemon_Singleton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual bool init(int argc, char* argv[], std::shared_ptr<std::ostream> logstream);
|
virtual bool init (int argc, char* argv[], std::shared_ptr<std::ostream> logstream);
|
||||||
virtual bool init(int argc, char* argv[]);
|
virtual bool init (int argc, char* argv[]);
|
||||||
virtual bool start();
|
virtual bool start ();
|
||||||
virtual bool stop();
|
virtual bool stop ();
|
||||||
virtual void run () {};
|
virtual void run () {};
|
||||||
|
|
||||||
bool isDaemon;
|
virtual void setDataDir (std::string path);
|
||||||
bool running;
|
|
||||||
|
|
||||||
protected:
|
bool isDaemon;
|
||||||
|
bool running;
|
||||||
|
|
||||||
Daemon_Singleton();
|
protected:
|
||||||
virtual ~Daemon_Singleton();
|
|
||||||
|
|
||||||
bool IsService () const;
|
Daemon_Singleton ();
|
||||||
|
virtual ~Daemon_Singleton ();
|
||||||
|
|
||||||
// d-pointer for httpServer, httpProxy, etc.
|
bool IsService () const;
|
||||||
class Daemon_Singleton_Private;
|
|
||||||
Daemon_Singleton_Private &d;
|
// d-pointer for httpServer, httpProxy, etc.
|
||||||
|
class Daemon_Singleton_Private;
|
||||||
|
Daemon_Singleton_Private &d;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::string DaemonDataDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(QT_GUI_LIB) // check if QT
|
#if defined(QT_GUI_LIB) // check if QT
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -24,6 +24,8 @@ namespace http
|
|||||||
{
|
{
|
||||||
const size_t HTTP_CONNECTION_BUFFER_SIZE = 8192;
|
const size_t HTTP_CONNECTION_BUFFER_SIZE = 8192;
|
||||||
const int TOKEN_EXPIRATION_TIMEOUT = 30; // in seconds
|
const int TOKEN_EXPIRATION_TIMEOUT = 30; // in seconds
|
||||||
|
const int COMMAND_REDIRECT_TIMEOUT = 5; // in seconds
|
||||||
|
const int TRANSIT_TUNNELS_LIMIT = 1000000;
|
||||||
|
|
||||||
class HTTPConnection: public std::enable_shared_from_this<HTTPConnection>
|
class HTTPConnection: public std::enable_shared_from_this<HTTPConnection>
|
||||||
{
|
{
|
||||||
@@ -81,8 +83,8 @@ namespace http
|
|||||||
|
|
||||||
bool m_IsRunning;
|
bool m_IsRunning;
|
||||||
std::unique_ptr<std::thread> m_Thread;
|
std::unique_ptr<std::thread> m_Thread;
|
||||||
boost::asio::io_service m_Service;
|
boost::asio::io_context m_Service;
|
||||||
boost::asio::io_service::work m_Work;
|
boost::asio::executor_work_guard<boost::asio::io_context::executor_type> m_Work;
|
||||||
boost::asio::ip::tcp::acceptor m_Acceptor;
|
boost::asio::ip::tcp::acceptor m_Acceptor;
|
||||||
std::string m_Hostname;
|
std::string m_Hostname;
|
||||||
};
|
};
|
||||||
@@ -98,8 +100,8 @@ namespace http
|
|||||||
void ShowSAMSessions (std::stringstream& s);
|
void ShowSAMSessions (std::stringstream& s);
|
||||||
void ShowI2PTunnels (std::stringstream& s);
|
void ShowI2PTunnels (std::stringstream& s);
|
||||||
void ShowLocalDestination (std::stringstream& s, const std::string& b32, uint32_t token);
|
void ShowLocalDestination (std::stringstream& s, const std::string& b32, uint32_t token);
|
||||||
void ShowSAMSession (std::stringstream& s, const std::string& id);
|
void ShowSAMSession (std::stringstream& s, const std::string& id);
|
||||||
void ShowI2CPLocalDestination (std::stringstream& s, const std::string& id);
|
void ShowI2CPLocalDestination (std::stringstream& s, const std::string& id);
|
||||||
} // http
|
} // http
|
||||||
} // i2p
|
} // i2p
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
* Copyright (c) 2013-2023, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -34,38 +34,38 @@ namespace http
|
|||||||
// bundled style sheet
|
// bundled style sheet
|
||||||
const std::string internalCSS =
|
const std::string internalCSS =
|
||||||
"<style>\r\n"
|
"<style>\r\n"
|
||||||
":root { --main-bg-color: #FAFAFA; --main-text-color: #103456; --main-link-color: #894C84; }\r\n"
|
":root { --main-bg-color: #fafafa; --main-text-color: #103456; --main-link-color: #894c84; --main-link-hover-color: #fafafa; }\r\n"
|
||||||
"@media (prefers-color-scheme: dark) { :root { --main-bg-color: #181818; --main-text-color: #156A3D; --main-link-color: #894C84; } }\r\n"
|
"@media (prefers-color-scheme: dark) { :root { --main-bg-color: #242424; --main-text-color: #17ab5c; --main-link-color: #bf64b7; --main-link-hover-color: #000000; } }\r\n"
|
||||||
"body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: var(--main-bg-color); color: var(--main-text-color); }\r\n"
|
"body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: var(--main-bg-color); color: var(--main-text-color); }\r\n"
|
||||||
"a, .slide label { text-decoration: none; color: var(--main-link-color)}\r\n"
|
"a, .slide label { text-decoration: none; color: var(--main-link-color); }\r\n"
|
||||||
"a:hover, .slide label:hover, button[type=submit]:hover { color: #FAFAFA; background: var(--main-link-color)}\r\n"
|
"a:hover, a.button.selected, .slide label:hover, button[type=submit]:hover { color: var(--main-link-hover-color); background: var(--main-link-color); }\r\n"
|
||||||
"a.button { appearance: button; text-decoration: none; padding: 0 5px; border: 1px solid var(--main-link-color)}\r\n"
|
"a.button { appearance: button; text-decoration: none; padding: 0 5px; border: 1px solid var(--main-link-color); }\r\n"
|
||||||
".header { font-size: 2.5em; text-align: center; margin: 1em 0; color: var(--main-link-color)}\r\n"
|
".header { font-size: 2.5em; text-align: center; margin: 1em 0; color: var(--main-link-color); }\r\n"
|
||||||
".wrapper { margin: 0 auto; padding: 1em; max-width: 64em}\r\n"
|
".wrapper { margin: 0 auto; padding: 1em; max-width: 64em; }\r\n"
|
||||||
".menu { display: block; float: left; overflow: hidden; padding: 4px; max-width: 12em; white-space: nowrap; text-overflow: ellipsis}\r\n"
|
".menu { display: block; float: left; overflow: hidden; padding: 4px; max-width: 12em; white-space: nowrap; text-overflow: ellipsis ;}\r\n"
|
||||||
".listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap}\r\n"
|
".listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n"
|
||||||
".tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap}\r\n"
|
".tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n"
|
||||||
".content { float: left; font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto}\r\n"
|
".content { float: left; font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto; }\r\n"
|
||||||
".tunnel.established { color: #56B734}\r\n"
|
".tunnel.established { color: #56B734; }\r\n"
|
||||||
".tunnel.expiring { color: #D3AE3F}\r\n"
|
".tunnel.expiring { color: #D3AE3F; }\r\n"
|
||||||
".tunnel.failed { color: #D33F3F}\r\n"
|
".tunnel.failed { color: #D33F3F; }\r\n"
|
||||||
".tunnel.building { color: #434343}\r\n"
|
".tunnel.building { color: #434343; }\r\n"
|
||||||
"caption { font-size: 1.5em; text-align: center; color: var(--main-link-color)}\r\n"
|
"caption { font-size: 1.5em; text-align: center; color: var(--main-link-color); }\r\n"
|
||||||
"table { display: table; border-collapse: collapse; text-align: center}\r\n"
|
"table { display: table; border-collapse: collapse; text-align: center; }\r\n"
|
||||||
"table.extaddr { text-align: left}\r\n"
|
"table.extaddr { text-align: left; }\r\n"
|
||||||
"table.services { width: 100%}\r\n"
|
"table.services { width: 100%; }\r\n"
|
||||||
"textarea { background-color: var(--main-bg-color); color: var(--main-text-color); word-break: break-all}\r\n"
|
"textarea { background-color: var(--main-bg-color); color: var(--main-text-color); word-break: break-all; }\r\n"
|
||||||
".streamdest { width: 120px; max-width: 240px; overflow: hidden; text-overflow: ellipsis}\r\n"
|
".streamdest { width: 120px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }\r\n"
|
||||||
".slide div.slidecontent, .slide [type=\"checkbox\"] { display: none}\r\n"
|
".slide div.slidecontent, .slide [type=\"checkbox\"] { display: none; }\r\n"
|
||||||
".slide [type=\"checkbox\"]:checked ~ div.slidecontent { display: block; margin-top: 0; padding: 0}\r\n"
|
".slide [type=\"checkbox\"]:checked ~ div.slidecontent { display: block; margin-top: 0; padding: 0; }\r\n"
|
||||||
".disabled { color: #D33F3F}\r\n"
|
".disabled { color: #D33F3F; }\r\n"
|
||||||
".enabled { color: #56B734}\r\n"
|
".enabled { color: #56B734; }\r\n"
|
||||||
"button[type=submit] { background-color: transparent; color: var(--main-link-color); text-decoration: none;\r\n"
|
"button[type=submit] { background-color: transparent; color: var(--main-link-color); text-decoration: none;\r\n"
|
||||||
" padding: 5px; border: 1px solid var(--main-link-color); font-size: 14px}\r\n"
|
" padding: 5px; border: 1px solid var(--main-link-color); font-size: 14px; }\r\n"
|
||||||
"input, select, select option { background-color: var(--main-bg-color); color: var(--main-link-color); padding: 5px;\r\n"
|
"input, select, select option { background-color: var(--main-bg-color); color: var(--main-link-color); padding: 5px;\r\n"
|
||||||
" border: 1px solid var(--main-link-color); font-size: 14px}\r\n"
|
" border: 1px solid var(--main-link-color); font-size: 14px; }\r\n"
|
||||||
"input:focus, select:focus, select option:focus { outline: none}\r\n"
|
"input:focus, select:focus, select option:focus { outline: none; }\r\n"
|
||||||
"input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none}\r\n"
|
"input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }\r\n"
|
||||||
"@media screen and (max-width: 1150px) { /* adaptive style */\r\n"
|
"@media screen and (max-width: 1150px) { /* adaptive style */\r\n"
|
||||||
" .wrapper { max-width: 58em; }\r\n"
|
" .wrapper { max-width: 58em; }\r\n"
|
||||||
" .content { max-width: 40em; }\r\n"
|
" .content { max-width: 40em; }\r\n"
|
||||||
@@ -76,7 +76,7 @@ namespace http
|
|||||||
" .content { float: none; margin-left: unset; margin-top: 16px; max-width: 100%; width: 100%; text-align: center; }\r\n"
|
" .content { float: none; margin-left: unset; margin-top: 16px; max-width: 100%; width: 100%; text-align: center; }\r\n"
|
||||||
" a, .slide label { display: block; }\r\n"
|
" a, .slide label { display: block; }\r\n"
|
||||||
" .header { margin: unset; font-size: 1.5em; }\r\n"
|
" .header { margin: unset; font-size: 1.5em; }\r\n"
|
||||||
" small { display: block }\r\n"
|
" small { display: block; }\r\n"
|
||||||
" a.button { appearance: button; text-decoration: none; margin-top: 10px; padding: 6px; border: 2px solid var(--main-link-color);\r\n"
|
" a.button { appearance: button; text-decoration: none; margin-top: 10px; padding: 6px; border: 2px solid var(--main-link-color);\r\n"
|
||||||
" border-radius: 5px; width: -webkit-fill-available; }\r\n"
|
" border-radius: 5px; width: -webkit-fill-available; }\r\n"
|
||||||
" input, select { width: 35%; text-align: center; padding: 5px; border: 2px solid var(--main-link-color); border-radius: 5px; font-size: 18px; }\r\n"
|
" input, select { width: 35%; text-align: center; padding: 5px; border: 2px solid var(--main-link-color); border-radius: 5px; font-size: 18px; }\r\n"
|
||||||
|
|||||||
@@ -1,30 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013-2025, The PurpleI2P Project
|
||||||
|
*
|
||||||
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
*
|
||||||
|
* See full license text in LICENSE file at top of project tree
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <iomanip>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
|
|
||||||
// Use global placeholders from boost introduced when local_time.hpp is loaded
|
// Use global placeholders from boost introduced when local_time.hpp is loaded
|
||||||
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <boost/date_time/local_time/local_time.hpp>
|
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
|
||||||
#include <boost/property_tree/ini_parser.hpp>
|
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
|
||||||
#include "Crypto.h"
|
|
||||||
#include "FS.h"
|
#include "FS.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "NetDb.hpp"
|
#include "NetDb.hpp"
|
||||||
#include "RouterContext.h"
|
|
||||||
#include "Daemon.h"
|
|
||||||
#include "Tunnel.h"
|
#include "Tunnel.h"
|
||||||
#include "Timestamp.h"
|
#include "Daemon.h"
|
||||||
#include "Transports.h"
|
|
||||||
#include "version.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "ClientContext.h"
|
|
||||||
#include "I2PControl.h"
|
#include "I2PControl.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
@@ -32,11 +29,24 @@ namespace i2p
|
|||||||
namespace client
|
namespace client
|
||||||
{
|
{
|
||||||
I2PControlService::I2PControlService (const std::string& address, int port):
|
I2PControlService::I2PControlService (const std::string& address, int port):
|
||||||
m_IsRunning (false), m_Thread (nullptr),
|
m_IsRunning (false),
|
||||||
m_Acceptor (m_Service, boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address), port)),
|
|
||||||
m_SSLContext (boost::asio::ssl::context::sslv23),
|
m_SSLContext (boost::asio::ssl::context::sslv23),
|
||||||
m_ShutdownTimer (m_Service)
|
m_ShutdownTimer (m_Service)
|
||||||
{
|
{
|
||||||
|
if (port)
|
||||||
|
m_Acceptor = std::make_unique<boost::asio::ip::tcp::acceptor>(m_Service,
|
||||||
|
boost::asio::ip::tcp::endpoint(boost::asio::ip::make_address(address), port));
|
||||||
|
else
|
||||||
|
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
|
||||||
|
{
|
||||||
|
std::remove (address.c_str ()); // just in case
|
||||||
|
m_LocalAcceptor = std::make_unique<boost::asio::local::stream_protocol::acceptor>(m_Service,
|
||||||
|
boost::asio::local::stream_protocol::endpoint(address));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
LogPrint(eLogError, "I2PControl: Local sockets are not supported");
|
||||||
|
#endif
|
||||||
|
|
||||||
i2p::config::GetOption("i2pcontrol.password", m_Password);
|
i2p::config::GetOption("i2pcontrol.password", m_Password);
|
||||||
|
|
||||||
// certificate / keys
|
// certificate / keys
|
||||||
@@ -47,59 +57,46 @@ namespace client
|
|||||||
i2pcp_crt = i2p::fs::DataDirPath(i2pcp_crt);
|
i2pcp_crt = i2p::fs::DataDirPath(i2pcp_crt);
|
||||||
if (i2pcp_key.at(0) != '/')
|
if (i2pcp_key.at(0) != '/')
|
||||||
i2pcp_key = i2p::fs::DataDirPath(i2pcp_key);
|
i2pcp_key = i2p::fs::DataDirPath(i2pcp_key);
|
||||||
if (!i2p::fs::Exists (i2pcp_crt) || !i2p::fs::Exists (i2pcp_key)) {
|
if (!i2p::fs::Exists (i2pcp_crt) || !i2p::fs::Exists (i2pcp_key))
|
||||||
|
{
|
||||||
LogPrint (eLogInfo, "I2PControl: Creating new certificate for control connection");
|
LogPrint (eLogInfo, "I2PControl: Creating new certificate for control connection");
|
||||||
CreateCertificate (i2pcp_crt.c_str(), i2pcp_key.c_str());
|
CreateCertificate (i2pcp_crt.c_str(), i2pcp_key.c_str());
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
LogPrint(eLogDebug, "I2PControl: Using cert from ", i2pcp_crt);
|
LogPrint(eLogDebug, "I2PControl: Using cert from ", i2pcp_crt);
|
||||||
}
|
|
||||||
m_SSLContext.set_options (boost::asio::ssl::context::default_workarounds | boost::asio::ssl::context::no_sslv2 | boost::asio::ssl::context::single_dh_use);
|
m_SSLContext.set_options (boost::asio::ssl::context::default_workarounds | boost::asio::ssl::context::no_sslv2 | boost::asio::ssl::context::single_dh_use);
|
||||||
m_SSLContext.use_certificate_file (i2pcp_crt, boost::asio::ssl::context::pem);
|
boost::system::error_code ec;
|
||||||
m_SSLContext.use_private_key_file (i2pcp_key, boost::asio::ssl::context::pem);
|
m_SSLContext.use_certificate_file (i2pcp_crt, boost::asio::ssl::context::pem, ec);
|
||||||
|
if (!ec)
|
||||||
|
m_SSLContext.use_private_key_file (i2pcp_key, boost::asio::ssl::context::pem, ec);
|
||||||
|
if (ec)
|
||||||
|
{
|
||||||
|
LogPrint (eLogInfo, "I2PControl: Failed to load ceritifcate: ", ec.message (), ". Recreating");
|
||||||
|
CreateCertificate (i2pcp_crt.c_str(), i2pcp_key.c_str());
|
||||||
|
m_SSLContext.use_certificate_file (i2pcp_crt, boost::asio::ssl::context::pem, ec);
|
||||||
|
if (!ec)
|
||||||
|
m_SSLContext.use_private_key_file (i2pcp_key, boost::asio::ssl::context::pem, ec);
|
||||||
|
if (ec)
|
||||||
|
// give up
|
||||||
|
LogPrint (eLogError, "I2PControl: Can't load certificates");
|
||||||
|
}
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
m_MethodHandlers["Authenticate"] = &I2PControlService::AuthenticateHandler;
|
m_MethodHandlers["Authenticate"] = &I2PControlService::AuthenticateHandler;
|
||||||
m_MethodHandlers["Echo"] = &I2PControlService::EchoHandler;
|
m_MethodHandlers["Echo"] = &I2PControlService::EchoHandler;
|
||||||
m_MethodHandlers["I2PControl"] = &I2PControlService::I2PControlHandler;
|
m_MethodHandlers["I2PControl"] = &I2PControlService::I2PControlHandler;
|
||||||
m_MethodHandlers["RouterInfo"] = &I2PControlService::RouterInfoHandler;
|
m_MethodHandlers["RouterInfo"] = &I2PControlHandlers::RouterInfoHandler;
|
||||||
m_MethodHandlers["RouterManager"] = &I2PControlService::RouterManagerHandler;
|
m_MethodHandlers["RouterManager"] = &I2PControlService::RouterManagerHandler;
|
||||||
m_MethodHandlers["NetworkSetting"] = &I2PControlService::NetworkSettingHandler;
|
m_MethodHandlers["NetworkSetting"] = &I2PControlHandlers::NetworkSettingHandler;
|
||||||
m_MethodHandlers["ClientServicesInfo"] = &I2PControlService::ClientServicesInfoHandler;
|
m_MethodHandlers["ClientServicesInfo"] = &I2PControlHandlers::ClientServicesInfoHandler;
|
||||||
|
|
||||||
// I2PControl
|
// I2PControl
|
||||||
m_I2PControlHandlers["i2pcontrol.password"] = &I2PControlService::PasswordHandler;
|
m_I2PControlHandlers["i2pcontrol.password"] = &I2PControlService::PasswordHandler;
|
||||||
|
|
||||||
// RouterInfo
|
|
||||||
m_RouterInfoHandlers["i2p.router.uptime"] = &I2PControlService::UptimeHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.version"] = &I2PControlService::VersionHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.status"] = &I2PControlService::StatusHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.netdb.knownpeers"] = &I2PControlService::NetDbKnownPeersHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.netdb.activepeers"] = &I2PControlService::NetDbActivePeersHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.bw.inbound.1s"] = &I2PControlService::InboundBandwidth1S;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.bw.outbound.1s"] = &I2PControlService::OutboundBandwidth1S;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.status"] = &I2PControlService::NetStatusHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.tunnels.participating"] = &I2PControlService::TunnelsParticipatingHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.tunnels.successrate"] =
|
|
||||||
&I2PControlService::TunnelsSuccessRateHandler;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.total.received.bytes"] = &I2PControlService::NetTotalReceivedBytes;
|
|
||||||
m_RouterInfoHandlers["i2p.router.net.total.sent.bytes"] = &I2PControlService::NetTotalSentBytes;
|
|
||||||
|
|
||||||
// RouterManager
|
// RouterManager
|
||||||
m_RouterManagerHandlers["Reseed"] = &I2PControlService::ReseedHandler;
|
m_RouterManagerHandlers["Reseed"] = &I2PControlService::ReseedHandler;
|
||||||
m_RouterManagerHandlers["Shutdown"] = &I2PControlService::ShutdownHandler;
|
m_RouterManagerHandlers["Shutdown"] = &I2PControlService::ShutdownHandler;
|
||||||
m_RouterManagerHandlers["ShutdownGraceful"] = &I2PControlService::ShutdownGracefulHandler;
|
m_RouterManagerHandlers["ShutdownGraceful"] = &I2PControlService::ShutdownGracefulHandler;
|
||||||
|
|
||||||
// NetworkSetting
|
|
||||||
m_NetworkSettingHandlers["i2p.router.net.bw.in"] = &I2PControlService::InboundBandwidthLimit;
|
|
||||||
m_NetworkSettingHandlers["i2p.router.net.bw.out"] = &I2PControlService::OutboundBandwidthLimit;
|
|
||||||
|
|
||||||
// ClientServicesInfo
|
|
||||||
m_ClientServicesInfoHandlers["I2PTunnel"] = &I2PControlService::I2PTunnelInfoHandler;
|
|
||||||
m_ClientServicesInfoHandlers["HTTPProxy"] = &I2PControlService::HTTPProxyInfoHandler;
|
|
||||||
m_ClientServicesInfoHandlers["SOCKS"] = &I2PControlService::SOCKSInfoHandler;
|
|
||||||
m_ClientServicesInfoHandlers["SAM"] = &I2PControlService::SAMInfoHandler;
|
|
||||||
m_ClientServicesInfoHandlers["BOB"] = &I2PControlService::BOBInfoHandler;
|
|
||||||
m_ClientServicesInfoHandlers["I2CP"] = &I2PControlService::I2CPInfoHandler;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
I2PControlService::~I2PControlService ()
|
I2PControlService::~I2PControlService ()
|
||||||
@@ -113,7 +110,7 @@ namespace client
|
|||||||
{
|
{
|
||||||
Accept ();
|
Accept ();
|
||||||
m_IsRunning = true;
|
m_IsRunning = true;
|
||||||
m_Thread = new std::thread (std::bind (&I2PControlService::Run, this));
|
m_Thread = std::make_unique<std::thread>(std::bind (&I2PControlService::Run, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,12 +119,19 @@ namespace client
|
|||||||
if (m_IsRunning)
|
if (m_IsRunning)
|
||||||
{
|
{
|
||||||
m_IsRunning = false;
|
m_IsRunning = false;
|
||||||
m_Acceptor.cancel ();
|
if (m_Acceptor) m_Acceptor->cancel ();
|
||||||
|
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
|
||||||
|
if (m_LocalAcceptor)
|
||||||
|
{
|
||||||
|
auto path = m_LocalAcceptor->local_endpoint().path();
|
||||||
|
m_LocalAcceptor->cancel ();
|
||||||
|
std::remove (path.c_str ());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
m_Service.stop ();
|
m_Service.stop ();
|
||||||
if (m_Thread)
|
if (m_Thread)
|
||||||
{
|
{
|
||||||
m_Thread->join ();
|
m_Thread->join ();
|
||||||
delete m_Thread;
|
|
||||||
m_Thread = nullptr;
|
m_Thread = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,40 +153,60 @@ namespace client
|
|||||||
|
|
||||||
void I2PControlService::Accept ()
|
void I2PControlService::Accept ()
|
||||||
{
|
{
|
||||||
auto newSocket = std::make_shared<ssl_socket> (m_Service, m_SSLContext);
|
if (m_Acceptor)
|
||||||
m_Acceptor.async_accept (newSocket->lowest_layer(), std::bind (&I2PControlService::HandleAccept, this,
|
{
|
||||||
std::placeholders::_1, newSocket));
|
auto newSocket = std::make_shared<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > (m_Service, m_SSLContext);
|
||||||
|
m_Acceptor->async_accept (newSocket->lowest_layer(),
|
||||||
|
[this, newSocket](const boost::system::error_code& ecode)
|
||||||
|
{
|
||||||
|
HandleAccepted (ecode, newSocket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
|
||||||
|
else if (m_LocalAcceptor)
|
||||||
|
{
|
||||||
|
auto newSocket = std::make_shared<boost::asio::ssl::stream<boost::asio::local::stream_protocol::socket> > (m_Service, m_SSLContext);
|
||||||
|
m_LocalAcceptor->async_accept (newSocket->lowest_layer(),
|
||||||
|
[this, newSocket](const boost::system::error_code& ecode)
|
||||||
|
{
|
||||||
|
HandleAccepted (ecode, newSocket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void I2PControlService::HandleAccept(const boost::system::error_code& ecode, std::shared_ptr<ssl_socket> socket)
|
template<typename ssl_socket>
|
||||||
|
void I2PControlService::HandleAccepted (const boost::system::error_code& ecode,
|
||||||
|
std::shared_ptr<ssl_socket> newSocket)
|
||||||
{
|
{
|
||||||
if (ecode != boost::asio::error::operation_aborted)
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
Accept ();
|
Accept ();
|
||||||
|
|
||||||
if (ecode) {
|
if (ecode)
|
||||||
LogPrint (eLogError, "I2PControl: Accept error: ", ecode.message ());
|
{
|
||||||
|
LogPrint (eLogError, "I2PControl: Accept error: ", ecode.message ());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LogPrint (eLogDebug, "I2PControl: New request from ", socket->lowest_layer ().remote_endpoint ());
|
LogPrint (eLogDebug, "I2PControl: New request from ", newSocket->lowest_layer ().remote_endpoint ());
|
||||||
Handshake (socket);
|
Handshake (newSocket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename ssl_socket>
|
||||||
void I2PControlService::Handshake (std::shared_ptr<ssl_socket> socket)
|
void I2PControlService::Handshake (std::shared_ptr<ssl_socket> socket)
|
||||||
{
|
{
|
||||||
socket->async_handshake(boost::asio::ssl::stream_base::server,
|
socket->async_handshake(boost::asio::ssl::stream_base::server,
|
||||||
std::bind( &I2PControlService::HandleHandshake, this, std::placeholders::_1, socket));
|
[this, socket](const boost::system::error_code& ecode)
|
||||||
}
|
{
|
||||||
|
if (ecode)
|
||||||
void I2PControlService::HandleHandshake (const boost::system::error_code& ecode, std::shared_ptr<ssl_socket> socket)
|
{
|
||||||
{
|
LogPrint (eLogError, "I2PControl: Handshake error: ", ecode.message ());
|
||||||
if (ecode) {
|
return;
|
||||||
LogPrint (eLogError, "I2PControl: Handshake error: ", ecode.message ());
|
}
|
||||||
return;
|
ReadRequest (socket);
|
||||||
}
|
});
|
||||||
//std::this_thread::sleep_for (std::chrono::milliseconds(5));
|
|
||||||
ReadRequest (socket);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename ssl_socket>
|
||||||
void I2PControlService::ReadRequest (std::shared_ptr<ssl_socket> socket)
|
void I2PControlService::ReadRequest (std::shared_ptr<ssl_socket> socket)
|
||||||
{
|
{
|
||||||
auto request = std::make_shared<I2PControlBuffer>();
|
auto request = std::make_shared<I2PControlBuffer>();
|
||||||
@@ -192,10 +216,13 @@ namespace client
|
|||||||
#else
|
#else
|
||||||
boost::asio::buffer (request->data (), request->size ()),
|
boost::asio::buffer (request->data (), request->size ()),
|
||||||
#endif
|
#endif
|
||||||
std::bind(&I2PControlService::HandleRequestReceived, this,
|
[this, socket, request](const boost::system::error_code& ecode, size_t bytes_transferred)
|
||||||
std::placeholders::_1, std::placeholders::_2, socket, request));
|
{
|
||||||
|
HandleRequestReceived (ecode, bytes_transferred, socket, request);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename ssl_socket>
|
||||||
void I2PControlService::HandleRequestReceived (const boost::system::error_code& ecode,
|
void I2PControlService::HandleRequestReceived (const boost::system::error_code& ecode,
|
||||||
size_t bytes_transferred, std::shared_ptr<ssl_socket> socket,
|
size_t bytes_transferred, std::shared_ptr<ssl_socket> socket,
|
||||||
std::shared_ptr<I2PControlBuffer> buf)
|
std::shared_ptr<I2PControlBuffer> buf)
|
||||||
@@ -273,32 +300,7 @@ namespace client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void I2PControlService::InsertParam (std::ostringstream& ss, const std::string& name, int value) const
|
template<typename ssl_socket>
|
||||||
{
|
|
||||||
ss << "\"" << name << "\":" << value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::InsertParam (std::ostringstream& ss, const std::string& name, const std::string& value) const
|
|
||||||
{
|
|
||||||
ss << "\"" << name << "\":";
|
|
||||||
if (value.length () > 0)
|
|
||||||
ss << "\"" << value << "\"";
|
|
||||||
else
|
|
||||||
ss << "null";
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::InsertParam (std::ostringstream& ss, const std::string& name, double value) const
|
|
||||||
{
|
|
||||||
ss << "\"" << name << "\":" << std::fixed << std::setprecision(2) << value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::InsertParam (std::ostringstream& ss, const std::string& name, const boost::property_tree::ptree& value) const
|
|
||||||
{
|
|
||||||
std::ostringstream buf;
|
|
||||||
boost::property_tree::write_json (buf, value, false);
|
|
||||||
ss << "\"" << name << "\":" << buf.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::SendResponse (std::shared_ptr<ssl_socket> socket,
|
void I2PControlService::SendResponse (std::shared_ptr<ssl_socket> socket,
|
||||||
std::shared_ptr<I2PControlBuffer> buf, std::ostringstream& response, bool isHtml)
|
std::shared_ptr<I2PControlBuffer> buf, std::ostringstream& response, bool isHtml)
|
||||||
{
|
{
|
||||||
@@ -308,12 +310,12 @@ namespace client
|
|||||||
std::ostringstream header;
|
std::ostringstream header;
|
||||||
header << "HTTP/1.1 200 OK\r\n";
|
header << "HTTP/1.1 200 OK\r\n";
|
||||||
header << "Connection: close\r\n";
|
header << "Connection: close\r\n";
|
||||||
header << "Content-Length: " << boost::lexical_cast<std::string>(len) << "\r\n";
|
header << "Content-Length: " << std::to_string(len) << "\r\n";
|
||||||
header << "Content-Type: application/json\r\n";
|
header << "Content-Type: application/json\r\n";
|
||||||
header << "Date: ";
|
header << "Date: ";
|
||||||
auto facet = new boost::local_time::local_time_facet ("%a, %d %b %Y %H:%M:%S GMT");
|
std::time_t t = std::time (nullptr);
|
||||||
header.imbue(std::locale (header.getloc(), facet));
|
std::tm tm = *std::gmtime (&t);
|
||||||
header << boost::posix_time::second_clock::local_time() << "\r\n";
|
header << std::put_time(&tm, "%a, %d %b %Y %T GMT") << "\r\n";
|
||||||
header << "\r\n";
|
header << "\r\n";
|
||||||
offset = header.str ().size ();
|
offset = header.str ().size ();
|
||||||
memcpy (buf->data (), header.str ().c_str (), offset);
|
memcpy (buf->data (), header.str ().c_str (), offset);
|
||||||
@@ -321,16 +323,11 @@ namespace client
|
|||||||
memcpy (buf->data () + offset, response.str ().c_str (), len);
|
memcpy (buf->data () + offset, response.str ().c_str (), len);
|
||||||
boost::asio::async_write (*socket, boost::asio::buffer (buf->data (), offset + len),
|
boost::asio::async_write (*socket, boost::asio::buffer (buf->data (), offset + len),
|
||||||
boost::asio::transfer_all (),
|
boost::asio::transfer_all (),
|
||||||
std::bind(&I2PControlService::HandleResponseSent, this,
|
[socket, buf](const boost::system::error_code& ecode, std::size_t bytes_transferred)
|
||||||
std::placeholders::_1, std::placeholders::_2, socket, buf));
|
{
|
||||||
}
|
if (ecode)
|
||||||
|
LogPrint (eLogError, "I2PControl: Write error: ", ecode.message ());
|
||||||
void I2PControlService::HandleResponseSent (const boost::system::error_code& ecode, std::size_t bytes_transferred,
|
});
|
||||||
std::shared_ptr<ssl_socket> socket, std::shared_ptr<I2PControlBuffer> buf)
|
|
||||||
{
|
|
||||||
if (ecode) {
|
|
||||||
LogPrint (eLogError, "I2PControl: Write error: ", ecode.message ());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
@@ -384,91 +381,6 @@ namespace client
|
|||||||
m_Tokens.clear ();
|
m_Tokens.clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// RouterInfo
|
|
||||||
|
|
||||||
void I2PControlService::RouterInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results)
|
|
||||||
{
|
|
||||||
bool first = true;
|
|
||||||
for (auto it = params.begin (); it != params.end (); it++)
|
|
||||||
{
|
|
||||||
LogPrint (eLogDebug, "I2PControl: RouterInfo request: ", it->first);
|
|
||||||
auto it1 = m_RouterInfoHandlers.find (it->first);
|
|
||||||
if (it1 != m_RouterInfoHandlers.end ())
|
|
||||||
{
|
|
||||||
if (!first) results << ",";
|
|
||||||
else first = false;
|
|
||||||
(this->*(it1->second))(results);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
LogPrint (eLogError, "I2PControl: RouterInfo unknown request ", it->first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::UptimeHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.uptime", std::to_string (i2p::context.GetUptime ()*1000LL));
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::VersionHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.version", VERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::StatusHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
auto dest = i2p::client::context.GetSharedLocalDestination ();
|
|
||||||
InsertParam (results, "i2p.router.status", (dest && dest->IsReady ()) ? "1" : "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::NetDbKnownPeersHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.netdb.knownpeers", i2p::data::netdb.GetNumRouters ());
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::NetDbActivePeersHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.netdb.activepeers", (int)i2p::transport::transports.GetPeers ().size ());
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::NetStatusHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.net.status", (int)i2p::context.GetStatus ());
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::TunnelsParticipatingHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
int transit = i2p::tunnel::tunnels.GetTransitTunnels ().size ();
|
|
||||||
InsertParam (results, "i2p.router.net.tunnels.participating", transit);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::TunnelsSuccessRateHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
int rate = i2p::tunnel::tunnels.GetTunnelCreationSuccessRate ();
|
|
||||||
InsertParam (results, "i2p.router.net.tunnels.successrate", rate);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::InboundBandwidth1S (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
double bw = i2p::transport::transports.GetInBandwidth ();
|
|
||||||
InsertParam (results, "i2p.router.net.bw.inbound.1s", bw);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::OutboundBandwidth1S (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
double bw = i2p::transport::transports.GetOutBandwidth ();
|
|
||||||
InsertParam (results, "i2p.router.net.bw.outbound.1s", bw);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::NetTotalReceivedBytes (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.net.total.received.bytes", (double)i2p::transport::transports.GetTotalReceivedBytes ());
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::NetTotalSentBytes (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
InsertParam (results, "i2p.router.net.total.sent.bytes", (double)i2p::transport::transports.GetTotalSentBytes ());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// RouterManager
|
// RouterManager
|
||||||
|
|
||||||
@@ -476,10 +388,11 @@ namespace client
|
|||||||
{
|
{
|
||||||
for (auto it = params.begin (); it != params.end (); it++)
|
for (auto it = params.begin (); it != params.end (); it++)
|
||||||
{
|
{
|
||||||
if (it != params.begin ()) results << ",";
|
|
||||||
LogPrint (eLogDebug, "I2PControl: RouterManager request: ", it->first);
|
LogPrint (eLogDebug, "I2PControl: RouterManager request: ", it->first);
|
||||||
auto it1 = m_RouterManagerHandlers.find (it->first);
|
auto it1 = m_RouterManagerHandlers.find (it->first);
|
||||||
if (it1 != m_RouterManagerHandlers.end ()) {
|
if (it1 != m_RouterManagerHandlers.end ())
|
||||||
|
{
|
||||||
|
if (it != params.begin ()) results << ",";
|
||||||
(this->*(it1->second))(results);
|
(this->*(it1->second))(results);
|
||||||
} else
|
} else
|
||||||
LogPrint (eLogError, "I2PControl: RouterManager unknown request: ", it->first);
|
LogPrint (eLogError, "I2PControl: RouterManager unknown request: ", it->first);
|
||||||
@@ -494,7 +407,7 @@ namespace client
|
|||||||
m_ShutdownTimer.expires_from_now (boost::posix_time::seconds(1)); // 1 second to make sure response has been sent
|
m_ShutdownTimer.expires_from_now (boost::posix_time::seconds(1)); // 1 second to make sure response has been sent
|
||||||
m_ShutdownTimer.async_wait (
|
m_ShutdownTimer.async_wait (
|
||||||
[](const boost::system::error_code& ecode)
|
[](const boost::system::error_code& ecode)
|
||||||
{
|
{
|
||||||
Daemon.running = 0;
|
Daemon.running = 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -508,7 +421,7 @@ namespace client
|
|||||||
m_ShutdownTimer.expires_from_now (boost::posix_time::seconds(timeout + 1)); // + 1 second
|
m_ShutdownTimer.expires_from_now (boost::posix_time::seconds(timeout + 1)); // + 1 second
|
||||||
m_ShutdownTimer.async_wait (
|
m_ShutdownTimer.async_wait (
|
||||||
[](const boost::system::error_code& ecode)
|
[](const boost::system::error_code& ecode)
|
||||||
{
|
{
|
||||||
Daemon.running = 0;
|
Daemon.running = 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -520,37 +433,6 @@ namespace client
|
|||||||
i2p::data::netdb.Reseed ();
|
i2p::data::netdb.Reseed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// network setting
|
|
||||||
void I2PControlService::NetworkSettingHandler (const boost::property_tree::ptree& params, std::ostringstream& results)
|
|
||||||
{
|
|
||||||
for (auto it = params.begin (); it != params.end (); it++)
|
|
||||||
{
|
|
||||||
LogPrint (eLogDebug, "I2PControl: NetworkSetting request: ", it->first);
|
|
||||||
auto it1 = m_NetworkSettingHandlers.find (it->first);
|
|
||||||
if (it1 != m_NetworkSettingHandlers.end ()) {
|
|
||||||
if (it != params.begin ()) results << ",";
|
|
||||||
(this->*(it1->second))(it->second.data (), results);
|
|
||||||
} else
|
|
||||||
LogPrint (eLogError, "I2PControl: NetworkSetting unknown request: ", it->first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::InboundBandwidthLimit (const std::string& value, std::ostringstream& results)
|
|
||||||
{
|
|
||||||
if (value != "null")
|
|
||||||
i2p::context.SetBandwidth (std::atoi(value.c_str()));
|
|
||||||
int bw = i2p::context.GetBandwidthLimit();
|
|
||||||
InsertParam (results, "i2p.router.net.bw.in", bw);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::OutboundBandwidthLimit (const std::string& value, std::ostringstream& results)
|
|
||||||
{
|
|
||||||
if (value != "null")
|
|
||||||
i2p::context.SetBandwidth (std::atoi(value.c_str()));
|
|
||||||
int bw = i2p::context.GetBandwidthLimit();
|
|
||||||
InsertParam (results, "i2p.router.net.bw.out", bw);
|
|
||||||
}
|
|
||||||
|
|
||||||
// certificate
|
// certificate
|
||||||
void I2PControlService::CreateCertificate (const char *crt_path, const char *key_path)
|
void I2PControlService::CreateCertificate (const char *crt_path, const char *key_path)
|
||||||
{
|
{
|
||||||
@@ -573,7 +455,7 @@ namespace client
|
|||||||
X509_NAME_add_entry_by_txt (name, "O", MBSTRING_ASC, (unsigned char *)I2P_CONTROL_CERTIFICATE_ORGANIZATION, -1, -1, 0); // organization
|
X509_NAME_add_entry_by_txt (name, "O", MBSTRING_ASC, (unsigned char *)I2P_CONTROL_CERTIFICATE_ORGANIZATION, -1, -1, 0); // organization
|
||||||
X509_NAME_add_entry_by_txt (name, "CN", MBSTRING_ASC, (unsigned char *)I2P_CONTROL_CERTIFICATE_COMMON_NAME, -1, -1, 0); // common name
|
X509_NAME_add_entry_by_txt (name, "CN", MBSTRING_ASC, (unsigned char *)I2P_CONTROL_CERTIFICATE_COMMON_NAME, -1, -1, 0); // common name
|
||||||
X509_set_issuer_name (x509, name); // set issuer to ourselves
|
X509_set_issuer_name (x509, name); // set issuer to ourselves
|
||||||
X509_sign (x509, pkey, EVP_sha1 ()); // sign
|
X509_sign (x509, pkey, EVP_sha1 ()); // sign, last param must be NULL for EdDSA
|
||||||
|
|
||||||
// save cert
|
// save cert
|
||||||
if ((f = fopen (crt_path, "wb")) != NULL) {
|
if ((f = fopen (crt_path, "wb")) != NULL) {
|
||||||
@@ -599,178 +481,5 @@ namespace client
|
|||||||
}
|
}
|
||||||
EVP_PKEY_free (pkey);
|
EVP_PKEY_free (pkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientServicesInfo
|
|
||||||
|
|
||||||
void I2PControlService::ClientServicesInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results)
|
|
||||||
{
|
|
||||||
for (auto it = params.begin (); it != params.end (); it++)
|
|
||||||
{
|
|
||||||
LogPrint (eLogDebug, "I2PControl: ClientServicesInfo request: ", it->first);
|
|
||||||
auto it1 = m_ClientServicesInfoHandlers.find (it->first);
|
|
||||||
if (it1 != m_ClientServicesInfoHandlers.end ())
|
|
||||||
{
|
|
||||||
if (it != params.begin ()) results << ",";
|
|
||||||
(this->*(it1->second))(results);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
LogPrint (eLogError, "I2PControl: ClientServicesInfo unknown request ", it->first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::I2PTunnelInfoHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree pt;
|
|
||||||
boost::property_tree::ptree client_tunnels, server_tunnels;
|
|
||||||
|
|
||||||
for (auto& it: i2p::client::context.GetClientTunnels ())
|
|
||||||
{
|
|
||||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
|
||||||
boost::property_tree::ptree ct;
|
|
||||||
ct.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
client_tunnels.add_child(it.second->GetName (), ct);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& serverTunnels = i2p::client::context.GetServerTunnels ();
|
|
||||||
if (!serverTunnels.empty ()) {
|
|
||||||
for (auto& it: serverTunnels)
|
|
||||||
{
|
|
||||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
|
||||||
boost::property_tree::ptree st;
|
|
||||||
st.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
st.put("port", it.second->GetLocalPort ());
|
|
||||||
server_tunnels.add_child(it.second->GetName (), st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& clientForwards = i2p::client::context.GetClientForwards ();
|
|
||||||
if (!clientForwards.empty ())
|
|
||||||
{
|
|
||||||
for (auto& it: clientForwards)
|
|
||||||
{
|
|
||||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
|
||||||
boost::property_tree::ptree ct;
|
|
||||||
ct.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
client_tunnels.add_child(it.second->GetName (), ct);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& serverForwards = i2p::client::context.GetServerForwards ();
|
|
||||||
if (!serverForwards.empty ())
|
|
||||||
{
|
|
||||||
for (auto& it: serverForwards)
|
|
||||||
{
|
|
||||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
|
||||||
boost::property_tree::ptree st;
|
|
||||||
st.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
server_tunnels.add_child(it.second->GetName (), st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pt.add_child("client", client_tunnels);
|
|
||||||
pt.add_child("server", server_tunnels);
|
|
||||||
|
|
||||||
InsertParam (results, "I2PTunnel", pt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::HTTPProxyInfoHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree pt;
|
|
||||||
|
|
||||||
auto httpProxy = i2p::client::context.GetHttpProxy ();
|
|
||||||
if (httpProxy)
|
|
||||||
{
|
|
||||||
auto& ident = httpProxy->GetLocalDestination ()->GetIdentHash();
|
|
||||||
pt.put("enabled", true);
|
|
||||||
pt.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pt.put("enabled", false);
|
|
||||||
|
|
||||||
InsertParam (results, "HTTPProxy", pt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::SOCKSInfoHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree pt;
|
|
||||||
|
|
||||||
auto socksProxy = i2p::client::context.GetSocksProxy ();
|
|
||||||
if (socksProxy)
|
|
||||||
{
|
|
||||||
auto& ident = socksProxy->GetLocalDestination ()->GetIdentHash();
|
|
||||||
pt.put("enabled", true);
|
|
||||||
pt.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pt.put("enabled", false);
|
|
||||||
|
|
||||||
InsertParam (results, "SOCKS", pt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::SAMInfoHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree pt;
|
|
||||||
auto sam = i2p::client::context.GetSAMBridge ();
|
|
||||||
if (sam)
|
|
||||||
{
|
|
||||||
pt.put("enabled", true);
|
|
||||||
boost::property_tree::ptree sam_sessions;
|
|
||||||
for (auto& it: sam->GetSessions ())
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree sam_session, sam_session_sockets;
|
|
||||||
auto& name = it.second->GetLocalDestination ()->GetNickname ();
|
|
||||||
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
|
||||||
sam_session.put("name", name);
|
|
||||||
sam_session.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
|
||||||
|
|
||||||
for (const auto& socket: sam->ListSockets(it.first))
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree stream;
|
|
||||||
stream.put("type", socket->GetSocketType ());
|
|
||||||
stream.put("peer", socket->GetSocket ().remote_endpoint());
|
|
||||||
|
|
||||||
sam_session_sockets.push_back(std::make_pair("", stream));
|
|
||||||
}
|
|
||||||
sam_session.add_child("sockets", sam_session_sockets);
|
|
||||||
sam_sessions.add_child(it.first, sam_session);
|
|
||||||
}
|
|
||||||
|
|
||||||
pt.add_child("sessions", sam_sessions);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pt.put("enabled", false);
|
|
||||||
|
|
||||||
InsertParam (results, "SAM", pt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::BOBInfoHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree pt;
|
|
||||||
auto bob = i2p::client::context.GetBOBCommandChannel ();
|
|
||||||
if (bob)
|
|
||||||
{
|
|
||||||
/* TODO more info */
|
|
||||||
pt.put("enabled", true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pt.put("enabled", false);
|
|
||||||
|
|
||||||
InsertParam (results, "BOB", pt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void I2PControlService::I2CPInfoHandler (std::ostringstream& results)
|
|
||||||
{
|
|
||||||
boost::property_tree::ptree pt;
|
|
||||||
auto i2cp = i2p::client::context.GetI2CPServer ();
|
|
||||||
if (i2cp)
|
|
||||||
{
|
|
||||||
/* TODO more info */
|
|
||||||
pt.put("enabled", true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pt.put("enabled", false);
|
|
||||||
|
|
||||||
InsertParam (results, "I2CP", pt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2025, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/asio/ssl.hpp>
|
#include <boost/asio/ssl.hpp>
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
#include "I2PControlHandlers.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
{
|
{
|
||||||
@@ -32,10 +33,8 @@ namespace client
|
|||||||
const char I2P_CONTROL_CERTIFICATE_COMMON_NAME[] = "i2pd.i2pcontrol";
|
const char I2P_CONTROL_CERTIFICATE_COMMON_NAME[] = "i2pd.i2pcontrol";
|
||||||
const char I2P_CONTROL_CERTIFICATE_ORGANIZATION[] = "Purple I2P";
|
const char I2P_CONTROL_CERTIFICATE_ORGANIZATION[] = "Purple I2P";
|
||||||
|
|
||||||
class I2PControlService
|
class I2PControlService: public I2PControlHandlers
|
||||||
{
|
{
|
||||||
typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> ssl_socket;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
I2PControlService (const std::string& address, int port);
|
I2PControlService (const std::string& address, int port);
|
||||||
@@ -48,94 +47,59 @@ namespace client
|
|||||||
|
|
||||||
void Run ();
|
void Run ();
|
||||||
void Accept ();
|
void Accept ();
|
||||||
void HandleAccept(const boost::system::error_code& ecode, std::shared_ptr<ssl_socket> socket);
|
template<typename ssl_socket>
|
||||||
|
void HandleAccepted (const boost::system::error_code& ecode, std::shared_ptr<ssl_socket> newSocket);
|
||||||
|
template<typename ssl_socket>
|
||||||
void Handshake (std::shared_ptr<ssl_socket> socket);
|
void Handshake (std::shared_ptr<ssl_socket> socket);
|
||||||
void HandleHandshake (const boost::system::error_code& ecode, std::shared_ptr<ssl_socket> socket);
|
template<typename ssl_socket>
|
||||||
void ReadRequest (std::shared_ptr<ssl_socket> socket);
|
void ReadRequest (std::shared_ptr<ssl_socket> socket);
|
||||||
|
template<typename ssl_socket>
|
||||||
void HandleRequestReceived (const boost::system::error_code& ecode, size_t bytes_transferred,
|
void HandleRequestReceived (const boost::system::error_code& ecode, size_t bytes_transferred,
|
||||||
std::shared_ptr<ssl_socket> socket, std::shared_ptr<I2PControlBuffer> buf);
|
std::shared_ptr<ssl_socket> socket, std::shared_ptr<I2PControlBuffer> buf);
|
||||||
|
template<typename ssl_socket>
|
||||||
void SendResponse (std::shared_ptr<ssl_socket> socket,
|
void SendResponse (std::shared_ptr<ssl_socket> socket,
|
||||||
std::shared_ptr<I2PControlBuffer> buf, std::ostringstream& response, bool isHtml);
|
std::shared_ptr<I2PControlBuffer> buf, std::ostringstream& response, bool isHtml);
|
||||||
void HandleResponseSent (const boost::system::error_code& ecode, std::size_t bytes_transferred,
|
|
||||||
std::shared_ptr<ssl_socket> socket, std::shared_ptr<I2PControlBuffer> buf);
|
|
||||||
|
|
||||||
void CreateCertificate (const char *crt_path, const char *key_path);
|
void CreateCertificate (const char *crt_path, const char *key_path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void InsertParam (std::ostringstream& ss, const std::string& name, int value) const;
|
|
||||||
void InsertParam (std::ostringstream& ss, const std::string& name, double value) const;
|
|
||||||
void InsertParam (std::ostringstream& ss, const std::string& name, const std::string& value) const;
|
|
||||||
void InsertParam (std::ostringstream& ss, const std::string& name, const boost::property_tree::ptree& value) const;
|
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
typedef void (I2PControlService::*MethodHandler)(const boost::property_tree::ptree& params, std::ostringstream& results);
|
typedef void (I2PControlService::*MethodHandler)(const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
|
|
||||||
void AuthenticateHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
void AuthenticateHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
void EchoHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
void EchoHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
void I2PControlHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
void I2PControlHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
void RouterInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
|
||||||
void RouterManagerHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
void RouterManagerHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
void NetworkSettingHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
|
||||||
void ClientServicesInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
|
||||||
|
|
||||||
// I2PControl
|
// I2PControl
|
||||||
typedef void (I2PControlService::*I2PControlRequestHandler)(const std::string& value);
|
typedef void (I2PControlService::*I2PControlRequestHandler)(const std::string& value);
|
||||||
void PasswordHandler (const std::string& value);
|
void PasswordHandler (const std::string& value);
|
||||||
|
|
||||||
// RouterInfo
|
|
||||||
typedef void (I2PControlService::*RouterInfoRequestHandler)(std::ostringstream& results);
|
|
||||||
void UptimeHandler (std::ostringstream& results);
|
|
||||||
void VersionHandler (std::ostringstream& results);
|
|
||||||
void StatusHandler (std::ostringstream& results);
|
|
||||||
void NetDbKnownPeersHandler (std::ostringstream& results);
|
|
||||||
void NetDbActivePeersHandler (std::ostringstream& results);
|
|
||||||
void NetStatusHandler (std::ostringstream& results);
|
|
||||||
void TunnelsParticipatingHandler (std::ostringstream& results);
|
|
||||||
void TunnelsSuccessRateHandler (std::ostringstream& results);
|
|
||||||
void InboundBandwidth1S (std::ostringstream& results);
|
|
||||||
void OutboundBandwidth1S (std::ostringstream& results);
|
|
||||||
void NetTotalReceivedBytes (std::ostringstream& results);
|
|
||||||
void NetTotalSentBytes (std::ostringstream& results);
|
|
||||||
|
|
||||||
// RouterManager
|
// RouterManager
|
||||||
typedef void (I2PControlService::*RouterManagerRequestHandler)(std::ostringstream& results);
|
typedef void (I2PControlService::*RouterManagerRequestHandler)(std::ostringstream& results);
|
||||||
void ShutdownHandler (std::ostringstream& results);
|
void ShutdownHandler (std::ostringstream& results);
|
||||||
void ShutdownGracefulHandler (std::ostringstream& results);
|
void ShutdownGracefulHandler (std::ostringstream& results);
|
||||||
void ReseedHandler (std::ostringstream& results);
|
void ReseedHandler (std::ostringstream& results);
|
||||||
|
|
||||||
// NetworkSetting
|
|
||||||
typedef void (I2PControlService::*NetworkSettingRequestHandler)(const std::string& value, std::ostringstream& results);
|
|
||||||
void InboundBandwidthLimit (const std::string& value, std::ostringstream& results);
|
|
||||||
void OutboundBandwidthLimit (const std::string& value, std::ostringstream& results);
|
|
||||||
|
|
||||||
// ClientServicesInfo
|
|
||||||
typedef void (I2PControlService::*ClientServicesInfoRequestHandler)(std::ostringstream& results);
|
|
||||||
void I2PTunnelInfoHandler (std::ostringstream& results);
|
|
||||||
void HTTPProxyInfoHandler (std::ostringstream& results);
|
|
||||||
void SOCKSInfoHandler (std::ostringstream& results);
|
|
||||||
void SAMInfoHandler (std::ostringstream& results);
|
|
||||||
void BOBInfoHandler (std::ostringstream& results);
|
|
||||||
void I2CPInfoHandler (std::ostringstream& results);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::string m_Password;
|
std::string m_Password;
|
||||||
bool m_IsRunning;
|
bool m_IsRunning;
|
||||||
std::thread * m_Thread;
|
std::unique_ptr<std::thread> m_Thread;
|
||||||
|
|
||||||
boost::asio::io_service m_Service;
|
boost::asio::io_context m_Service;
|
||||||
boost::asio::ip::tcp::acceptor m_Acceptor;
|
std::unique_ptr<boost::asio::ip::tcp::acceptor> m_Acceptor;
|
||||||
|
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
|
||||||
|
std::unique_ptr<boost::asio::local::stream_protocol::acceptor> m_LocalAcceptor;
|
||||||
|
#endif
|
||||||
boost::asio::ssl::context m_SSLContext;
|
boost::asio::ssl::context m_SSLContext;
|
||||||
boost::asio::deadline_timer m_ShutdownTimer;
|
boost::asio::deadline_timer m_ShutdownTimer;
|
||||||
std::set<std::string> m_Tokens;
|
std::set<std::string> m_Tokens;
|
||||||
|
|
||||||
std::map<std::string, MethodHandler> m_MethodHandlers;
|
std::map<std::string, MethodHandler> m_MethodHandlers;
|
||||||
std::map<std::string, I2PControlRequestHandler> m_I2PControlHandlers;
|
std::map<std::string, I2PControlRequestHandler> m_I2PControlHandlers;
|
||||||
std::map<std::string, RouterInfoRequestHandler> m_RouterInfoHandlers;
|
|
||||||
std::map<std::string, RouterManagerRequestHandler> m_RouterManagerHandlers;
|
std::map<std::string, RouterManagerRequestHandler> m_RouterManagerHandlers;
|
||||||
std::map<std::string, NetworkSettingRequestHandler> m_NetworkSettingHandlers;
|
|
||||||
std::map<std::string, ClientServicesInfoRequestHandler> m_ClientServicesInfoHandlers;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
390
daemon/I2PControlHandlers.cpp
Normal file
390
daemon/I2PControlHandlers.cpp
Normal file
@@ -0,0 +1,390 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||||
|
*
|
||||||
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
*
|
||||||
|
* See full license text in LICENSE file at top of project tree
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <iomanip>
|
||||||
|
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
|
||||||
|
#include "Log.h"
|
||||||
|
#include "RouterContext.h"
|
||||||
|
#include "NetDb.hpp"
|
||||||
|
#include "Tunnel.h"
|
||||||
|
#include "Transports.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "ClientContext.h"
|
||||||
|
#include "I2PControlHandlers.h"
|
||||||
|
|
||||||
|
namespace i2p
|
||||||
|
{
|
||||||
|
namespace client
|
||||||
|
{
|
||||||
|
I2PControlHandlers::I2PControlHandlers ()
|
||||||
|
{
|
||||||
|
// RouterInfo
|
||||||
|
m_RouterInfoHandlers["i2p.router.uptime"] = &I2PControlHandlers::UptimeHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.version"] = &I2PControlHandlers::VersionHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.status"] = &I2PControlHandlers::StatusHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.netdb.knownpeers"] = &I2PControlHandlers::NetDbKnownPeersHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.netdb.activepeers"] = &I2PControlHandlers::NetDbActivePeersHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.bw.inbound.1s"] = &I2PControlHandlers::InboundBandwidth1S;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.bw.inbound.15s"] = &I2PControlHandlers::InboundBandwidth15S;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.bw.outbound.1s"] = &I2PControlHandlers::OutboundBandwidth1S;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.bw.outbound.15s"] = &I2PControlHandlers::OutboundBandwidth15S;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.status"] = &I2PControlHandlers::NetStatusHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.tunnels.participating"] = &I2PControlHandlers::TunnelsParticipatingHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.tunnels.successrate"] = &I2PControlHandlers::TunnelsSuccessRateHandler;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.total.received.bytes"] = &I2PControlHandlers::NetTotalReceivedBytes;
|
||||||
|
m_RouterInfoHandlers["i2p.router.net.total.sent.bytes"] = &I2PControlHandlers::NetTotalSentBytes;
|
||||||
|
|
||||||
|
// NetworkSetting
|
||||||
|
m_NetworkSettingHandlers["i2p.router.net.bw.in"] = &I2PControlHandlers::InboundBandwidthLimit;
|
||||||
|
m_NetworkSettingHandlers["i2p.router.net.bw.out"] = &I2PControlHandlers::OutboundBandwidthLimit;
|
||||||
|
|
||||||
|
// ClientServicesInfo
|
||||||
|
m_ClientServicesInfoHandlers["I2PTunnel"] = &I2PControlHandlers::I2PTunnelInfoHandler;
|
||||||
|
m_ClientServicesInfoHandlers["HTTPProxy"] = &I2PControlHandlers::HTTPProxyInfoHandler;
|
||||||
|
m_ClientServicesInfoHandlers["SOCKS"] = &I2PControlHandlers::SOCKSInfoHandler;
|
||||||
|
m_ClientServicesInfoHandlers["SAM"] = &I2PControlHandlers::SAMInfoHandler;
|
||||||
|
m_ClientServicesInfoHandlers["BOB"] = &I2PControlHandlers::BOBInfoHandler;
|
||||||
|
m_ClientServicesInfoHandlers["I2CP"] = &I2PControlHandlers::I2CPInfoHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InsertParam (std::ostringstream& ss, const std::string& name, int value) const
|
||||||
|
{
|
||||||
|
ss << "\"" << name << "\":" << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InsertParam (std::ostringstream& ss, const std::string& name, const std::string& value, bool quotes) const
|
||||||
|
{
|
||||||
|
ss << "\"" << name << "\":";
|
||||||
|
if (value.length () > 0)
|
||||||
|
{
|
||||||
|
if (quotes)
|
||||||
|
ss << "\"" << value << "\"";
|
||||||
|
else
|
||||||
|
ss << value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ss << "null";
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InsertParam (std::ostringstream& ss, const std::string& name, double value) const
|
||||||
|
{
|
||||||
|
ss << "\"" << name << "\":" << std::fixed << std::setprecision(2) << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InsertParam (std::ostringstream& ss, const std::string& name, const boost::property_tree::ptree& value) const
|
||||||
|
{
|
||||||
|
std::ostringstream buf;
|
||||||
|
boost::property_tree::write_json (buf, value, false);
|
||||||
|
ss << "\"" << name << "\":" << buf.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// RouterInfo
|
||||||
|
|
||||||
|
void I2PControlHandlers::RouterInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results)
|
||||||
|
{
|
||||||
|
bool first = true;
|
||||||
|
for (auto it = params.begin (); it != params.end (); it++)
|
||||||
|
{
|
||||||
|
LogPrint (eLogDebug, "I2PControl: RouterInfo request: ", it->first);
|
||||||
|
auto it1 = m_RouterInfoHandlers.find (it->first);
|
||||||
|
if (it1 != m_RouterInfoHandlers.end ())
|
||||||
|
{
|
||||||
|
if (!first) results << ",";
|
||||||
|
else first = false;
|
||||||
|
(this->*(it1->second))(results);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
LogPrint (eLogError, "I2PControl: RouterInfo unknown request ", it->first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::UptimeHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.uptime", std::to_string (i2p::context.GetUptime ()*1000LL), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::VersionHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.version", VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::StatusHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
auto dest = i2p::client::context.GetSharedLocalDestination ();
|
||||||
|
InsertParam (results, "i2p.router.status", (dest && dest->IsReady ()) ? "1" : "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::NetDbKnownPeersHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.netdb.knownpeers", i2p::data::netdb.GetNumRouters ());
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::NetDbActivePeersHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.netdb.activepeers", (int)i2p::transport::transports.GetPeers ().size ());
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::NetStatusHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.net.status", (int)i2p::context.GetStatus ());
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::TunnelsParticipatingHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
int transit = i2p::tunnel::tunnels.GetTransitTunnels ().size ();
|
||||||
|
InsertParam (results, "i2p.router.net.tunnels.participating", transit);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::TunnelsSuccessRateHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
int rate = i2p::tunnel::tunnels.GetTunnelCreationSuccessRate ();
|
||||||
|
InsertParam (results, "i2p.router.net.tunnels.successrate", rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InboundBandwidth1S (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
double bw = i2p::transport::transports.GetInBandwidth ();
|
||||||
|
InsertParam (results, "i2p.router.net.bw.inbound.1s", bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InboundBandwidth15S (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
double bw = i2p::transport::transports.GetInBandwidth15s ();
|
||||||
|
InsertParam (results, "i2p.router.net.bw.inbound.15s", bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::OutboundBandwidth1S (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
double bw = i2p::transport::transports.GetOutBandwidth ();
|
||||||
|
InsertParam (results, "i2p.router.net.bw.outbound.1s", bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::OutboundBandwidth15S (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
double bw = i2p::transport::transports.GetOutBandwidth15s ();
|
||||||
|
InsertParam (results, "i2p.router.net.bw.outbound.15s", bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::NetTotalReceivedBytes (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.net.total.received.bytes", (double)i2p::transport::transports.GetTotalReceivedBytes ());
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::NetTotalSentBytes (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
InsertParam (results, "i2p.router.net.total.sent.bytes", (double)i2p::transport::transports.GetTotalSentBytes ());
|
||||||
|
}
|
||||||
|
|
||||||
|
// network setting
|
||||||
|
void I2PControlHandlers::NetworkSettingHandler (const boost::property_tree::ptree& params, std::ostringstream& results)
|
||||||
|
{
|
||||||
|
for (auto it = params.begin (); it != params.end (); it++)
|
||||||
|
{
|
||||||
|
LogPrint (eLogDebug, "I2PControl: NetworkSetting request: ", it->first);
|
||||||
|
auto it1 = m_NetworkSettingHandlers.find (it->first);
|
||||||
|
if (it1 != m_NetworkSettingHandlers.end ()) {
|
||||||
|
if (it != params.begin ()) results << ",";
|
||||||
|
(this->*(it1->second))(it->second.data (), results);
|
||||||
|
} else
|
||||||
|
LogPrint (eLogError, "I2PControl: NetworkSetting unknown request: ", it->first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::InboundBandwidthLimit (const std::string& value, std::ostringstream& results)
|
||||||
|
{
|
||||||
|
if (value != "null")
|
||||||
|
i2p::context.SetBandwidth (std::atoi(value.c_str()));
|
||||||
|
int bw = i2p::context.GetBandwidthLimit();
|
||||||
|
InsertParam (results, "i2p.router.net.bw.in", bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::OutboundBandwidthLimit (const std::string& value, std::ostringstream& results)
|
||||||
|
{
|
||||||
|
if (value != "null")
|
||||||
|
i2p::context.SetBandwidth (std::atoi(value.c_str()));
|
||||||
|
int bw = i2p::context.GetBandwidthLimit();
|
||||||
|
InsertParam (results, "i2p.router.net.bw.out", bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClientServicesInfo
|
||||||
|
|
||||||
|
void I2PControlHandlers::ClientServicesInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results)
|
||||||
|
{
|
||||||
|
for (auto it = params.begin (); it != params.end (); it++)
|
||||||
|
{
|
||||||
|
LogPrint (eLogDebug, "I2PControl: ClientServicesInfo request: ", it->first);
|
||||||
|
auto it1 = m_ClientServicesInfoHandlers.find (it->first);
|
||||||
|
if (it1 != m_ClientServicesInfoHandlers.end ())
|
||||||
|
{
|
||||||
|
if (it != params.begin ()) results << ",";
|
||||||
|
(this->*(it1->second))(results);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
LogPrint (eLogError, "I2PControl: ClientServicesInfo unknown request ", it->first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::I2PTunnelInfoHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree pt;
|
||||||
|
boost::property_tree::ptree client_tunnels, server_tunnels;
|
||||||
|
|
||||||
|
for (auto& it: i2p::client::context.GetClientTunnels ())
|
||||||
|
{
|
||||||
|
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||||
|
boost::property_tree::ptree ct;
|
||||||
|
ct.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
client_tunnels.add_child(it.second->GetName (), ct);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto& serverTunnels = i2p::client::context.GetServerTunnels ();
|
||||||
|
if (!serverTunnels.empty ()) {
|
||||||
|
for (auto& it: serverTunnels)
|
||||||
|
{
|
||||||
|
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||||
|
boost::property_tree::ptree st;
|
||||||
|
st.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
st.put("port", it.second->GetLocalPort ());
|
||||||
|
server_tunnels.add_child(it.second->GetName (), st);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
auto& clientForwards = i2p::client::context.GetClientForwards ();
|
||||||
|
if (!clientForwards.empty ())
|
||||||
|
{
|
||||||
|
for (auto& it: clientForwards)
|
||||||
|
{
|
||||||
|
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||||
|
boost::property_tree::ptree ct;
|
||||||
|
ct.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
client_tunnels.add_child(it.second->GetName (), ct);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
auto& serverForwards = i2p::client::context.GetServerForwards ();
|
||||||
|
if (!serverForwards.empty ())
|
||||||
|
{
|
||||||
|
for (auto& it: serverForwards)
|
||||||
|
{
|
||||||
|
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||||
|
boost::property_tree::ptree st;
|
||||||
|
st.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
server_tunnels.add_child(it.second->GetName (), st);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pt.add_child("client", client_tunnels);
|
||||||
|
pt.add_child("server", server_tunnels);
|
||||||
|
|
||||||
|
InsertParam (results, "I2PTunnel", pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::HTTPProxyInfoHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree pt;
|
||||||
|
|
||||||
|
auto httpProxy = i2p::client::context.GetHttpProxy ();
|
||||||
|
if (httpProxy)
|
||||||
|
{
|
||||||
|
auto& ident = httpProxy->GetLocalDestination ()->GetIdentHash();
|
||||||
|
pt.put("enabled", true);
|
||||||
|
pt.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pt.put("enabled", false);
|
||||||
|
|
||||||
|
InsertParam (results, "HTTPProxy", pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::SOCKSInfoHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree pt;
|
||||||
|
|
||||||
|
auto socksProxy = i2p::client::context.GetSocksProxy ();
|
||||||
|
if (socksProxy)
|
||||||
|
{
|
||||||
|
auto& ident = socksProxy->GetLocalDestination ()->GetIdentHash();
|
||||||
|
pt.put("enabled", true);
|
||||||
|
pt.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pt.put("enabled", false);
|
||||||
|
|
||||||
|
InsertParam (results, "SOCKS", pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::SAMInfoHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree pt;
|
||||||
|
auto sam = i2p::client::context.GetSAMBridge ();
|
||||||
|
if (sam)
|
||||||
|
{
|
||||||
|
pt.put("enabled", true);
|
||||||
|
boost::property_tree::ptree sam_sessions;
|
||||||
|
for (auto& it: sam->GetSessions ())
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree sam_session, sam_session_sockets;
|
||||||
|
auto& name = it.second->GetLocalDestination ()->GetNickname ();
|
||||||
|
auto& ident = it.second->GetLocalDestination ()->GetIdentHash();
|
||||||
|
sam_session.put("name", name);
|
||||||
|
sam_session.put("address", i2p::client::context.GetAddressBook ().ToAddress(ident));
|
||||||
|
|
||||||
|
for (const auto& socket: sam->ListSockets(it.first))
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree stream;
|
||||||
|
stream.put("type", socket->GetSocketType ());
|
||||||
|
stream.put("peer", socket->GetSocket ().remote_endpoint());
|
||||||
|
|
||||||
|
sam_session_sockets.push_back(std::make_pair("", stream));
|
||||||
|
}
|
||||||
|
sam_session.add_child("sockets", sam_session_sockets);
|
||||||
|
sam_sessions.add_child(it.first, sam_session);
|
||||||
|
}
|
||||||
|
|
||||||
|
pt.add_child("sessions", sam_sessions);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pt.put("enabled", false);
|
||||||
|
|
||||||
|
InsertParam (results, "SAM", pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::BOBInfoHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree pt;
|
||||||
|
auto bob = i2p::client::context.GetBOBCommandChannel ();
|
||||||
|
if (bob)
|
||||||
|
{
|
||||||
|
/* TODO more info */
|
||||||
|
pt.put("enabled", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pt.put("enabled", false);
|
||||||
|
|
||||||
|
InsertParam (results, "BOB", pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
void I2PControlHandlers::I2CPInfoHandler (std::ostringstream& results)
|
||||||
|
{
|
||||||
|
boost::property_tree::ptree pt;
|
||||||
|
auto i2cp = i2p::client::context.GetI2CPServer ();
|
||||||
|
if (i2cp)
|
||||||
|
{
|
||||||
|
/* TODO more info */
|
||||||
|
pt.put("enabled", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pt.put("enabled", false);
|
||||||
|
|
||||||
|
InsertParam (results, "I2CP", pt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
82
daemon/I2PControlHandlers.h
Normal file
82
daemon/I2PControlHandlers.h
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||||
|
*
|
||||||
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
*
|
||||||
|
* See full license text in LICENSE file at top of project tree
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef I2P_CONTROL_HANDLERS_H__
|
||||||
|
#define I2P_CONTROL_HANDLERS_H__
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
|
||||||
|
namespace i2p
|
||||||
|
{
|
||||||
|
namespace client
|
||||||
|
{
|
||||||
|
class I2PControlHandlers
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
I2PControlHandlers ();
|
||||||
|
|
||||||
|
// methods
|
||||||
|
// TODO: make protected
|
||||||
|
void RouterInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
|
void NetworkSettingHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
|
void ClientServicesInfoHandler (const boost::property_tree::ptree& params, std::ostringstream& results);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
void InsertParam (std::ostringstream& ss, const std::string& name, int value) const;
|
||||||
|
void InsertParam (std::ostringstream& ss, const std::string& name, double value) const;
|
||||||
|
void InsertParam (std::ostringstream& ss, const std::string& name, const std::string& value, bool quotes = true) const;
|
||||||
|
void InsertParam (std::ostringstream& ss, const std::string& name, const boost::property_tree::ptree& value) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// RouterInfo
|
||||||
|
typedef void (I2PControlHandlers::*RouterInfoRequestHandler)(std::ostringstream& results);
|
||||||
|
void UptimeHandler (std::ostringstream& results);
|
||||||
|
void VersionHandler (std::ostringstream& results);
|
||||||
|
void StatusHandler (std::ostringstream& results);
|
||||||
|
void NetDbKnownPeersHandler (std::ostringstream& results);
|
||||||
|
void NetDbActivePeersHandler (std::ostringstream& results);
|
||||||
|
void NetStatusHandler (std::ostringstream& results);
|
||||||
|
void TunnelsParticipatingHandler (std::ostringstream& results);
|
||||||
|
void TunnelsSuccessRateHandler (std::ostringstream& results);
|
||||||
|
void InboundBandwidth1S (std::ostringstream& results);
|
||||||
|
void InboundBandwidth15S (std::ostringstream& results);
|
||||||
|
void OutboundBandwidth1S (std::ostringstream& results);
|
||||||
|
void OutboundBandwidth15S (std::ostringstream& results);
|
||||||
|
void NetTotalReceivedBytes (std::ostringstream& results);
|
||||||
|
void NetTotalSentBytes (std::ostringstream& results);
|
||||||
|
|
||||||
|
// NetworkSetting
|
||||||
|
typedef void (I2PControlHandlers::*NetworkSettingRequestHandler)(const std::string& value, std::ostringstream& results);
|
||||||
|
void InboundBandwidthLimit (const std::string& value, std::ostringstream& results);
|
||||||
|
void OutboundBandwidthLimit (const std::string& value, std::ostringstream& results);
|
||||||
|
|
||||||
|
// ClientServicesInfo
|
||||||
|
typedef void (I2PControlHandlers::*ClientServicesInfoRequestHandler)(std::ostringstream& results);
|
||||||
|
void I2PTunnelInfoHandler (std::ostringstream& results);
|
||||||
|
void HTTPProxyInfoHandler (std::ostringstream& results);
|
||||||
|
void SOCKSInfoHandler (std::ostringstream& results);
|
||||||
|
void SAMInfoHandler (std::ostringstream& results);
|
||||||
|
void BOBInfoHandler (std::ostringstream& results);
|
||||||
|
void I2CPInfoHandler (std::ostringstream& results);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::map<std::string, RouterInfoRequestHandler> m_RouterInfoHandlers;
|
||||||
|
std::map<std::string, NetworkSettingRequestHandler> m_NetworkSettingHandlers;
|
||||||
|
std::map<std::string, ClientServicesInfoRequestHandler> m_ClientServicesInfoHandlers;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,10 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
|
*
|
||||||
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
|
*
|
||||||
|
* See full license text in LICENSE file at top of project tree
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef USE_UPNP
|
#ifdef USE_UPNP
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <boost/thread/thread.hpp>
|
|
||||||
#include <boost/asio.hpp>
|
|
||||||
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
#include "RouterContext.h"
|
#include "RouterContext.h"
|
||||||
@@ -47,7 +52,7 @@ namespace transport
|
|||||||
{
|
{
|
||||||
m_IsRunning = true;
|
m_IsRunning = true;
|
||||||
LogPrint(eLogInfo, "UPnP: Starting");
|
LogPrint(eLogInfo, "UPnP: Starting");
|
||||||
m_Service.post (std::bind (&UPnP::Discover, this));
|
boost::asio::post (m_Service, std::bind (&UPnP::Discover, this));
|
||||||
std::unique_lock<std::mutex> l(m_StartedMutex);
|
std::unique_lock<std::mutex> l(m_StartedMutex);
|
||||||
m_Thread.reset (new std::thread (std::bind (&UPnP::Run, this)));
|
m_Thread.reset (new std::thread (std::bind (&UPnP::Run, this)));
|
||||||
m_Started.wait_for (l, std::chrono::seconds (5)); // 5 seconds maximum
|
m_Started.wait_for (l, std::chrono::seconds (5)); // 5 seconds maximum
|
||||||
@@ -93,7 +98,7 @@ namespace transport
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
isError = err != UPNPDISCOVER_SUCCESS;
|
isError = err != UPNPDISCOVER_SUCCESS;
|
||||||
#else // MINIUPNPC_API_VERSION >= 8
|
#else // MINIUPNPC_API_VERSION >= 8
|
||||||
err = 0;
|
err = 0;
|
||||||
m_Devlist = upnpDiscover (UPNP_RESPONSE_TIMEOUT, NULL, NULL, 0);
|
m_Devlist = upnpDiscover (UPNP_RESPONSE_TIMEOUT, NULL, NULL, 0);
|
||||||
isError = m_Devlist == NULL;
|
isError = m_Devlist == NULL;
|
||||||
@@ -110,10 +115,16 @@ namespace transport
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (MINIUPNPC_API_VERSION >= 18)
|
||||||
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr),
|
||||||
|
m_externalIPAddress, sizeof (m_externalIPAddress));
|
||||||
|
#else
|
||||||
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr));
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr));
|
||||||
|
#endif
|
||||||
m_upnpUrlsInitialized=err!=0;
|
m_upnpUrlsInitialized=err!=0;
|
||||||
if (err == UPNP_IGD_VALID_CONNECTED)
|
if (err == UPNP_IGD_VALID_CONNECTED)
|
||||||
{
|
{
|
||||||
|
#if (MINIUPNPC_API_VERSION < 18)
|
||||||
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress);
|
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress);
|
||||||
if(err != UPNPCOMMAND_SUCCESS)
|
if(err != UPNPCOMMAND_SUCCESS)
|
||||||
{
|
{
|
||||||
@@ -121,6 +132,7 @@ namespace transport
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "UPnP: Found Internet Gateway Device ", m_upnpUrls.controlURL);
|
LogPrint (eLogError, "UPnP: Found Internet Gateway Device ", m_upnpUrls.controlURL);
|
||||||
if (!m_externalIPAddress[0])
|
if (!m_externalIPAddress[0])
|
||||||
@@ -138,7 +150,7 @@ namespace transport
|
|||||||
|
|
||||||
// UPnP discovered
|
// UPnP discovered
|
||||||
LogPrint (eLogDebug, "UPnP: ExternalIPAddress is ", m_externalIPAddress);
|
LogPrint (eLogDebug, "UPnP: ExternalIPAddress is ", m_externalIPAddress);
|
||||||
i2p::context.UpdateAddress (boost::asio::ip::address::from_string (m_externalIPAddress));
|
i2p::context.UpdateAddress (boost::asio::ip::make_address (m_externalIPAddress));
|
||||||
// port mapping
|
// port mapping
|
||||||
PortMapping ();
|
PortMapping ();
|
||||||
}
|
}
|
||||||
@@ -159,17 +171,18 @@ namespace transport
|
|||||||
|
|
||||||
void UPnP::PortMapping ()
|
void UPnP::PortMapping ()
|
||||||
{
|
{
|
||||||
const auto& a = context.GetRouterInfo().GetAddresses();
|
auto a = context.GetRouterInfo().GetAddresses();
|
||||||
for (const auto& address : a)
|
if (!a) return;
|
||||||
|
for (const auto& address : *a)
|
||||||
{
|
{
|
||||||
if (!address->host.is_v6 () && address->port)
|
if (address && !address->host.is_v6 () && address->port)
|
||||||
TryPortMapping (address);
|
TryPortMapping (address);
|
||||||
}
|
}
|
||||||
m_Timer.expires_from_now (boost::posix_time::minutes(20)); // every 20 minutes
|
m_Timer.expires_from_now (boost::posix_time::minutes(UPNP_PORT_FORWARDING_INTERVAL)); // every 20 minutes
|
||||||
m_Timer.async_wait ([this](const boost::system::error_code& ecode)
|
m_Timer.async_wait ([this](const boost::system::error_code& ecode)
|
||||||
{
|
{
|
||||||
if (ecode != boost::asio::error::operation_aborted)
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
PortMapping ();
|
PortMapping ();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,10 +223,11 @@ namespace transport
|
|||||||
|
|
||||||
void UPnP::CloseMapping ()
|
void UPnP::CloseMapping ()
|
||||||
{
|
{
|
||||||
const auto& a = context.GetRouterInfo().GetAddresses();
|
auto a = context.GetRouterInfo().GetAddresses();
|
||||||
for (const auto& address : a)
|
if (!a) return;
|
||||||
|
for (const auto& address : *a)
|
||||||
{
|
{
|
||||||
if (!address->host.is_v6 () && address->port)
|
if (address && !address->host.is_v6 () && address->port)
|
||||||
CloseMapping (address);
|
CloseMapping (address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,10 +262,10 @@ namespace transport
|
|||||||
{
|
{
|
||||||
switch (address->transportStyle)
|
switch (address->transportStyle)
|
||||||
{
|
{
|
||||||
case i2p::data::RouterInfo::eTransportNTCP:
|
case i2p::data::RouterInfo::eTransportNTCP2:
|
||||||
return "TCP";
|
return "TCP";
|
||||||
break;
|
break;
|
||||||
case i2p::data::RouterInfo::eTransportSSU:
|
case i2p::data::RouterInfo::eTransportSSU2:
|
||||||
default:
|
default:
|
||||||
return "UDP";
|
return "UDP";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -28,7 +28,8 @@ namespace i2p
|
|||||||
namespace transport
|
namespace transport
|
||||||
{
|
{
|
||||||
const int UPNP_RESPONSE_TIMEOUT = 2000; // in milliseconds
|
const int UPNP_RESPONSE_TIMEOUT = 2000; // in milliseconds
|
||||||
|
const int UPNP_PORT_FORWARDING_INTERVAL = 20; // in minutes
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
UPNP_IGD_NONE = 0,
|
UPNP_IGD_NONE = 0,
|
||||||
@@ -51,7 +52,7 @@ namespace transport
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
void Discover ();
|
void Discover ();
|
||||||
int CheckMapping (const char* port, const char* type);
|
int CheckMapping (const char* port, const char* type);
|
||||||
void PortMapping ();
|
void PortMapping ();
|
||||||
void TryPortMapping (std::shared_ptr<i2p::data::RouterInfo::Address> address);
|
void TryPortMapping (std::shared_ptr<i2p::data::RouterInfo::Address> address);
|
||||||
void CloseMapping ();
|
void CloseMapping ();
|
||||||
@@ -66,7 +67,7 @@ namespace transport
|
|||||||
std::unique_ptr<std::thread> m_Thread;
|
std::unique_ptr<std::thread> m_Thread;
|
||||||
std::condition_variable m_Started;
|
std::condition_variable m_Started;
|
||||||
std::mutex m_StartedMutex;
|
std::mutex m_StartedMutex;
|
||||||
boost::asio::io_service m_Service;
|
boost::asio::io_context m_Service;
|
||||||
boost::asio::deadline_timer m_Timer;
|
boost::asio::deadline_timer m_Timer;
|
||||||
bool m_upnpUrlsInitialized = false;
|
bool m_upnpUrlsInitialized = false;
|
||||||
struct UPNPUrls m_upnpUrls;
|
struct UPNPUrls m_upnpUrls;
|
||||||
@@ -80,7 +81,7 @@ namespace transport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // USE_UPNP
|
#else // USE_UPNP
|
||||||
namespace i2p {
|
namespace i2p {
|
||||||
namespace transport {
|
namespace transport {
|
||||||
/* class stub */
|
/* class stub */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@@ -24,6 +24,8 @@
|
|||||||
#include "Tunnel.h"
|
#include "Tunnel.h"
|
||||||
#include "RouterContext.h"
|
#include "RouterContext.h"
|
||||||
#include "ClientContext.h"
|
#include "ClientContext.h"
|
||||||
|
#include "Transports.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
void handle_signal(int sig)
|
void handle_signal(int sig)
|
||||||
{
|
{
|
||||||
@@ -54,6 +56,14 @@ void handle_signal(int sig)
|
|||||||
case SIGPIPE:
|
case SIGPIPE:
|
||||||
LogPrint(eLogInfo, "SIGPIPE received");
|
LogPrint(eLogInfo, "SIGPIPE received");
|
||||||
break;
|
break;
|
||||||
|
case SIGTSTP:
|
||||||
|
LogPrint(eLogInfo, "Daemon: Got SIGTSTP, disconnecting from network...");
|
||||||
|
i2p::transport::transports.SetOnline(false);
|
||||||
|
break;
|
||||||
|
case SIGCONT:
|
||||||
|
LogPrint(eLogInfo, "Daemon: Got SIGCONT, restoring connection to network...");
|
||||||
|
i2p::transport::transports.SetOnline(true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +83,7 @@ namespace i2p
|
|||||||
if (pid < 0) // error
|
if (pid < 0) // error
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Could not fork: ", strerror(errno));
|
LogPrint(eLogError, "Daemon: Could not fork: ", strerror(errno));
|
||||||
|
std::cerr << "i2pd: Could not fork: " << strerror(errno) << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,12 +93,14 @@ namespace i2p
|
|||||||
if (sid < 0)
|
if (sid < 0)
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Could not create process group.");
|
LogPrint(eLogError, "Daemon: Could not create process group.");
|
||||||
|
std::cerr << "i2pd: Could not create process group." << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string d = i2p::fs::GetDataDir();
|
std::string d = i2p::fs::GetDataDir();
|
||||||
if (chdir(d.c_str()) != 0)
|
if (chdir(d.c_str()) != 0)
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Could not chdir: ", strerror(errno));
|
LogPrint(eLogError, "Daemon: Could not chdir: ", strerror(errno));
|
||||||
|
std::cerr << "i2pd: Could not chdir: " << strerror(errno) << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,27 +157,42 @@ namespace i2p
|
|||||||
if (pidFH < 0)
|
if (pidFH < 0)
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Could not create pid file ", pidfile, ": ", strerror(errno));
|
LogPrint(eLogError, "Daemon: Could not create pid file ", pidfile, ": ", strerror(errno));
|
||||||
|
std::cerr << "i2pd: Could not create pid file " << pidfile << ": " << strerror(errno) << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ANDROID
|
#ifndef ANDROID
|
||||||
if (lockf(pidFH, F_TLOCK, 0) != 0)
|
if (lockf(pidFH, F_TLOCK, 0) != 0)
|
||||||
|
#else
|
||||||
|
struct flock fl;
|
||||||
|
fl.l_len = 0;
|
||||||
|
fl.l_type = F_WRLCK;
|
||||||
|
fl.l_whence = SEEK_SET;
|
||||||
|
fl.l_start = 0;
|
||||||
|
|
||||||
|
if (fcntl(pidFH, F_SETLK, &fl) != 0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Could not lock pid file ", pidfile, ": ", strerror(errno));
|
LogPrint(eLogError, "Daemon: Could not lock pid file ", pidfile, ": ", strerror(errno));
|
||||||
|
std::cerr << "i2pd: Could not lock pid file " << pidfile << ": " << strerror(errno) << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
char pid[10];
|
char pid[10];
|
||||||
sprintf(pid, "%d\n", getpid());
|
sprintf(pid, "%d\n", getpid());
|
||||||
ftruncate(pidFH, 0);
|
ftruncate(pidFH, 0);
|
||||||
if (write(pidFH, pid, strlen(pid)) < 0)
|
if (write(pidFH, pid, strlen(pid)) < 0)
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "Daemon: Could not write pidfile: ", strerror(errno));
|
LogPrint(eLogCritical, "Daemon: Could not write pidfile ", pidfile, ": ", strerror(errno));
|
||||||
|
std::cerr << "i2pd: Could not write pidfile " << pidfile << ": " << strerror(errno) << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gracefulShutdownInterval = 0; // not specified
|
gracefulShutdownInterval = 0; // not specified
|
||||||
|
|
||||||
|
// handle signal TSTP
|
||||||
|
bool handleTSTP; i2p::config::GetOption("unix.handle_sigtstp", handleTSTP);
|
||||||
|
|
||||||
// Signal handler
|
// Signal handler
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
sa.sa_handler = handle_signal;
|
sa.sa_handler = handle_signal;
|
||||||
@@ -176,6 +204,11 @@ namespace i2p
|
|||||||
sigaction(SIGTERM, &sa, 0);
|
sigaction(SIGTERM, &sa, 0);
|
||||||
sigaction(SIGINT, &sa, 0);
|
sigaction(SIGINT, &sa, 0);
|
||||||
sigaction(SIGPIPE, &sa, 0);
|
sigaction(SIGPIPE, &sa, 0);
|
||||||
|
if (handleTSTP)
|
||||||
|
{
|
||||||
|
sigaction(SIGTSTP, &sa, 0);
|
||||||
|
sigaction(SIGCONT, &sa, 0);
|
||||||
|
}
|
||||||
|
|
||||||
return Daemon_Singleton::start();
|
return Daemon_Singleton::start();
|
||||||
}
|
}
|
||||||
@@ -188,6 +221,7 @@ namespace i2p
|
|||||||
|
|
||||||
void DaemonLinux::run ()
|
void DaemonLinux::run ()
|
||||||
{
|
{
|
||||||
|
i2p::util::SetThreadName ("i2pd-daemon");
|
||||||
while (running)
|
while (running)
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for (std::chrono::seconds(1));
|
std::this_thread::sleep_for (std::chrono::seconds(1));
|
||||||
|
|||||||
5
debian/NEWS
vendored
Normal file
5
debian/NEWS
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
i2pd (2.53.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
i2pd binary moved from /usr/sbin to /usr/bin. Please check your scripts if you used the old path.
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Fri, 19 Jul 2024 16:00:00 +0000
|
||||||
145
debian/changelog
vendored
145
debian/changelog
vendored
@@ -1,3 +1,148 @@
|
|||||||
|
i2pd (2.56.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.56.0/0.9.65
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Tue, 11 Feb 2025 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.55.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.55.0
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Mon, 30 Dec 2024 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.54.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.54.0/0.9.64
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sun, 6 Oct 2024 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.53.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.53.1
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Tue, 30 Jul 2024 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.53.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.53.0/0.9.63
|
||||||
|
* binary moved from /usr/sbin to /usr/bin
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Sat, 20 Jul 2024 15:10:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.52.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.52.0
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sun, 12 May 2024 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.51.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.51.0/0.9.62
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sat, 06 Apr 2024 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.50.2-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.50.2/0.9.61
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sat, 06 Jan 2024 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.50.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.50.1/0.9.61
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Sat, 23 Dec 2023 18:30:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.50.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.50.0/0.9.61
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Mon, 18 Dec 2023 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.49.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.49.0/0.9.60
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Mon, 18 Sep 2023 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.48.0-1) unstable; urgency=high
|
||||||
|
|
||||||
|
* updated to version 2.48.0/0.9.59
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Mon, 12 Jun 2023 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.47.0-1) unstable; urgency=high
|
||||||
|
|
||||||
|
* updated to version 2.47.0/0.9.58
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sat, 11 Mar 2023 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.46.1-2) unstable; urgency=critical
|
||||||
|
|
||||||
|
* re-pushed release due to new critical bug
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Mon, 20 Feb 2023 23:40:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.46.1-1) unstable; urgency=high
|
||||||
|
|
||||||
|
* updated to version 2.46.1/0.9.57
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Mon, 20 Feb 2023 02:45:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.46.0-1) unstable; urgency=high
|
||||||
|
|
||||||
|
* updated to version 2.46.0/0.9.57
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Wed, 15 Feb 2023 19:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.45.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.45.1/0.9.57
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Wed, 11 Jan 2023 19:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.45.0-1) unstable; urgency=high
|
||||||
|
|
||||||
|
* updated to version 2.45.0/0.9.57
|
||||||
|
* compat level 12
|
||||||
|
* standards version 4.3.0
|
||||||
|
* increased nofile limit in service and init.d to 8192
|
||||||
|
* added conffiles
|
||||||
|
* removed #1210 patch
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Tue, 3 Jan 2023 18:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.44.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.44.0/0.9.56
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sun, 20 Nov 2022 19:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.43.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.43.0/0.9.55
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Mon, 22 Aug 2022 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.42.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.42.1/0.9.54
|
||||||
|
* remove -O3 optimization flag
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Tue, 24 May 2022 12:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.42.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.42.0/0.9.54
|
||||||
|
|
||||||
|
-- orignal <orignal@i2pmail.org> Sun, 22 May 2022 16:00:00 +0000
|
||||||
|
|
||||||
|
i2pd (2.41.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* updated to version 2.41.0/0.9.53
|
||||||
|
|
||||||
|
-- r4sas <r4sas@i2pmail.org> Sun, 20 Feb 2022 13:00:00 +0000
|
||||||
|
|
||||||
i2pd (2.40.0-1) unstable; urgency=medium
|
i2pd (2.40.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
* updated to version 2.40.0/0.9.52
|
* updated to version 2.40.0/0.9.52
|
||||||
|
|||||||
2
debian/compat
vendored
2
debian/compat
vendored
@@ -1 +1 @@
|
|||||||
9
|
12
|
||||||
|
|||||||
4
debian/control
vendored
4
debian/control
vendored
@@ -2,8 +2,8 @@ Source: i2pd
|
|||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: r4sas <r4sas@i2pmail.org>
|
Maintainer: r4sas <r4sas@i2pmail.org>
|
||||||
Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.17.2~), gcc (>= 4.7) | clang (>= 3.3), libboost-system-dev (>= 1.46), libboost-date-time-dev (>= 1.46), libboost-filesystem-dev (>= 1.46), libboost-program-options-dev (>= 1.46), libminiupnpc-dev, libssl-dev, zlib1g-dev
|
Build-Depends: debhelper (>= 12~), libboost-system-dev (>= 1.46), libboost-date-time-dev (>= 1.46), libboost-filesystem-dev (>= 1.46), libboost-program-options-dev (>= 1.46), libminiupnpc-dev, libssl-dev, zlib1g-dev
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 4.3.0
|
||||||
Homepage: http://i2pd.website/
|
Homepage: http://i2pd.website/
|
||||||
Vcs-Git: git://github.com/PurpleI2P/i2pd.git
|
Vcs-Git: git://github.com/PurpleI2P/i2pd.git
|
||||||
Vcs-Browser: https://github.com/PurpleI2P/i2pd
|
Vcs-Browser: https://github.com/PurpleI2P/i2pd
|
||||||
|
|||||||
6
debian/copyright
vendored
6
debian/copyright
vendored
@@ -3,18 +3,18 @@ Upstream-Name: i2pd
|
|||||||
Source: https://github.com/PurpleI2P
|
Source: https://github.com/PurpleI2P
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2013-2020 PurpleI2P
|
Copyright: 2013-2023 PurpleI2P
|
||||||
License: BSD-3-clause
|
License: BSD-3-clause
|
||||||
|
|
||||||
Files: debian/*
|
Files: debian/*
|
||||||
Copyright: 2013-2015 Kill Your TV <killyourtv@i2pmail.org>
|
Copyright: 2013-2015 Kill Your TV <killyourtv@i2pmail.org>
|
||||||
2014-2016 hagen <hagen@i2pmail.org>
|
2014-2016 hagen <hagen@i2pmail.org>
|
||||||
2016-2020 R4SAS <r4sas@i2pmail.org>
|
2016-2023 R4SAS <r4sas@i2pmail.org>
|
||||||
2017-2020 Yangfl <mmyangfl@gmail.com>
|
2017-2020 Yangfl <mmyangfl@gmail.com>
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
|
|
||||||
License: BSD-3-clause
|
License: BSD-3-clause
|
||||||
Copyright (c) 2013-2017, The PurpleI2P Project
|
Copyright (c) 2013-2023, The PurpleI2P Project
|
||||||
.
|
.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
.
|
.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user