mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-09 21:24:42 +02:00
Compare commits
714 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fca85e6cae | ||
![]() |
fa093778c5 | ||
![]() |
e39451974c | ||
![]() |
488e793a22 | ||
![]() |
eb5875b820 | ||
![]() |
b8f5856bac | ||
![]() |
0c9acc990d | ||
![]() |
723eae7792 | ||
![]() |
201703ecbc | ||
![]() |
bdd62c2572 | ||
![]() |
74e8518060 | ||
![]() |
bcfccd83d4 | ||
![]() |
c0b9bb64f8 | ||
![]() |
7c4695604a | ||
![]() |
4ef83ad215 | ||
![]() |
537e25df3b | ||
![]() |
fe4a5f82b1 | ||
![]() |
a4053d914a | ||
![]() |
c86d3fb2f3 | ||
![]() |
c3749253b7 | ||
![]() |
d61bda4f8b | ||
![]() |
0f839682e1 | ||
![]() |
0a60686023 | ||
![]() |
802ddfe6ee | ||
![]() |
798a6df506 | ||
![]() |
09cf5ee06a | ||
![]() |
9a4092d7a2 | ||
![]() |
a466c87d34 | ||
![]() |
45327e642e | ||
![]() |
4a393cb244 | ||
![]() |
13c7f18024 | ||
![]() |
89eeee5939 | ||
![]() |
e7d52575ad | ||
![]() |
80371f7666 | ||
![]() |
cff056c71b | ||
![]() |
54663f51dd | ||
![]() |
1a31c23602 | ||
![]() |
1e5a6c16e5 | ||
![]() |
1dbb4ccea4 | ||
![]() |
84d3ebbc87 | ||
![]() |
6489dd99a5 | ||
![]() |
7868798857 | ||
![]() |
03e9ffc9ac | ||
![]() |
3858604b79 | ||
![]() |
cc2d607ce6 | ||
![]() |
9f56be5500 | ||
![]() |
b3d40d1f6f | ||
![]() |
9f44ab5d8f | ||
![]() |
b02a1d01a9 | ||
![]() |
de114b55b3 | ||
![]() |
487d746f66 | ||
![]() |
4febfc04a9 | ||
![]() |
9b867c5949 | ||
![]() |
50bf9acb4e | ||
![]() |
dabf592acb | ||
![]() |
3f2c2c59b1 | ||
![]() |
0212d2f4f4 | ||
![]() |
6c1dcd1a7d | ||
![]() |
a2eb4dbdbd | ||
![]() |
504573e5f5 | ||
![]() |
81035a002a | ||
![]() |
0e16d8da74 | ||
![]() |
6b460917ef | ||
![]() |
9bd65ceaa2 | ||
![]() |
7b5508d333 | ||
![]() |
4ba9569a08 | ||
![]() |
ac1fa68260 | ||
![]() |
864eb6f1cd | ||
![]() |
cb7acddd61 | ||
![]() |
383d9ff4f8 | ||
![]() |
5eb4dbe550 | ||
![]() |
10473c6bd3 | ||
![]() |
2ac29148af | ||
![]() |
e5682fc48e | ||
![]() |
f332369b53 | ||
![]() |
8a8a114723 | ||
![]() |
583d17dd36 | ||
![]() |
751d3e8b96 | ||
![]() |
60a9008480 | ||
![]() |
e606363ee7 | ||
![]() |
fd0c92f439 | ||
![]() |
10b6b08127 | ||
![]() |
0b9a0dab5a | ||
![]() |
1c4a2cf563 | ||
![]() |
a93c347672 | ||
![]() |
683ebca006 | ||
![]() |
000c57b9c1 | ||
![]() |
4c6b946cf9 | ||
![]() |
b3cf51172f | ||
![]() |
56b8a81248 | ||
![]() |
f7107bf37d | ||
![]() |
c545a49755 | ||
![]() |
19ec3e2aff | ||
![]() |
4846ea000a | ||
![]() |
a29d63e6dc | ||
![]() |
bd177cbf26 | ||
![]() |
93d5acd355 | ||
![]() |
7cc19212f5 | ||
![]() |
ba36c9bdff | ||
![]() |
734fc31d8e | ||
![]() |
6c6d55eb63 | ||
![]() |
17cabb2921 | ||
![]() |
b0250deee1 | ||
![]() |
de8adf382b | ||
![]() |
c31b9d84f0 | ||
![]() |
2bdf899927 | ||
![]() |
2101ebb2de | ||
![]() |
a92e0bef37 | ||
![]() |
090ee7b093 | ||
![]() |
4cd184ae72 | ||
![]() |
642f990862 | ||
![]() |
829347cba2 | ||
![]() |
ca39b85cc2 | ||
![]() |
7a57e2d302 | ||
![]() |
49de2b0a93 | ||
![]() |
a2bd2615c1 | ||
![]() |
71d368689c | ||
![]() |
e1515b468c | ||
![]() |
398f0993f4 | ||
![]() |
c846eb4330 | ||
![]() |
cae6d4ed73 | ||
![]() |
b286dc1c7f | ||
![]() |
61a69472c5 | ||
![]() |
a04fc6f123 | ||
![]() |
86964e1cc6 | ||
![]() |
2d7c30dbde | ||
![]() |
5b6d1ccc7b | ||
![]() |
b9b826c34c | ||
![]() |
b33018563b | ||
![]() |
033070d9a9 | ||
![]() |
8d67d1bf37 | ||
![]() |
f9143d14e5 | ||
![]() |
a601a25652 | ||
![]() |
6451525eb1 | ||
![]() |
acd1902734 | ||
![]() |
9d68ca86da | ||
![]() |
5b9165cd2f | ||
![]() |
8a48874b42 | ||
![]() |
b0132da030 | ||
![]() |
175d7f5379 | ||
![]() |
dc8023afe1 | ||
![]() |
d956872d95 | ||
![]() |
35defc04e0 | ||
![]() |
a2f5e5a5aa | ||
![]() |
ec5a8e6e33 | ||
![]() |
f00aa5faca | ||
![]() |
51ece1726c | ||
![]() |
579190b4bd | ||
![]() |
fd4d8d490a | ||
![]() |
e2fe43b3a7 | ||
![]() |
bedde1a3db | ||
![]() |
da638ad712 | ||
![]() |
10ae5e9d5d | ||
![]() |
71749ba8db | ||
![]() |
4373c38869 | ||
![]() |
2a17783a9c | ||
![]() |
a184ad4d7c | ||
![]() |
acc1e7e65a | ||
![]() |
95ffd0caa3 | ||
![]() |
b0e788788f | ||
![]() |
80f0c1b7da | ||
![]() |
7abdd0d817 | ||
![]() |
736330bea3 | ||
![]() |
accd06d291 | ||
![]() |
fed8294ae0 | ||
![]() |
1093355e77 | ||
![]() |
aae73741e8 | ||
![]() |
17002a6ede | ||
![]() |
4f96f437ad | ||
![]() |
335ea77e9e | ||
![]() |
41a4dc2922 | ||
![]() |
ee1d7a7625 | ||
![]() |
e9aa0edc37 | ||
![]() |
e64d7ea947 | ||
![]() |
8eb0415aaf | ||
![]() |
ef20198a4f | ||
![]() |
6c6d379002 | ||
![]() |
7c2a343629 | ||
![]() |
ea2e88d6bb | ||
![]() |
abaf909ef1 | ||
![]() |
74054523c5 | ||
![]() |
37daacf9fa | ||
![]() |
b58dc51f8d | ||
![]() |
6c661a4974 | ||
![]() |
7a49ddda3a | ||
![]() |
5e4cb3581d | ||
![]() |
968c2ca3a6 | ||
![]() |
af4fb5c6a0 | ||
![]() |
fc7d5a0e35 | ||
![]() |
2a7c693917 | ||
![]() |
838ad77d7f | ||
![]() |
3978ba6c04 | ||
![]() |
60554c25d9 | ||
![]() |
bd03c903d0 | ||
![]() |
113e5d658c | ||
![]() |
f9b4b5a76c | ||
![]() |
2f378210d9 | ||
![]() |
e5de468899 | ||
![]() |
204d96bcec | ||
![]() |
9e37b1429a | ||
![]() |
6b61e22f95 | ||
![]() |
c3dffe42be | ||
![]() |
796947fd6f | ||
![]() |
77b1da3089 | ||
![]() |
f3c6acf634 | ||
![]() |
ab810a20db | ||
![]() |
60f1be6f18 | ||
![]() |
ab6f7d5218 | ||
![]() |
67f50e88a3 | ||
![]() |
79a354c6d9 | ||
![]() |
ee20b141da | ||
![]() |
0c67c6322a | ||
![]() |
99ed3fbc2c | ||
![]() |
ef92bf5342 | ||
![]() |
053d2be3f3 | ||
![]() |
c155bf8c8c | ||
![]() |
e1232800c6 | ||
![]() |
7a2c0bf260 | ||
![]() |
203b5d1e37 | ||
![]() |
1325fc6391 | ||
![]() |
1c3bc3cbf4 | ||
![]() |
8509276972 | ||
![]() |
e7710489ca | ||
![]() |
f6a669ea46 | ||
![]() |
68ad01e346 | ||
![]() |
ffda2c8269 | ||
![]() |
896b2ab954 | ||
![]() |
bbcec8103d | ||
![]() |
8f0ba9cefe | ||
![]() |
cc3ebbe1ae | ||
![]() |
d88db81207 | ||
![]() |
9a15f1d1a3 | ||
![]() |
4e5f091b6c | ||
![]() |
517f196d73 | ||
![]() |
9461d2470a | ||
![]() |
c9f874dc93 | ||
![]() |
53b6285810 | ||
![]() |
5d4e0c41d6 | ||
![]() |
754337b58f | ||
![]() |
16f79085ad | ||
![]() |
005539d30d | ||
![]() |
2d5a90ae31 | ||
![]() |
fc060d6468 | ||
![]() |
d0937d3561 | ||
![]() |
7b8de5e28d | ||
![]() |
790f5ddfad | ||
![]() |
760231be43 | ||
![]() |
837e74a743 | ||
![]() |
630f613721 | ||
![]() |
aba9e6db47 | ||
![]() |
88858022af | ||
![]() |
852bb27de0 | ||
![]() |
9a071a3457 | ||
![]() |
db11db28e4 | ||
![]() |
79a8ef957f | ||
![]() |
0e0dfe80a7 | ||
![]() |
c112aef644 | ||
![]() |
2e30fe1899 | ||
![]() |
6b3ffa22c9 | ||
![]() |
9e78f46010 | ||
![]() |
50a09189e4 | ||
![]() |
fcda42b9f1 | ||
![]() |
48f72a3096 | ||
![]() |
e4e1ac2c18 | ||
![]() |
a719048f81 | ||
![]() |
8f1f41a4a1 | ||
![]() |
fffd53cc1f | ||
![]() |
ae7c139452 | ||
![]() |
76a3e7cd85 | ||
![]() |
20495ef32b | ||
![]() |
41b91bb0c3 | ||
![]() |
6e59cc4c33 | ||
![]() |
2aaed9b9e4 | ||
![]() |
f7dc404eaf | ||
![]() |
f3b9e70dde | ||
![]() |
d065f0abf4 | ||
![]() |
6e173558db | ||
![]() |
f78434e758 | ||
![]() |
ef5f2ccb89 | ||
![]() |
f05db7f544 | ||
![]() |
12cc25bdb0 | ||
![]() |
5936defc06 | ||
![]() |
3e9006464d | ||
![]() |
f7bf8fba40 | ||
![]() |
6bbb80a54e | ||
![]() |
7889077498 | ||
![]() |
074f0da27f | ||
![]() |
d7c35b2fe4 | ||
![]() |
4d8b55a92f | ||
![]() |
7387679a6f | ||
![]() |
af93571568 | ||
![]() |
1e2ecfc0c5 | ||
![]() |
b98a1ff1f5 | ||
![]() |
6170ef09b4 | ||
![]() |
15a1c6566f | ||
![]() |
113b3dffff | ||
![]() |
511ae721e2 | ||
![]() |
8ce3b35595 | ||
![]() |
69cb493144 | ||
![]() |
e850a5315a | ||
![]() |
d054bfce87 | ||
![]() |
7a0bafe528 | ||
![]() |
81b40df6ee | ||
![]() |
795c896abe | ||
![]() |
524a0c7885 | ||
![]() |
0ddaa3bef4 | ||
![]() |
e180b4bfc2 | ||
![]() |
16c9e95ee2 | ||
![]() |
e5be938c54 | ||
![]() |
5f81fa51fc | ||
![]() |
70014485a0 | ||
![]() |
6f1f3434cc | ||
![]() |
6323dc022f | ||
![]() |
522d7eeb4c | ||
![]() |
6065e1c576 | ||
![]() |
eff17d8fe2 | ||
![]() |
2307f6d2a5 | ||
![]() |
2e95240d34 | ||
![]() |
95df5228c6 | ||
![]() |
bc104e356c | ||
![]() |
ad143ce94f | ||
![]() |
05520f23d1 | ||
![]() |
1884073c21 | ||
![]() |
7d759917e6 | ||
![]() |
eccf4dc22c | ||
![]() |
a752a39230 | ||
![]() |
34dd2981b3 | ||
![]() |
0adb54f4b2 | ||
![]() |
2e77226f0c | ||
![]() |
31ae08544f | ||
![]() |
3da6e4ca1b | ||
![]() |
c4cd17ce2d | ||
![]() |
ee18368192 | ||
![]() |
09a7950c1d | ||
![]() |
847688bae8 | ||
![]() |
7fde427731 | ||
![]() |
7319078a5d | ||
![]() |
495afb91e9 | ||
![]() |
aa3fa8717f | ||
![]() |
052e382d93 | ||
![]() |
db39b6afd9 | ||
![]() |
e05efaeb1d | ||
![]() |
b94501f054 | ||
![]() |
f00d8e192a | ||
![]() |
9ca4600eab | ||
![]() |
5e8ebd8579 | ||
![]() |
748881ef70 | ||
![]() |
42e6600c6a | ||
![]() |
85d17a7763 | ||
![]() |
b1391b0523 | ||
![]() |
8510a42d7a | ||
![]() |
e61f6e78b3 | ||
![]() |
176ba5a6db | ||
![]() |
ad3c56e83b | ||
![]() |
2495a2f64e | ||
![]() |
0d6830b0aa | ||
![]() |
ef316590cb | ||
![]() |
c3c25190a2 | ||
![]() |
fc3d8d1aec | ||
![]() |
bbb7d1c3c7 | ||
![]() |
89dfac3009 | ||
![]() |
9610965979 | ||
![]() |
8b501403e1 | ||
![]() |
3a88aeb649 | ||
![]() |
0a0ba2291b | ||
![]() |
2484e22da9 | ||
![]() |
e8ca3e6b52 | ||
![]() |
d5c7445919 | ||
![]() |
72045404d4 | ||
![]() |
1a6e1a8c60 | ||
![]() |
540dc0fad4 | ||
![]() |
1db3e93ce1 | ||
![]() |
a5ec65bff3 | ||
![]() |
c4e3aa8a64 | ||
![]() |
e3e183d86b | ||
![]() |
bfe892f2c8 | ||
![]() |
b28116c10f | ||
![]() |
52c408fce7 | ||
![]() |
a70997ad7f | ||
![]() |
8840de316d | ||
![]() |
409483e680 | ||
![]() |
b19d690305 | ||
![]() |
0fabaf2fe0 | ||
![]() |
3035d8b901 | ||
![]() |
f3d73b5661 | ||
![]() |
f335dbf7bc | ||
![]() |
b5178dc7b8 | ||
![]() |
ad09a4dd77 | ||
![]() |
da0ead13f4 | ||
![]() |
4b6a9376de | ||
![]() |
3eab605423 | ||
![]() |
7fc37f1156 | ||
![]() |
9f03f8129a | ||
![]() |
51aa6fdf13 | ||
![]() |
f2f602dcc5 | ||
![]() |
a217381668 | ||
![]() |
4bd7befb50 | ||
![]() |
56074155e9 | ||
![]() |
86a5a9cd25 | ||
![]() |
1792ed276e | ||
![]() |
4d1e4b59c8 | ||
![]() |
e1ff4b9e12 | ||
![]() |
86400e1b8a | ||
![]() |
b3d53d1c01 | ||
![]() |
471d494b3b | ||
![]() |
6e7d983fc3 | ||
![]() |
fd1073d0b5 | ||
![]() |
7815615112 | ||
![]() |
a6d8e68ca9 | ||
![]() |
9593ba2414 | ||
![]() |
8c95045a4a | ||
![]() |
667317e513 | ||
![]() |
0026a4f26e | ||
![]() |
2fac90df9f | ||
![]() |
424e7b773d | ||
![]() |
d25506e595 | ||
![]() |
a83e90e9ce | ||
![]() |
ea93182d96 | ||
![]() |
d60ee24111 | ||
![]() |
40e5c999b3 | ||
![]() |
6175b805d2 | ||
![]() |
5b6ba8d75f | ||
![]() |
10b0f0b1ce | ||
![]() |
a81ef63075 | ||
![]() |
2dc5edbb55 | ||
![]() |
636be458a6 | ||
![]() |
64283f137c | ||
![]() |
ec1c9a9461 | ||
![]() |
d9a806d236 | ||
![]() |
ebd294b602 | ||
![]() |
6081094b73 | ||
![]() |
115dfd20e7 | ||
![]() |
038fe2866b | ||
![]() |
aec40373d3 | ||
![]() |
c9b8d27139 | ||
![]() |
d0793ebcba | ||
![]() |
00e4e8109e | ||
![]() |
bcc1dc1948 | ||
![]() |
1e67996df0 | ||
![]() |
947bed0a46 | ||
![]() |
0dd9842e84 | ||
![]() |
42728e2694 | ||
![]() |
44d14dc19c | ||
![]() |
2e95c491a1 | ||
![]() |
acfc776462 | ||
![]() |
b6692a7dab | ||
![]() |
34fc2a0d15 | ||
![]() |
07938dcef8 | ||
![]() |
847c5dfdcb | ||
![]() |
bd47603f0d | ||
![]() |
8b86146715 | ||
![]() |
5343c9109b | ||
![]() |
687acae90b | ||
![]() |
871e540957 | ||
![]() |
b0ce0b5350 | ||
![]() |
bc965b1a0c | ||
![]() |
89b60c4c15 | ||
![]() |
47a84775c5 | ||
![]() |
8de0b0cbad | ||
![]() |
b95fbd76a7 | ||
![]() |
6b44cc9b74 | ||
![]() |
0612c70ca1 | ||
![]() |
060972475f | ||
![]() |
28bbeec462 | ||
![]() |
099adadbdc | ||
![]() |
43511c6ecb | ||
![]() |
aa3e9c6fde | ||
![]() |
e53cdcb909 | ||
![]() |
fd14ad3f93 | ||
![]() |
ca1af97e42 | ||
![]() |
4970219ea7 | ||
![]() |
54c5b66ecf | ||
![]() |
8ae09d453d | ||
![]() |
f2e7ec25c8 | ||
![]() |
7f9fff4683 | ||
![]() |
13f2eea298 | ||
![]() |
d6f5a1b242 | ||
![]() |
ab37f0c2c7 | ||
![]() |
9710b37064 | ||
![]() |
54f7568111 | ||
![]() |
06758964c0 | ||
![]() |
b56552e0f4 | ||
![]() |
ef8653f7d2 | ||
![]() |
d5a6987390 | ||
![]() |
8fb92ca05c | ||
![]() |
11c7015c17 | ||
![]() |
8bc5d813b7 | ||
![]() |
012f5f05cc | ||
![]() |
cd65ec7a71 | ||
![]() |
45826df4fe | ||
![]() |
0645bab613 | ||
![]() |
4e409dfb50 | ||
![]() |
52a39b7a71 | ||
![]() |
5278b9fb47 | ||
![]() |
1ecafe3667 | ||
![]() |
190a415907 | ||
![]() |
ca609a9e62 | ||
![]() |
b72ade7b27 | ||
![]() |
e7098d01c5 | ||
![]() |
b04ee56612 | ||
![]() |
72a18e9b73 | ||
![]() |
6be64bbe36 | ||
![]() |
cf3848a54f | ||
![]() |
1a14e8dd4b | ||
![]() |
a25eb7f951 | ||
![]() |
9437cd54d3 | ||
![]() |
be55c5e4a6 | ||
![]() |
f1d774aa07 | ||
![]() |
c109133fcc | ||
![]() |
3538fdfaf7 | ||
![]() |
3468e7d404 | ||
![]() |
ec4afda184 | ||
![]() |
67b1835264 | ||
![]() |
aee64aa589 | ||
![]() |
687e6e237f | ||
![]() |
b48dd5e930 | ||
![]() |
5ee6833610 | ||
![]() |
c998ba3762 | ||
![]() |
2d4f7ab0e9 | ||
![]() |
676d03eb88 | ||
![]() |
68351a480b | ||
![]() |
33e35f1bd3 | ||
![]() |
e82b54994e | ||
![]() |
6f7ecbfb7b | ||
![]() |
c4aa49eb32 | ||
![]() |
32aae44ffc | ||
![]() |
7883534c5e | ||
![]() |
b58c9fb718 | ||
![]() |
99d8f63f9e | ||
![]() |
635e8240d2 | ||
![]() |
117a670aa3 | ||
![]() |
f49c58a1fa | ||
![]() |
2492f1b797 | ||
![]() |
d6781f67b2 | ||
![]() |
2e0c22eb6d | ||
![]() |
211e152863 | ||
![]() |
f7bf4060ea | ||
![]() |
8c953bbf01 | ||
![]() |
4e91761fdf | ||
![]() |
53f8465e67 | ||
![]() |
5818b914a3 | ||
![]() |
0680d39d90 | ||
![]() |
4ca6676be0 | ||
![]() |
3d85e751b7 | ||
![]() |
965da06214 | ||
![]() |
e8bc2816ef | ||
![]() |
28ed7cc8a5 | ||
![]() |
089d9f2e3d | ||
![]() |
9abce7a586 | ||
![]() |
53162b4bd3 | ||
![]() |
80d78a027b | ||
![]() |
b4eda2ed54 | ||
![]() |
4d8d21a815 | ||
![]() |
f3290800d8 | ||
![]() |
22a858c076 | ||
![]() |
823419c032 | ||
![]() |
908d3f64f4 | ||
![]() |
3843d68766 | ||
![]() |
4b599f391c | ||
![]() |
6d8239caab | ||
![]() |
dae37f273a | ||
![]() |
1615bff2d0 | ||
![]() |
b303befbb9 | ||
![]() |
e243c11cc0 | ||
![]() |
c860bca320 | ||
![]() |
a60c1fca36 | ||
![]() |
23f55ef33a | ||
![]() |
5ad2c7a371 | ||
![]() |
e4c729a588 | ||
![]() |
3df0218347 | ||
![]() |
601783aef6 | ||
![]() |
f09c5722be | ||
![]() |
e73ae99e38 | ||
![]() |
10c5c99385 | ||
![]() |
ac5af81344 | ||
![]() |
823563c84f | ||
![]() |
47410c5eb6 | ||
![]() |
af135f4ae9 | ||
![]() |
3eeced3a04 | ||
![]() |
8ea99b548d | ||
![]() |
ae73e8188d | ||
![]() |
9c5cda72da | ||
![]() |
fb1e24799d | ||
![]() |
5721948434 | ||
![]() |
d7b6f413be | ||
![]() |
959ec4667d | ||
![]() |
20433db169 | ||
![]() |
54465798e9 | ||
![]() |
313147d224 | ||
![]() |
84bd947eca | ||
![]() |
366abc4431 | ||
![]() |
2f7fa2f063 | ||
![]() |
205f6cac12 | ||
![]() |
f602b3db24 | ||
![]() |
0d72f1f228 | ||
![]() |
508125e68f | ||
![]() |
cfb714e13c | ||
![]() |
b9dcfd1b02 | ||
![]() |
a1b2dc67b8 | ||
![]() |
2207c5a961 | ||
![]() |
2caa09bb1e | ||
![]() |
68906f6e40 | ||
![]() |
2cf3cf15e3 | ||
![]() |
88202c1f7f | ||
![]() |
6293c787e7 | ||
![]() |
f67fda3bf4 | ||
![]() |
0a70f91bf1 | ||
![]() |
88945be5d7 | ||
![]() |
c81dd24fe7 | ||
![]() |
af94dd2757 | ||
![]() |
0a07738c5b | ||
![]() |
e05783a25a | ||
![]() |
27d4ab3967 | ||
![]() |
04b3efbbc2 | ||
![]() |
ccd5347be2 | ||
![]() |
e1c5f3ed6d | ||
![]() |
c1fb41204c | ||
![]() |
b50733054f | ||
![]() |
e324773c91 | ||
![]() |
6a4c34d5df | ||
![]() |
bc34b9f176 | ||
![]() |
96af05fbef | ||
![]() |
842d9e79ce | ||
![]() |
086d8b32e9 | ||
![]() |
a6390f2bc5 | ||
![]() |
1ab0827ae7 | ||
![]() |
db0f651f33 | ||
![]() |
7f163c3945 | ||
![]() |
cb53867b37 | ||
![]() |
b5b907c9ed | ||
![]() |
2f8ef4aec2 | ||
![]() |
e5929c850c | ||
![]() |
86771a87c6 | ||
![]() |
5df131140f | ||
![]() |
8002483e68 | ||
![]() |
ce84264490 | ||
![]() |
fca6ac0dbc | ||
![]() |
da61eb8988 | ||
![]() |
ef22d43f46 | ||
![]() |
f63f1361ce | ||
![]() |
547c9174b1 | ||
![]() |
cb292bbf06 | ||
![]() |
784c41b83a | ||
![]() |
42fbe9270a | ||
![]() |
8067f1948e | ||
![]() |
143cc6e8d0 | ||
![]() |
628ab0ca82 | ||
![]() |
cc13d7edf6 | ||
![]() |
6ea2c18384 | ||
![]() |
fb316d9068 | ||
![]() |
fda730dcad | ||
![]() |
8d921202fa | ||
![]() |
615794a4bf | ||
![]() |
5eed9d7038 | ||
![]() |
e6b135e151 | ||
![]() |
dbde3b469a | ||
![]() |
7841bcab06 | ||
![]() |
efe1346d41 | ||
![]() |
f162902b36 | ||
![]() |
a752683965 | ||
![]() |
683bd6e2d4 | ||
![]() |
13426fe7ec | ||
![]() |
d87d0f87b1 | ||
![]() |
85ec169755 | ||
![]() |
9cc40144a9 | ||
![]() |
42beb6018e | ||
![]() |
2d0e82159d | ||
![]() |
08ad94a2f5 | ||
![]() |
0eebea0ef7 | ||
![]() |
e4888b83d8 | ||
![]() |
37f8066901 | ||
![]() |
92f976916f | ||
![]() |
530ad7ecf5 | ||
![]() |
c1bc750059 | ||
![]() |
364061fde0 | ||
![]() |
1b4826f966 | ||
![]() |
580eacdb18 | ||
![]() |
270b8c9041 | ||
![]() |
9f7590783d | ||
![]() |
63dceed010 | ||
![]() |
ee3e0dd0e1 | ||
![]() |
e19d59c4ab | ||
![]() |
d29132a540 | ||
![]() |
0037811fb5 | ||
![]() |
1f1b8d0074 | ||
![]() |
dae6aeb4b5 | ||
![]() |
9bfb249425 | ||
![]() |
0bbcecc1c3 | ||
![]() |
a871e35449 | ||
![]() |
9961031b0e | ||
![]() |
c2d3214c01 | ||
![]() |
13e14f3e62 | ||
![]() |
ffe435051b | ||
![]() |
5e00b2ec33 | ||
![]() |
a73fbccd22 | ||
![]() |
48cdc3bb5e | ||
![]() |
535f71c18c | ||
![]() |
9ceeb71448 | ||
![]() |
457449866e | ||
![]() |
427428d09b | ||
![]() |
82b203c9c3 | ||
![]() |
9677c2deee | ||
![]() |
9000745877 | ||
![]() |
2fb413123c | ||
![]() |
6316b82600 | ||
![]() |
2746d797ee | ||
![]() |
7e5a7ad153 | ||
![]() |
e947059da1 | ||
![]() |
65aaaa3d77 | ||
![]() |
c2b2c94e1b | ||
![]() |
e8465f23b9 | ||
![]() |
09d37ab232 | ||
![]() |
f413355610 | ||
![]() |
5a97cd7dd2 |
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,7 +1,11 @@
|
||||
**Please use the search bar** at the top of the page and make sure you are not creating an already submitted issue. Duplicating issues makes it more difficult for everyone to follow. Your issue may have already been solved in the past as well.
|
||||
|
||||
Provide a description of the feature request or bug, the more details the better.
|
||||
If you are experiencing an issue with a tracker, a **full enhanced log must be included**. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting
|
||||
|
||||
If you are experiencing an issue with a tracker, then:
|
||||
1. Use your browser to check you can access the site directly, and if a login is required, check you can login and that you do not have any outstanding account issues.
|
||||
2. If you haven't already, try upgrading to the latest version of Jackett, your issue may have already been resolved.
|
||||
3. If it is still not working for you, then a **full enhanced log must be included**. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting
|
||||
|
||||
**Jackett version**:
|
||||
**Mono version** (if not using Windows):
|
||||
|
BIN
.github/cookies-chrome.png
vendored
Normal file
BIN
.github/cookies-chrome.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 480 KiB |
BIN
.github/cookies-firefox.png
vendored
Normal file
BIN
.github/cookies-firefox.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 439 KiB |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -200,3 +200,4 @@ FakesAssemblies/
|
||||
/TestResults
|
||||
*.DS_Store
|
||||
.idea/
|
||||
launchSettings.json
|
||||
|
@@ -2,8 +2,8 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Jackett"
|
||||
#define MyAppVersion GetFileVersion("BuildOutput\FullFramework\Windows\Jackett\Jackett.Common.dll")
|
||||
#define MyAppPublisher "Jackett Inc."
|
||||
#define MyAppVersion GetFileVersion(MyFileForVersion)
|
||||
#define MyAppPublisher "Jackett"
|
||||
#define MyAppURL "https://github.com/Jackett/Jackett"
|
||||
#define MyAppExeName "JackettTray.exe"
|
||||
|
||||
@@ -22,9 +22,11 @@ AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={pf}\{#MyAppName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
DisableProgramGroupPage=yes
|
||||
OutputBaseFilename=Jackett.Installer.Windows
|
||||
SetupIconFile=src\Jackett.Console\jackett.ico
|
||||
UninstallDisplayIcon={commonappdata}\Jackett\JackettConsole.exe
|
||||
OutputBaseFilename={#MyOutputFilename}
|
||||
SetupIconFile=src\Jackett.Tray\jackett.ico
|
||||
UninstallDisplayIcon={commonappdata}\Jackett\{#MyAppExeName}
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
UninstallDisplayName={#MyAppName}
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
DisableDirPage=yes
|
||||
@@ -37,9 +39,7 @@ Name: "windowsService"; Description: "Install as a Windows Service"
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "BuildOutput\FullFramework\Windows\Jackett\JackettTray.exe"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion
|
||||
Source: "BuildOutput\FullFramework\Windows\Jackett\JackettUpdater.exe"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion
|
||||
Source: "BuildOutput\FullFramework\Windows\Jackett\*"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "{#MySourceFolder}\*"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
@@ -48,16 +48,15 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated runhidden;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--ReserveUrls"; Flags: waituntilterminated runhidden;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Install"; Flags: waituntilterminated runhidden; Tasks: windowsService
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Start"; Flags: waituntilterminated runhidden; Tasks: windowsService
|
||||
Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Run]
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--ReserveUrls"; Flags: waituntilterminated;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--MigrateSettings"; Flags: waituntilterminated;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Install"; Flags: waituntilterminated; Tasks: windowsService
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Start"; Flags: waituntilterminated; Tasks: windowsService
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated skipifdoesntexist
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated skipifdoesntexist runhidden
|
||||
Filename: "{sys}\taskkill.exe"; Parameters: "/f /im {#MyAppExeName}"; Flags: waituntilterminated skipifdoesntexist runhidden
|
||||
Filename: "{sys}\taskkill.exe"; Parameters: "/f /im JackettConsole.exe"; Flags: waituntilterminated skipifdoesntexist runhidden
|
||||
|
||||
|
||||
|
186
README.md
186
README.md
@@ -2,7 +2,6 @@
|
||||
|
||||
[](https://github.com/Jackett/Jackett/issues)
|
||||
[](https://github.com/Jackett/Jackett/pulls)
|
||||
[](https://www.bountysource.com/teams/jackett)
|
||||
[](https://ci.appveyor.com/project/Jackett/jackett)
|
||||
[](https://github.com/Jackett/Jackett/releases/latest)
|
||||
[](https://hub.docker.com/r/linuxserver/jackett/)
|
||||
@@ -10,65 +9,75 @@
|
||||
|
||||
This project is a new fork and is recruiting development help. If you are able to help out please contact us.
|
||||
|
||||
Jackett works as a proxy server: it translates queries from apps ([Sonarr](https://github.com/Sonarr/Sonarr), [Radarr](https://github.com/Radarr/Radarr), [SickRage](https://sickrage.github.io/), [CouchPotato](https://couchpota.to/), [Mylar](https://github.com/evilhero/mylar), [DuckieTV](https://github.com/SchizoDuckie/DuckieTV), etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
|
||||
Jackett works as a proxy server: it translates queries from apps ([Sonarr](https://github.com/Sonarr/Sonarr), [Radarr](https://github.com/Radarr/Radarr), [SickRage](https://sickrage.github.io/), [CouchPotato](https://couchpota.to/), [Mylar](https://github.com/evilhero/mylar), [DuckieTV](https://github.com/SchizoDuckie/DuckieTV), [qBittorrent](https://www.qbittorrent.org/), etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
|
||||
|
||||
Developer note: The software implements the [Torznab](https://github.com/Sonarr/Sonarr/wiki/Implementing-a-Torznab-indexer) (with [nZEDb](https://github.com/nZEDb/nZEDb/blob/dev/docs/newznab_api_specification.txt) category numbering) and [TorrentPotato](https://github.com/RuudBurger/CouchPotatoServer/wiki/Couchpotato-torrent-provider) APIs.
|
||||
|
||||
|
||||
|
||||
#### Supported Systems
|
||||
* Windows using .NET 4.5.2 [Download here](https://www.microsoft.com/net/framework/versions/net452).
|
||||
* Linux and macOS using Mono 4.6.0 and above. [Download here](http://www.mono-project.com/download/). Earlier versions of mono may work but some trackers may fail to negotiate SSL correctly, and others may cause Jackett to crash when used.
|
||||
* Windows using .NET 4.6.1 or above [Download here](https://www.microsoft.com/net/framework/versions/net461).
|
||||
* Linux and macOS using Mono 5.8 or above. [Download here](http://www.mono-project.com/download/).
|
||||
|
||||
### Supported Public Trackers
|
||||
* 1337x
|
||||
* Anidex
|
||||
* Anime Tosho
|
||||
* AniRena
|
||||
* AudioBookBay
|
||||
* BTstor.net
|
||||
* btbit
|
||||
* BTDB
|
||||
* BT-Scene
|
||||
* cpasbien
|
||||
* ETTV
|
||||
* EliteTorrent.biz
|
||||
* ExtraTorrent.ag
|
||||
* EZTV
|
||||
* Frozen Layer
|
||||
* GkTorrent
|
||||
* Horrible Subs
|
||||
* Idope
|
||||
* IdopeClone
|
||||
* Il Corsaro Nero <!-- maintained by bonny1992 -->
|
||||
* Il Corsaro Blu
|
||||
* Isohunt2
|
||||
* KATcrs
|
||||
* KickAssTorrent
|
||||
* KickAssTorrent (thekat.se clone)
|
||||
* LimeTorrents
|
||||
* MagnetDL
|
||||
* NextTorrent
|
||||
* MejorTorrent <!-- maintained by ivandelabeldad -->
|
||||
* Newpct (aka: tvsinpagar, descargas2020, torrentlocura, torrentrapid, etc)
|
||||
* Nyaa.si
|
||||
* Nyaa-Pantsu
|
||||
* Nyoo
|
||||
* ProStyleX
|
||||
* RARBG
|
||||
* RuTor
|
||||
* ShowRSS
|
||||
* SkyTorrentsClone
|
||||
* sukebei.Nyaa.si
|
||||
* sukebei-Pantsu
|
||||
* The Pirate Bay
|
||||
* TNTVillage <!-- maintained by bonny1992 -->
|
||||
* Tokyo Toshokan
|
||||
* Torlock
|
||||
* TorrentCouch
|
||||
* Torrent Downloads
|
||||
* TorrentGalaxy.org
|
||||
* Torrent9
|
||||
* TorrentKim
|
||||
* Torernt9 clone (torrents9.ch)
|
||||
* Torrentz2
|
||||
* World Wide Torrents
|
||||
* YIFY (YTS)
|
||||
* YTS.ag
|
||||
* Zooqle
|
||||
|
||||
### Supported Semi-Private Trackers
|
||||
* 7tor
|
||||
* ArenaBG
|
||||
* CzTorrent
|
||||
* Deildu
|
||||
* Gay-Torrents.net
|
||||
* Gay-Torrents.org
|
||||
* Kinozal
|
||||
* LostFilm.tv
|
||||
* Mega-Bliz
|
||||
@@ -78,6 +87,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Newstudio
|
||||
* NetHD
|
||||
* NoName Club
|
||||
* RockBox
|
||||
* RuTracker
|
||||
* SkTorrent
|
||||
* Union Fansub
|
||||
@@ -88,27 +98,28 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
### Supported Private Trackers
|
||||
* 2 Fast 4 You
|
||||
* 3D Torrents
|
||||
* 720pier
|
||||
* Abnormal
|
||||
* Acid-Lounge
|
||||
* AlphaRatio
|
||||
* Andraste
|
||||
* AlphaRatio (AR)
|
||||
* AnimeBytes
|
||||
* AnimeTorrents
|
||||
* AnimeTorrents (AnT)
|
||||
* Anthelion (was TehConnection.me)
|
||||
* AOX
|
||||
* Apollo (XANAX)
|
||||
* ArabaFenice
|
||||
* Arche Torrent
|
||||
* AsianDVDClub
|
||||
* AST4u
|
||||
* Audiobook Torrents
|
||||
* Awesome-HD
|
||||
* Avistaz
|
||||
* Awesome-HD (AHD)
|
||||
* Avistaz (AsiaTorrents)
|
||||
* B2S-Share
|
||||
* Back-ups
|
||||
* BakaBT [![(invite needed)][inviteneeded]](#)
|
||||
* bB
|
||||
* BeyondHD
|
||||
* BeyondHD (BHD)
|
||||
* BIGTorrent
|
||||
* BigTower
|
||||
* Bit-City Reloaded
|
||||
* BIT-HDTV
|
||||
* Bithorlo
|
||||
@@ -120,110 +131,124 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* BitTorrentFiles [![(invite needed)][inviteneeded]](#)
|
||||
* BJ-Share
|
||||
* BlueBird
|
||||
* Blutopia
|
||||
* Blutopia (BLU)
|
||||
* Brasil Tracker
|
||||
* BroadcastTheNet
|
||||
* BroadcastTheNet (BTN)
|
||||
* BrokenStones
|
||||
* BTNext
|
||||
* BTGigs
|
||||
* BTNext (BTNT)
|
||||
* BTXpress (BTX)
|
||||
* Carpathians
|
||||
* CCFBits
|
||||
* CGPeers
|
||||
* CHDBits
|
||||
* Cinematik
|
||||
* Cinemageddon
|
||||
* CinemaZ
|
||||
* CinemaZ (EuTorrents)
|
||||
* Classix
|
||||
* DanishBits
|
||||
* DataScene
|
||||
* Demonoid
|
||||
* Diablo Torrent
|
||||
* DigitalHive
|
||||
* Downloadville
|
||||
* Dragonworld Reloaded
|
||||
* Dream Team
|
||||
* DXDHD
|
||||
* EliteHD [![(invite needed)][inviteneeded]](#)
|
||||
* Elit Tracker
|
||||
* Elite-Tracker
|
||||
* Empornium
|
||||
* EoT-Forum
|
||||
* Empornium (EMP)
|
||||
* eStone
|
||||
* Ethor.net (Thor's Land)
|
||||
* FANO.IN
|
||||
* FileList
|
||||
* FileList (FL)
|
||||
* Femdomcult
|
||||
* Freedom-HD
|
||||
* FullMixMusic
|
||||
* FunFile
|
||||
* FunkyTorrents
|
||||
* FunkyTorrents (FT)
|
||||
* Fuzer
|
||||
* GayTorrent.ru
|
||||
* GazelleGames
|
||||
* GFTracker
|
||||
* GAYtorrent.ru
|
||||
* GazelleGames (GGn)
|
||||
* Gfxnews
|
||||
* GFXPeers
|
||||
* GigaTorrents
|
||||
* GimmePeers <!-- maintained by jamesb2147 -->
|
||||
* GODS [![(invite needed)][inviteneeded]](#)
|
||||
* Girotottent
|
||||
* GODS
|
||||
* Greek Team
|
||||
* HacheDe
|
||||
* Hardbay
|
||||
* HD-Forever
|
||||
* HD-Only
|
||||
* HD-Space
|
||||
* HD-Torrents
|
||||
* HD4Free (HD4)
|
||||
* HD-Forever (HDF)
|
||||
* HD-Only (HDO)
|
||||
* HD-Space (HDS)
|
||||
* HD-Spain
|
||||
* HD-Torrents (HDT)
|
||||
* HD-Bits.com
|
||||
* HDBits
|
||||
* HDChina
|
||||
* HDCity
|
||||
* HDHome
|
||||
* HDHome (HDBigger)
|
||||
* HDME
|
||||
* HDSky
|
||||
* HDTorrents.it
|
||||
* Hebits
|
||||
* Hon3y HD
|
||||
* HQSource
|
||||
* Hyperay
|
||||
* ICE Torrent
|
||||
* I Love Classics
|
||||
* Immortalseed
|
||||
* inPeril
|
||||
* Insane Tracker
|
||||
* IPTorrents
|
||||
* IPTorrents (IPT)
|
||||
* JPopsuki
|
||||
* Kapaki
|
||||
* Karagarga
|
||||
* LinkoManija
|
||||
* LosslessClub
|
||||
* M-Team - TP
|
||||
* Magico
|
||||
* M-Team (TP)
|
||||
* Magico (Trellas)
|
||||
* Majomparádé
|
||||
* Manicomio Share
|
||||
* Mononoké-BT
|
||||
* MoreThanTV
|
||||
* MoreThanTV (MTV)
|
||||
* MyAnonamouse
|
||||
* myAmity
|
||||
* MySpleen
|
||||
* NCore
|
||||
* Nebulance
|
||||
* Nebulance (NBL)
|
||||
* New Real World
|
||||
* Norbits <!-- added by DiseaseNO but no longer maintained? -->
|
||||
* NordicBits (NB)
|
||||
* Norbits
|
||||
* notwhat.cd
|
||||
* Orpheus
|
||||
* Ourbits
|
||||
* Passione Torrent <!-- maintained by bonny1992 -->
|
||||
* PassThePopcorn [![(invite needed)][inviteneeded]](#)
|
||||
* PassThePopcorn (PTP)
|
||||
* PirateTheNet
|
||||
* PiXELHD
|
||||
* PolishSource
|
||||
* PolishTracker
|
||||
* Pretome
|
||||
* PrivateHD
|
||||
* PrivateHD (PHD)
|
||||
* Psytorrents
|
||||
* PTFiles
|
||||
* PuntoTorrent
|
||||
* Racing4Everyone (R4E)
|
||||
* Redacted (PassTheHeadphones)
|
||||
* Red Star Torrent
|
||||
* Redtopia (RED)
|
||||
* RetroFlix
|
||||
* RevolutionTT
|
||||
* RGU
|
||||
* RoDVD
|
||||
* Romanian Metal Torrent
|
||||
* SceneFZ
|
||||
* SceneHD
|
||||
* SceneReactor
|
||||
* SceneRush
|
||||
* SceneTime
|
||||
* SDBits
|
||||
* Secret Cinema
|
||||
@@ -237,18 +262,16 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* SportsCult
|
||||
* SportHD
|
||||
* Superbits
|
||||
* Synthesiz3r
|
||||
* Tasmanit
|
||||
* TBPlus
|
||||
* TehConnection
|
||||
* TenYardTracker
|
||||
* The Empire
|
||||
* The Geeks
|
||||
* The Horror Charnel
|
||||
* The Horror Charnel (THC)
|
||||
* The Occult
|
||||
* The New Retro
|
||||
* The Place
|
||||
* The Shinning
|
||||
* The Shinning (TsH)
|
||||
* The Show
|
||||
* The Vault
|
||||
* The-Torrents
|
||||
@@ -264,11 +287,11 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* TorrentHR
|
||||
* Torrenting
|
||||
* Torrentland
|
||||
* TorrentLeech
|
||||
* TorrentLeech (TL)
|
||||
* Torrents.Md
|
||||
* TorrentSeeds
|
||||
* TorrentSeeds (TS)
|
||||
* Torrent-Syndikat
|
||||
* TorrentWTF
|
||||
* TOrrent-tuRK (TORK)
|
||||
* TorViet
|
||||
* ToTheGlory
|
||||
* TranceTraffic
|
||||
@@ -280,12 +303,12 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Ultimate Gamer Club
|
||||
* Waffles
|
||||
* World-In-HD
|
||||
* WorldOfP2P
|
||||
* x264
|
||||
* WorldOfP2P (WOP)
|
||||
* x-ite.me (XM)
|
||||
* xBytesV2
|
||||
* XSpeeds
|
||||
* Xthor
|
||||
* Your Exotic Torrents
|
||||
* ExoticaZ (Your Exotic Torrents)
|
||||
* Zamunda.net
|
||||
* Zelka.org
|
||||
|
||||
@@ -316,7 +339,7 @@ When installed as a service the tray icon acts as a way to open/start/stop Jacke
|
||||
Jackett can also be run from the command line if you would like to see log messages (Ensure the server isn't already running from the tray/service). This can be done by using "JackettConsole.exe" (for Command Prompt), found in the Jackett data folder: "%ProgramData%\Jackett".
|
||||
|
||||
## Installation on Linux
|
||||
1. Install [Mono 4.6](http://www.mono-project.com/download/#download-lin) or better (using the latest stable release for your distribution is recommended)
|
||||
1. Install [Mono 5.8](http://www.mono-project.com/download/#download-lin) or better (using the latest stable release is recommended)
|
||||
* Follow the instructions on the mono website and install the `mono-devel` and the `ca-certificates-mono` packages.
|
||||
* On Red Hat/CentOS/openSUSE/Fedora the `mono-locale-extras` package is also required.
|
||||
2. Install libcurl:
|
||||
@@ -329,10 +352,26 @@ Detailed instructions for [Ubuntu 14.x](http://www.htpcguides.com/install-jacket
|
||||
|
||||
If you want to run it with a user without a /home directory you need to add `Environment=XDG_CONFIG_HOME=/path/to/folder` to your systemd file, this folder will be used to store your config files.
|
||||
|
||||
Mono must be compiled with the Roslyn compiler (default), using MCS will cause "An error has occurred." errors (See https://github.com/Jackett/Jackett/issues/2704).
|
||||
|
||||
### Install as service
|
||||
1. Install Jackett with the steps from above.
|
||||
2. Open the Terminal and run `sudo ./install_service_systemd.sh` You need root permissions to install the service.
|
||||
2. If the installation was a success, you can close the Terminal window.
|
||||
|
||||
The service will start on each logon. You can always stop it by running `systemctl stop jackett.service` from Terminal. You can start it again it using `systemctl start jackett.service`.
|
||||
Logs are stored as usual under `~/.config/Jackett/log.txt` and also in `journalctl -u jackett.service`.
|
||||
|
||||
### Installation on Linux via Ansible
|
||||
|
||||
On a RHEL/Centos 7 system: [linuxhq.jackett](https://galaxy.ansible.com/linuxhq/jackett)
|
||||
|
||||
On an Ubuntu 16 system: [chrisjohnson00.jackett](https://galaxy.ansible.com/chrisjohnson00/jackett)
|
||||
|
||||
## Installation on macOS
|
||||
|
||||
### Prerequisites
|
||||
Install [Mono 4.6](http://www.mono-project.com/download/#download-mac) or better (using the latest pkg installer is recommended).
|
||||
Install [Mono 5.8](http://www.mono-project.com/download/#download-mac) or better (using the latest pkg installer is recommended).
|
||||
* Setup ssl support by running `curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin`
|
||||
|
||||
### Install as service
|
||||
@@ -365,6 +404,18 @@ Example config for apache:
|
||||
</Location>
|
||||
```
|
||||
|
||||
Example config for nginx:
|
||||
```
|
||||
location /jackett {
|
||||
proxy_pass http://127.0.0.1:9117;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* __Command line switches__
|
||||
@@ -398,10 +449,29 @@ All contributions are welcome just send a pull request. Jackett's framework all
|
||||
## Building from source
|
||||
|
||||
### Windows
|
||||
* Open the Jackett solution in Visual Studio 2017
|
||||
* Select Jackett.Console as startup project
|
||||
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
|
||||
* Open the Jackett solution in Visual Studio 2017 (version 15.7 or above)
|
||||
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
|
||||
* Select Jackett.Server as startup project
|
||||
* In the drop down menu of the run button select "Jackett.Server" instead of "IIS Express"
|
||||
* Build/Start the project
|
||||
|
||||
### OSX
|
||||
NOTE: msbuild is included in the mono release.
|
||||
* Install Homebrew https://brew.sh
|
||||
* open terminal
|
||||
* brew install nuget mono
|
||||
* git clone https://github.com/Jackett/Jackett.git
|
||||
* cd Jackett/src
|
||||
* nuget restore Jackett.sln
|
||||
|
||||
NOTE: if you get the error "NU1102: Unable to find package Microsoft.AspNetCore with version (>= 2.1.2)" while restoring packages, you'll need to install it manually.https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.302-macos-x64-installer then delete the entire project directory and restart from a new clone
|
||||
|
||||
* msbuild Jackett.Server/Jackett.Server.csproj /t:Build /p:Configuration=Debug
|
||||
* curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin
|
||||
* mono Jackett.Server/bin/Debug/JackettServer.exe
|
||||
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
@@ -409,8 +479,8 @@ sudo apt install mono-complete nuget msbuild # install build tools (debian/ubunt
|
||||
git clone https://github.com/Jackett/Jackett.git
|
||||
cd Jackett/src
|
||||
nuget restore Jackett.sln # prepare dependencies
|
||||
msbuild Jackett.Console/Jackett.Console.csproj /t:Build /p:Configuration=Debug # compile
|
||||
mono Jackett.Console/bin/Debug/JackettConsole.exe # run jackett
|
||||
msbuild Jackett.Server/Jackett.Server.csproj /t:Build /p:Configuration=Debug # compile
|
||||
mono Jackett.Server/bin/Debug/JackettServer.exe # run jackett
|
||||
```
|
||||
|
||||
## Screenshots
|
||||
|
@@ -1,4 +1,4 @@
|
||||
version: 0.8.{build}
|
||||
version: 0.10.{build}
|
||||
skip_tags: true
|
||||
image: Visual Studio 2017
|
||||
configuration: Release
|
||||
@@ -27,6 +27,7 @@ deploy:
|
||||
description: $(release_description)
|
||||
auth_token:
|
||||
secure: hOg+16YTIbq4kO9u4D1YVOTbWDqgCX6mAQYMbnmBBSw2CiUsZh7OKbupoUb3FtWa
|
||||
artifact: /^(?:(?![Ee]xperimental).)*$/
|
||||
draft: true
|
||||
on:
|
||||
branch: master
|
||||
|
165
build.cake
165
build.cake
@@ -6,7 +6,7 @@
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var target = Argument("target", "Default");
|
||||
var configuration = Argument("configuration", "Release");
|
||||
var configuration = Argument("configuration", "Debug");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// PREPARATION
|
||||
@@ -17,9 +17,6 @@ var workingDir = MakeAbsolute(Directory("./"));
|
||||
var artifactsDirName = "Artifacts";
|
||||
var testResultsDirName = "TestResults";
|
||||
|
||||
var windowsBuildFullFramework = "./BuildOutput/FullFramework/Windows";
|
||||
var monoBuildFullFramework = "./BuildOutput/FullFramework/Mono";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASKS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -36,8 +33,8 @@ Task("Clean")
|
||||
.IsDependentOn("Info")
|
||||
.Does(() =>
|
||||
{
|
||||
CleanDirectories("./src/**/obj" + configuration);
|
||||
CleanDirectories("./src/**/bin" + configuration);
|
||||
CleanDirectories("./src/**/obj");
|
||||
CleanDirectories("./src/**/bin");
|
||||
CleanDirectories("./BuildOutput");
|
||||
CleanDirectories("./" + artifactsDirName);
|
||||
CleanDirectories("./" + testResultsDirName);
|
||||
@@ -45,22 +42,21 @@ Task("Clean")
|
||||
Information("Clean completed");
|
||||
});
|
||||
|
||||
Task("Restore-NuGet-Packages")
|
||||
Task("Build-Full-Framework")
|
||||
.IsDependentOn("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
NuGetRestore("./src/Jackett.sln");
|
||||
});
|
||||
|
||||
Task("Build")
|
||||
.IsDependentOn("Restore-NuGet-Packages")
|
||||
.Does(() =>
|
||||
{
|
||||
MSBuild("./src/Jackett.sln", settings => settings.SetConfiguration(configuration));
|
||||
var buildSettings = new MSBuildSettings()
|
||||
.SetConfiguration(configuration)
|
||||
.UseToolVersion(MSBuildToolVersion.VS2017);
|
||||
|
||||
MSBuild("./src/Jackett.sln", buildSettings);
|
||||
});
|
||||
|
||||
Task("Run-Unit-Tests")
|
||||
.IsDependentOn("Build")
|
||||
.IsDependentOn("Build-Full-Framework")
|
||||
.Does(() =>
|
||||
{
|
||||
CreateDirectory("./" + testResultsDirName);
|
||||
@@ -77,31 +73,8 @@ Task("Run-Unit-Tests")
|
||||
}
|
||||
});
|
||||
|
||||
Task("Copy-Files-Full-Framework")
|
||||
.IsDependentOn("Run-Unit-Tests")
|
||||
.Does(() =>
|
||||
{
|
||||
var windowsOutput = windowsBuildFullFramework + "/Jackett";
|
||||
|
||||
CopyDirectory("./src/Jackett.Console/bin/" + configuration, windowsOutput);
|
||||
CopyFiles("./src/Jackett.Service/bin/" + configuration + "/JackettService.*", windowsOutput);
|
||||
CopyFiles("./src/Jackett.Tray/bin/" + configuration + "/JackettTray.*", windowsOutput);
|
||||
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/JackettUpdater.*", windowsOutput);
|
||||
CopyFiles("./Upstart.config", windowsOutput);
|
||||
CopyFiles("./LICENSE", windowsOutput);
|
||||
CopyFiles("./README.md", windowsOutput);
|
||||
|
||||
var monoOutput = monoBuildFullFramework + "/Jackett";
|
||||
|
||||
CopyDirectory(windowsBuildFullFramework, monoBuildFullFramework);
|
||||
DeleteFiles(monoOutput + "/JackettService.*");
|
||||
DeleteFiles(monoOutput + "/JackettTray.*");
|
||||
|
||||
Information("Full framework file copy completed");
|
||||
});
|
||||
|
||||
Task("Check-Packaging-Platform")
|
||||
.IsDependentOn("Copy-Files-Full-Framework")
|
||||
.IsDependentOn("Run-Unit-Tests")
|
||||
.Does(() =>
|
||||
{
|
||||
if (IsRunningOnWindows())
|
||||
@@ -115,49 +88,92 @@ Task("Check-Packaging-Platform")
|
||||
}
|
||||
});
|
||||
|
||||
Task("Package-Windows-Installer-Full-Framework")
|
||||
Task("Package-Windows-Full-Framework")
|
||||
.IsDependentOn("Check-Packaging-Platform")
|
||||
.Does(() =>
|
||||
{
|
||||
InnoSetup("./Installer.iss", new InnoSetupSettings {
|
||||
OutputDirectory = workingDir + "/" + artifactsDirName
|
||||
});
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = "./BuildOutput/Experimental/net461/win7-x86/Jackett";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "net461", "win7-x86");
|
||||
|
||||
CopyFiles("./src/Jackett.Service/bin/" + configuration + "/JackettService.*", buildOutputPath);
|
||||
CopyFiles("./src/Jackett.Tray/bin/" + configuration + "/JackettTray.*", buildOutputPath);
|
||||
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath); //builds against multiple frameworks
|
||||
|
||||
Zip("./BuildOutput/Experimental/net461/win7-x86", $"./{artifactsDirName}/Jackett.Binaries.Windows.zip");
|
||||
|
||||
//InnoSetup
|
||||
string sourceFolder = MakeAbsolute(Directory(buildOutputPath)).ToString();
|
||||
|
||||
InnoSetupSettings settings = new InnoSetupSettings();
|
||||
settings.OutputDirectory = workingDir + "/" + artifactsDirName;
|
||||
settings.Defines = new Dictionary<string, string>
|
||||
{
|
||||
{ "MyFileForVersion", sourceFolder + "/Jackett.Common.dll" },
|
||||
{ "MySourceFolder", sourceFolder },
|
||||
{ "MyOutputFilename", "Jackett.Installer.Windows" },
|
||||
};
|
||||
|
||||
InnoSetup("./Installer.iss", settings);
|
||||
});
|
||||
|
||||
Task("Package-Files-Full-Framework-Windows")
|
||||
Task("Package-Mono-Full-Framework")
|
||||
.IsDependentOn("Check-Packaging-Platform")
|
||||
.Does(() =>
|
||||
{
|
||||
Zip(windowsBuildFullFramework, $"./{artifactsDirName}/Jackett.Binaries.Windows.zip");
|
||||
Information(@"Full Framework Windows Binaries Zipping Completed");
|
||||
});
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = "./BuildOutput/Experimental/net461/linux-x64/Jackett";
|
||||
|
||||
Task("Package-Files-Full-Framework-Mono")
|
||||
DotNetCorePublish(serverProjectPath, "net461", "linux-x64");
|
||||
|
||||
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath); //builds against multiple frameworks
|
||||
|
||||
//There is an issue with Mono 5.8 (fixed in Mono 5.12) where its expecting to use its own patched version of System.Net.Http.dll, instead of the version supplied in folder
|
||||
//https://github.com/dotnet/corefx/issues/19914
|
||||
//https://bugzilla.xamarin.com/show_bug.cgi?id=60315
|
||||
//The workaround is to delete System.Net.Http.dll and patch the .exe.config file
|
||||
|
||||
DeleteFile(buildOutputPath + "/System.Net.Http.dll");
|
||||
|
||||
var configFile = File(buildOutputPath + "/JackettConsole.exe.config");
|
||||
XmlPoke(configFile, "configuration/runtime/*[name()='assemblyBinding']/*[name()='dependentAssembly']/*[name()='assemblyIdentity'][@name='System.Net.Http']/../*[name()='bindingRedirect']/@newVersion", "4.0.0.0");
|
||||
|
||||
//Mono on FreeBSD doesn't like the bundled System.Runtime.InteropServices.RuntimeInformation
|
||||
//https://github.com/dotnet/corefx/issues/23989
|
||||
//https://github.com/Jackett/Jackett/issues/3547
|
||||
|
||||
DeleteFile(buildOutputPath + "/System.Runtime.InteropServices.RuntimeInformation.dll");
|
||||
|
||||
Gzip("./BuildOutput/Experimental/net461/linux-x64", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.Mono.tar.gz");
|
||||
});
|
||||
|
||||
Task("Experimental-DotNetCore")
|
||||
.IsDependentOn("Check-Packaging-Platform")
|
||||
.Does(() =>
|
||||
{
|
||||
var cygMonoBuildPath = RelativeWinPathToCygPath(monoBuildFullFramework);
|
||||
var tarFileName = "Jackett.Binaries.Mono.tar";
|
||||
var tarArguments = @"-cvf " + cygMonoBuildPath + "/" + tarFileName + " -C " + cygMonoBuildPath + " Jackett --mode ='755'";
|
||||
var gzipArguments = @"-k " + cygMonoBuildPath + "/" + tarFileName;
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "win-x86");
|
||||
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "linux-x64");
|
||||
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "osx-x64");
|
||||
|
||||
RunCygwinCommand("Tar", tarArguments);
|
||||
RunCygwinCommand("Gzip", gzipArguments);
|
||||
|
||||
MoveFile($"{monoBuildFullFramework}/{tarFileName}.gz", $"./{artifactsDirName}/{tarFileName}.gz");
|
||||
Zip("./BuildOutput/Experimental/netcoreapp2.1/win-x86", $"./{artifactsDirName}/Experimental.netcoreapp.win-x86.zip");
|
||||
Zip("./BuildOutput/Experimental/netcoreapp2.1/osx-x64", $"./{artifactsDirName}/Experimental.netcoreapp.osx-x64.zip");
|
||||
Gzip("./BuildOutput/Experimental/netcoreapp2.1/linux-x64", $"./{artifactsDirName}", "Jackett", "Experimental.netcoreapp.linux-x64.tar.gz");
|
||||
});
|
||||
|
||||
Task("Package-Full-Framework")
|
||||
.IsDependentOn("Package-Windows-Installer-Full-Framework")
|
||||
.IsDependentOn("Package-Files-Full-Framework-Windows")
|
||||
.IsDependentOn("Package-Files-Full-Framework-Mono")
|
||||
Task("Package")
|
||||
.IsDependentOn("Package-Windows-Full-Framework")
|
||||
.IsDependentOn("Package-Mono-Full-Framework")
|
||||
//.IsDependentOn("Experimental-DotNetCore")
|
||||
.Does(() =>
|
||||
{
|
||||
Information("Full Framwork Packaging Completed");
|
||||
Information("Packaging completed");
|
||||
});
|
||||
|
||||
Task("Appveyor-Push-Artifacts")
|
||||
.IsDependentOn("Package-Full-Framework")
|
||||
.IsDependentOn("Package")
|
||||
.Does(() =>
|
||||
{
|
||||
if (AppVeyor.IsRunningOnAppVeyor)
|
||||
@@ -263,10 +279,35 @@ private void RunCygwinCommand(string utility, string utilityArguments)
|
||||
private string RelativeWinPathToCygPath(string relativePath)
|
||||
{
|
||||
var cygdriveBase = "/cygdrive/" + workingDir.ToString().Replace(":", "").Replace("\\", "/");
|
||||
var cygPath = cygdriveBase + relativePath.Replace(".", "");
|
||||
var cygPath = cygdriveBase + relativePath.TrimStart('.');
|
||||
return cygPath;
|
||||
}
|
||||
|
||||
private void Gzip(string sourceFolder, string outputDirectory, string tarCdirectoryOption, string outputFileName)
|
||||
{
|
||||
var cygSourcePath = RelativeWinPathToCygPath(sourceFolder);
|
||||
var tarFileName = outputFileName.Remove(outputFileName.Length - 3, 3);
|
||||
var tarArguments = @"-cvf " + cygSourcePath + "/" + tarFileName + " -C " + cygSourcePath + $" {tarCdirectoryOption} --mode ='755'";
|
||||
var gzipArguments = @"-k " + cygSourcePath + "/" + tarFileName;
|
||||
|
||||
RunCygwinCommand("Tar", tarArguments);
|
||||
RunCygwinCommand("Gzip", gzipArguments);
|
||||
|
||||
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
|
||||
}
|
||||
|
||||
private void DotNetCorePublish(string projectPath, string framework, string runtime)
|
||||
{
|
||||
var settings = new DotNetCorePublishSettings
|
||||
{
|
||||
Framework = framework,
|
||||
Runtime = runtime,
|
||||
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
|
||||
};
|
||||
|
||||
DotNetCorePublish(projectPath, settings);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
79
install_service_systemd.sh
Executable file
79
install_service_systemd.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Setting up colors
|
||||
BOLDRED="$(printf '\033[1;31m')"
|
||||
BOLDGREEN="$(printf '\033[1;32m')"
|
||||
NC="$(printf '\033[0m')" # No Color
|
||||
|
||||
# Stop and unload the service if it's running
|
||||
jackettservice="jackett.service"
|
||||
systemctl stop ${jackettservice}
|
||||
|
||||
# Move working directory to Jackett's
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Check if we're running from Jackett's directory
|
||||
if [ ! -f ./JackettConsole.exe ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Couldn't locate JackettConsole.exe. Is the script in the right directory?"
|
||||
exit 1
|
||||
fi
|
||||
jackettdir="$(pwd)"
|
||||
|
||||
# Check if Jackett's owner is root
|
||||
jackettuser="$(stat -c "%U" ./JackettConsole.exe)"
|
||||
if [ "${jackettuser}" == "root" ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett shouldn't run as root. Please, change the owner of the Jackett directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if mono is installed
|
||||
command -v mono >/dev/null 2>&1 || { echo >&2 "${BOLDRED}ERROR${NC}: Jackett requires Mono but it's not installed. Aborting."; exit 1; }
|
||||
monodir="$(dirname $(command -v mono))"
|
||||
|
||||
# Check that no other service called Jackett is already running
|
||||
if [[ $(systemctl status ${jackettservice} | grep "active (running)") ]]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett already seems to be running as a service. Please stop it before running this script again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Write the systemd service descriptor
|
||||
cat >"/etc/systemd/system/${jackettservice}" <<EOL
|
||||
[Unit]
|
||||
Description=Jackett Daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
SyslogIdentifier=jackett
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Type=simple
|
||||
User=${jackettuser}
|
||||
Group=${jackettuser}
|
||||
WorkingDirectory=${jackettdir}
|
||||
ExecStart=${monodir}/mono --debug ${jackettdir}/JackettConsole.exe --NoRestart
|
||||
TimeoutStopSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
EOL
|
||||
|
||||
# Reload systemd daemon
|
||||
systemctl daemon-reload
|
||||
|
||||
# Run the service
|
||||
systemctl start ${jackettservice}
|
||||
|
||||
# Check that it's running
|
||||
if [[ $(systemctl status ${jackettservice} | grep "active (running)") ]]; then
|
||||
echo "${BOLDGREEN}Agent successfully installed and launched!${NC}"
|
||||
else
|
||||
cat << EOL
|
||||
${BOLDRED}ERROR${NC}: Could not launch service. The installation might have failed.
|
||||
Please open an issue on https://github.com/Jackett/Jackett/issues and paste following information:
|
||||
Mono directory: \`${monodir}\`
|
||||
Jackett directory: \`${jackettdir}\`
|
||||
Jackett user: \`${jackettuser}\`
|
||||
|
||||
EOL
|
||||
fi
|
@@ -1,244 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp.Callbacks
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when cURL has debug information for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Upload.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>infoType</term>
|
||||
/// <description>
|
||||
/// Type of debug information, see
|
||||
/// <see cref="CurlInfoType" />.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>message</term>
|
||||
/// <description>Debug information as a string.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>The size in bytes.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
public delegate void CurlDebugCallback(CurlInfoType infoType, String message, int size, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL has header data for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Headers.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>buf</term>
|
||||
/// <description>Header data from cURL to the client.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>Size of a character, in bytes.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>nmemb</term>
|
||||
/// <description>Number of characters.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return the number of bytes (not
|
||||
/// characters) processed. Usually this is <c>size * nmemb</c>.
|
||||
/// Return -1 to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlHeaderCallback(byte[] buf, int size, int nmemb, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL needs for the client to perform an
|
||||
/// IOCTL operation. An example might be when an FTP
|
||||
/// upload requires rewinding of the input file to deal
|
||||
/// with a resend occasioned by an error.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>cmd</term>
|
||||
/// <description>
|
||||
/// A <see cref="CurlIoCommand" />; for now, only
|
||||
/// <c>RestartRead</c> should be passed.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>
|
||||
/// Client-provided extra data; in the
|
||||
/// case of an FTP upload, it might be a
|
||||
/// <c>FileStream</c> object.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return a <see cref="CurlIoError" />,
|
||||
/// which should be <see cref="CurlIoError.Ok" /> if everything
|
||||
/// is okay.
|
||||
/// </remarks>
|
||||
public delegate CurlIoError CurlIoctlCallback(CurlIoCommand cmd, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL wants to report progress.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Upload.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>dlTotal</term>
|
||||
/// <description>Number of bytes to download.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>dlNow</term>
|
||||
/// <description>Number of bytes downloaded so far.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>ulTotal</term>
|
||||
/// <description>Number of bytes to upload.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>ulNow</term>
|
||||
/// <description>Number of bytes uploaded so far.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return 0 to continue, or a non-zero
|
||||
/// value to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlProgressCallback(Object extraData, double dlTotal, double dlNow,
|
||||
double ulTotal, double ulNow);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL wants to read data from the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Upload.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>buf</term>
|
||||
/// <description>
|
||||
/// Buffer into which your client should write data
|
||||
/// for cURL.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>Size of a character, usually 1.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>nmemb</term>
|
||||
/// <description>Number of characters.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return the number of bytes (not
|
||||
/// characters) written to <c>buf</c>. Return 0 to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlReadCallback([Out] byte[] buf, int size, int nmemb, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL wants to report an Ssl event.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>SSLGet.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>ctx</term>
|
||||
/// <description>
|
||||
/// An <see cref="CurlSslContext" /> object that wraps an
|
||||
/// OpenSSL <c>SSL_CTX</c> pointer.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return a <see cref="CurlCode" />,
|
||||
/// which should be <see cref="CurlCode.Ok" /> if everything
|
||||
/// is okay.
|
||||
/// </remarks>
|
||||
public delegate CurlCode CurlSslContextCallback(CurlSslContext ctx, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL has data for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the example <c>EasyGet.cs</c>.
|
||||
/// Arguments passed to the delegate implementation include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>buf</term>
|
||||
/// <description>Data cURL is providing to the client.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>Size of a character, usually 1.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>nmemb</term>
|
||||
/// <description>Number of characters.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return the number of bytes (not
|
||||
/// characters) processed. Return 0 to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlWriteCallback(byte[] buf, int size, int nmemb, Object extraData);
|
||||
}
|
@@ -1,76 +0,0 @@
|
||||
using System;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp.Callbacks
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when <c>cURL</c> wants to lock a shared resource.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For a usage example, refer to the <c>ShareDemo.cs</c> sample.
|
||||
/// Arguments passed to your delegate implementation include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <term>Description</term>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>data</term>
|
||||
/// <term>
|
||||
/// Type of data to lock; one of the values in the
|
||||
/// <see cref="CurlLockData" /> enumeration.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>access</term>
|
||||
/// <term>
|
||||
/// Lock access requested; one of the values in the
|
||||
/// <see cref="CurlLockAccess" /> enumeration.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>userData</term>
|
||||
/// <term>
|
||||
/// Client-provided data that is not touched internally by
|
||||
/// <c>cURL</c>. This is set via
|
||||
/// <see cref="CurlShareOption.UserData" /> when calling the
|
||||
/// <see cref="CurlShare.SetOpt" /> member of the <see cref="CurlShare" />
|
||||
/// class.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
public delegate void CurlShareLockCallback(CurlLockData data, CurlLockAccess access, Object userData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when <c>cURL</c> wants to unlock a shared resource.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For a usage example, refer to the <c>ShareDemo.cs</c> sample.
|
||||
/// Arguments passed to your delegate implementation include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <term>Description</term>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>data</term>
|
||||
/// <term>
|
||||
/// Type of data to unlock; one of the values in the
|
||||
/// <see cref="CurlLockData" /> enumeration.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>userData</term>
|
||||
/// <term>
|
||||
/// Client-provided data that is not touched internally by
|
||||
/// <c>cURL</c>. This is set via
|
||||
/// <see cref="CurlShareOption.UserData" /> when calling the
|
||||
/// <see cref="CurlShare.SetOpt" /> member of the <see cref="CurlShare" />
|
||||
/// class.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
public delegate void CurlShareUnlockCallback(CurlLockData data, Object userData);
|
||||
}
|
@@ -1,129 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Top-level class for initialization and cleanup.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It also implements static methods for capabilities that don't
|
||||
/// logically belong in a class.
|
||||
/// </remarks>
|
||||
public static class Curl
|
||||
{
|
||||
// for state management
|
||||
private static CurlCode _initCode;
|
||||
|
||||
/// <summary>
|
||||
/// Class constructor - initialize global status.
|
||||
/// </summary>
|
||||
static Curl()
|
||||
{
|
||||
_initCode = CurlCode.FailedInit;
|
||||
}
|
||||
|
||||
// hidden instance stuff
|
||||
|
||||
/// <summary>
|
||||
/// Get the underlying cURL version as a string, example "7.12.2".
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// Thrown if cURL isn't properly initialized.
|
||||
/// </exception>
|
||||
public static string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureCurl();
|
||||
return Marshal.PtrToStringAnsi(NativeMethods.curl_version());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process-wide initialization -- call only once per process.
|
||||
/// </summary>
|
||||
/// <param name="flags">
|
||||
/// An or'd combination of
|
||||
/// <see cref="CurlInitFlag" /> members.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlCode" />, hopefully
|
||||
/// <c>CurlCode.Ok</c>.
|
||||
/// </returns>
|
||||
public static CurlCode GlobalInit(CurlInitFlag flags)
|
||||
{
|
||||
_initCode = NativeMethods.curl_global_init((int) flags);
|
||||
#if USE_LIBCURLSHIM
|
||||
if (_initCode == CurlCode.Ok)
|
||||
NativeMethods.curl_shim_initialize();
|
||||
#endif
|
||||
return _initCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process-wide cleanup -- call just before exiting process.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// While it's not necessary that your program call this method
|
||||
/// before exiting, doing so will prevent leaks of native cURL resources.
|
||||
/// </remarks>
|
||||
public static void GlobalCleanup()
|
||||
{
|
||||
if (_initCode == CurlCode.Ok)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
NativeMethods.curl_shim_cleanup();
|
||||
#endif
|
||||
NativeMethods.curl_global_cleanup();
|
||||
_initCode = CurlCode.FailedInit;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a <see cref="CurlVersionInfoData" /> object.
|
||||
/// </summary>
|
||||
/// <param name="ver">
|
||||
/// Specify a <see cref="CurlVersion" />, such as
|
||||
/// <c>CurlVersion.Now</c>.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="CurlVersionInfoData" /> object.</returns>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// Thrown if cURL isn't properly initialized.
|
||||
/// </exception>
|
||||
public static CurlVersionInfoData GetVersionInfo(CurlVersion ver)
|
||||
{
|
||||
EnsureCurl();
|
||||
return new CurlVersionInfoData(ver);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by other classes to ensure valid cURL state.
|
||||
/// </summary>
|
||||
internal static void EnsureCurl()
|
||||
{
|
||||
if (_initCode != CurlCode.Ok)
|
||||
throw new InvalidOperationException("cURL not initialized");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,386 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This trivial class wraps the internal <c>curl_forms</c> struct.
|
||||
/// </summary>
|
||||
public sealed class CurlForms
|
||||
{
|
||||
/// <summary>The <see cref="CurlFormOption" />.</summary>
|
||||
public CurlFormOption Option;
|
||||
|
||||
/// <summary>Value for the option.</summary>
|
||||
public object Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a section of multipart form data to be submitted via the
|
||||
/// <see cref="CurlOption.HttpPost" /> option in the
|
||||
/// <see cref="CurlEasy.SetOpt" /> member of the <see cref="CurlEasy" /> class.
|
||||
/// </summary>
|
||||
public class CurlHttpMultiPartForm : IDisposable
|
||||
{
|
||||
// the two curlform pointers
|
||||
private readonly IntPtr[] _pItems;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
public CurlHttpMultiPartForm()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_pItems = new IntPtr[2];
|
||||
_pItems[0] = IntPtr.Zero;
|
||||
_pItems[1] = IntPtr.Zero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Free unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlHttpMultiPartForm()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
// for CurlEasy.SetOpt()
|
||||
internal IntPtr GetHandle() => _pItems[0];
|
||||
|
||||
/// <summary>
|
||||
/// Add a multi-part form section.
|
||||
/// </summary>
|
||||
/// <param name="args">
|
||||
/// Argument list, as described in the remarks.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlFormCode" />, hopefully
|
||||
/// <c>CurlFormCode.Ok</c>.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// This is definitely the workhorse method for this class. It
|
||||
/// should be called in roughly the same manner as
|
||||
/// <c>curl_formadd()</c>, except you would omit the first two
|
||||
/// <c>struct curl_httppost**</c> arguments (<c>firstitem</c> and
|
||||
/// <c>lastitem</c>), which are wrapped in this class. So you should
|
||||
/// pass arguments in the following sequence:
|
||||
/// <para>
|
||||
/// <c>
|
||||
/// CurlHttpMultiPartForm.AddSection(option1, value1, ..., optionX, valueX,
|
||||
/// CurlFormOption.End)
|
||||
/// </c>
|
||||
/// ;
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// For a complete list of possible options, see the documentation for
|
||||
/// the <see cref="CurlFormOption" /> enumeration.
|
||||
/// </para>
|
||||
/// <note>
|
||||
/// The pointer options (<c>PtrName</c>, etc.) make an
|
||||
/// internal copy of the passed <c>byte</c> array. Therefore, any
|
||||
/// changes you make to the client copy of this array AFTER calling
|
||||
/// this method, won't be reflected internally with <c>cURL</c>. The
|
||||
/// purpose of providing the pointer options is to support the
|
||||
/// posting of non-string binary data.
|
||||
/// </note>
|
||||
/// </remarks>
|
||||
public CurlFormCode AddSection(params object[] args)
|
||||
{
|
||||
var nCount = args.Length;
|
||||
var nRealCount = nCount;
|
||||
var retCode = CurlFormCode.Ok;
|
||||
CurlForms[] aForms = null;
|
||||
|
||||
// one arg or even number of args is an error
|
||||
if ((nCount == 1) || (nCount%2 == 0))
|
||||
return CurlFormCode.Incomplete;
|
||||
|
||||
// ensure the last argument is End
|
||||
var iCode = (CurlFormOption)
|
||||
Convert.ToInt32(args.GetValue(nCount - 1));
|
||||
if (iCode != CurlFormOption.End)
|
||||
return CurlFormCode.Incomplete;
|
||||
|
||||
// walk through any passed arrays to get the true number of
|
||||
// items and ensure the child arrays are properly (and not
|
||||
// prematurely) terminated with End
|
||||
for (var i = 0; i < nCount; i += 2)
|
||||
{
|
||||
iCode = (CurlFormOption) Convert.ToInt32(args.GetValue(i));
|
||||
switch (iCode)
|
||||
{
|
||||
case CurlFormOption.Array:
|
||||
{
|
||||
aForms = args.GetValue(i + 1) as CurlForms[];
|
||||
if (aForms == null)
|
||||
return CurlFormCode.Incomplete;
|
||||
var nFormsCount = aForms.Length;
|
||||
for (var j = 0; j < nFormsCount; j++)
|
||||
{
|
||||
var pcf = aForms.GetValue(j) as CurlForms;
|
||||
if (pcf == null)
|
||||
return CurlFormCode.Incomplete;
|
||||
if (j == nFormsCount - 1)
|
||||
{
|
||||
if (pcf.Option != CurlFormOption.End)
|
||||
return CurlFormCode.Incomplete;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pcf.Option == CurlFormOption.End)
|
||||
return CurlFormCode.Incomplete;
|
||||
}
|
||||
}
|
||||
// -2 accounts for the fact that we're a) not
|
||||
// including the item with End and b) not
|
||||
// including Array in what we pass to cURL
|
||||
nRealCount += 2*(nFormsCount - 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// allocate the IntPtr array for the data
|
||||
var aPointers = new IntPtr[nRealCount];
|
||||
for (var i = 0; i < nRealCount - 1; i++)
|
||||
aPointers[i] = IntPtr.Zero;
|
||||
aPointers[nRealCount - 1] = (IntPtr) CurlFormOption.End;
|
||||
|
||||
// now we go through the args
|
||||
aForms = null;
|
||||
var formArrayPos = 0;
|
||||
var argArrayPos = 0;
|
||||
var ptrArrayPos = 0;
|
||||
object obj = null;
|
||||
|
||||
while ((retCode == CurlFormCode.Ok) &&
|
||||
(ptrArrayPos < nRealCount))
|
||||
{
|
||||
if (aForms != null)
|
||||
{
|
||||
var pcf = aForms.GetValue(formArrayPos++)
|
||||
as CurlForms;
|
||||
if (pcf == null)
|
||||
{
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
break;
|
||||
}
|
||||
iCode = pcf.Option;
|
||||
obj = pcf.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCode = (CurlFormOption) Convert.ToInt32(
|
||||
args.GetValue(argArrayPos++));
|
||||
obj = iCode == CurlFormOption.End
|
||||
? null
|
||||
: args.GetValue(argArrayPos++);
|
||||
}
|
||||
|
||||
switch (iCode)
|
||||
{
|
||||
// handle byte-array pointer-related items
|
||||
case CurlFormOption.PtrName:
|
||||
case CurlFormOption.PtrContents:
|
||||
case CurlFormOption.BufferPtr:
|
||||
{
|
||||
var bytes = obj as byte[];
|
||||
if (bytes == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
else
|
||||
{
|
||||
var nLen = bytes.Length;
|
||||
var ptr = Marshal.AllocHGlobal(nLen);
|
||||
if (ptr != IntPtr.Zero)
|
||||
{
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
// copy bytes to unmanaged buffer
|
||||
for (var j = 0; j < nLen; j++)
|
||||
Marshal.WriteByte(ptr, bytes[j]);
|
||||
aPointers[ptrArrayPos++] = ptr;
|
||||
}
|
||||
else
|
||||
retCode = CurlFormCode.Memory;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// length values
|
||||
case CurlFormOption.NameLength:
|
||||
case CurlFormOption.ContentsLength:
|
||||
case CurlFormOption.BufferLength:
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
aPointers[ptrArrayPos++] = (IntPtr)
|
||||
Convert.ToInt32(obj);
|
||||
break;
|
||||
|
||||
// strings
|
||||
case CurlFormOption.CopyName:
|
||||
case CurlFormOption.CopyContents:
|
||||
case CurlFormOption.FileContent:
|
||||
case CurlFormOption.File:
|
||||
case CurlFormOption.ContentType:
|
||||
case CurlFormOption.Filename:
|
||||
case CurlFormOption.Buffer:
|
||||
{
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
var s = obj as string;
|
||||
if (s == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
else
|
||||
{
|
||||
var p = Marshal.StringToHGlobalAnsi(s);
|
||||
if (p != IntPtr.Zero)
|
||||
aPointers[ptrArrayPos++] = p;
|
||||
else
|
||||
retCode = CurlFormCode.Memory;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// array case: already handled
|
||||
case CurlFormOption.Array:
|
||||
if (aForms != null)
|
||||
retCode = CurlFormCode.IllegalArray;
|
||||
else
|
||||
{
|
||||
aForms = obj as CurlForms[];
|
||||
if (aForms == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
}
|
||||
break;
|
||||
|
||||
// slist
|
||||
case CurlFormOption.ContentHeader:
|
||||
{
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
var s = obj as CurlSlist;
|
||||
if (s == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
else
|
||||
aPointers[ptrArrayPos++] = s.Handle;
|
||||
break;
|
||||
}
|
||||
|
||||
// erroneous stuff
|
||||
case CurlFormOption.Nothing:
|
||||
retCode = CurlFormCode.Incomplete;
|
||||
break;
|
||||
|
||||
// end
|
||||
case CurlFormOption.End:
|
||||
if (aForms != null) // end of form
|
||||
{
|
||||
aForms = null;
|
||||
formArrayPos = 0;
|
||||
}
|
||||
else
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
break;
|
||||
|
||||
// default is unknown
|
||||
default:
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ensure we didn't come up short on parameters
|
||||
if (ptrArrayPos != nRealCount)
|
||||
retCode = CurlFormCode.Incomplete;
|
||||
|
||||
// if we're OK here, call into curl
|
||||
if (retCode == CurlFormCode.Ok)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
retCode = (CurlFormCode) NativeMethods.curl_shim_formadd(_pItems, aPointers, nRealCount);
|
||||
#else
|
||||
retCode = (CurlFormCode) NativeMethods.curl_formadd(ref _pItems[0], ref _pItems[1],
|
||||
(int) aPointers[0], aPointers[1],
|
||||
(int) aPointers[2], aPointers[3],
|
||||
(int) aPointers[4]);
|
||||
#endif
|
||||
}
|
||||
|
||||
// unmarshal native allocations
|
||||
for (var i = 0; i < nRealCount - 1; i += 2)
|
||||
{
|
||||
iCode = (CurlFormOption) (int) aPointers[i];
|
||||
switch (iCode)
|
||||
{
|
||||
case CurlFormOption.CopyName:
|
||||
case CurlFormOption.CopyContents:
|
||||
case CurlFormOption.FileContent:
|
||||
case CurlFormOption.File:
|
||||
case CurlFormOption.ContentType:
|
||||
case CurlFormOption.Filename:
|
||||
case CurlFormOption.Buffer:
|
||||
// byte buffer cases
|
||||
case CurlFormOption.PtrName:
|
||||
case CurlFormOption.PtrContents:
|
||||
case CurlFormOption.BufferPtr:
|
||||
{
|
||||
if (aPointers[i + 1] != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal(aPointers[i + 1]);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retCode;
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// clean up managed objects
|
||||
}
|
||||
|
||||
// clean up native objects
|
||||
if (_pItems[0] != IntPtr.Zero)
|
||||
NativeMethods.curl_formfree(_pItems[0]);
|
||||
_pItems[0] = IntPtr.Zero;
|
||||
_pItems[1] = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,304 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the <c>curl_multi_xxx</c> API.
|
||||
/// </summary>
|
||||
public class CurlMulti : IDisposable
|
||||
{
|
||||
// private members
|
||||
private readonly Hashtable _htEasy;
|
||||
private int _maxFd;
|
||||
private CurlMultiInfo[] _multiInfo;
|
||||
private bool _bGotMultiInfo;
|
||||
#if USE_LIBCURLSHIM
|
||||
private IntPtr _fdSets;
|
||||
#else
|
||||
private NativeMethods.fd_set _fd_read, _fd_write, _fd_except;
|
||||
#endif
|
||||
private IntPtr _pMulti;
|
||||
private CurlPipelining _pipelining;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMulti()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_pMulti = NativeMethods.curl_multi_init();
|
||||
ensureHandle();
|
||||
_maxFd = 0;
|
||||
#if USE_LIBCURLSHIM
|
||||
_fdSets = IntPtr.Zero;
|
||||
_fdSets = NativeMethods.curl_shim_alloc_fd_sets();
|
||||
#else
|
||||
_fd_read = NativeMethods.fd_set.Create();
|
||||
_fd_read = NativeMethods.fd_set.Create();
|
||||
_fd_write = NativeMethods.fd_set.Create();
|
||||
_fd_except = NativeMethods.fd_set.Create();
|
||||
#endif
|
||||
_multiInfo = null;
|
||||
_bGotMultiInfo = false;
|
||||
_htEasy = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Max file descriptor
|
||||
/// </summary>
|
||||
public int MaxFd => _maxFd;
|
||||
|
||||
/// <summary>
|
||||
/// Cleanup unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlMulti()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
// if (disposing) // managed member cleanup
|
||||
// unmanaged cleanup
|
||||
if (_pMulti != IntPtr.Zero)
|
||||
{
|
||||
NativeMethods.curl_multi_cleanup(_pMulti);
|
||||
_pMulti = IntPtr.Zero;
|
||||
}
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
if (_fdSets != IntPtr.Zero)
|
||||
{
|
||||
NativeMethods.curl_shim_free_fd_sets(_fdSets);
|
||||
_fdSets = IntPtr.Zero;
|
||||
}
|
||||
#else
|
||||
_fd_read.Cleanup();
|
||||
_fd_write.Cleanup();
|
||||
_fd_except.Cleanup();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureHandle()
|
||||
{
|
||||
if (_pMulti == IntPtr.Zero)
|
||||
throw new NullReferenceException("No internal multi handle");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an CurlEasy object.
|
||||
/// </summary>
|
||||
/// <param name="curlEasy">
|
||||
/// <see cref="CurlEasy" /> object to add.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode AddHandle(CurlEasy curlEasy)
|
||||
{
|
||||
ensureHandle();
|
||||
var p = curlEasy.Handle;
|
||||
_htEasy.Add(p, curlEasy);
|
||||
return NativeMethods.curl_multi_add_handle(_pMulti, p);
|
||||
}
|
||||
|
||||
public CurlPipelining Pipelining
|
||||
{
|
||||
get { return _pipelining; }
|
||||
set
|
||||
{
|
||||
ensureHandle();
|
||||
_pipelining = value;
|
||||
NativeMethods.curl_multi_setopt(_pMulti, CurlMultiOption.Pipelining, (long) value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an CurlEasy object.
|
||||
/// </summary>
|
||||
/// <param name="curlEasy">
|
||||
/// <see cref="CurlEasy" /> object to remove.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode RemoveHandle(CurlEasy curlEasy)
|
||||
{
|
||||
ensureHandle();
|
||||
var p = curlEasy.Handle;
|
||||
_htEasy.Remove(p);
|
||||
return NativeMethods.curl_multi_remove_handle(_pMulti, curlEasy.Handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a string description of an error code.
|
||||
/// </summary>
|
||||
/// <param name="errorNum">
|
||||
/// The <see cref="CurlMultiCode" /> for which to obtain the error
|
||||
/// string description.
|
||||
/// </param>
|
||||
/// <returns>The string description.</returns>
|
||||
public string StrError(CurlMultiCode errorNum) => Marshal.PtrToStringAnsi(NativeMethods.curl_multi_strerror(errorNum));
|
||||
|
||||
/// <summary>
|
||||
/// Read/write data to/from each CurlEasy object.
|
||||
/// </summary>
|
||||
/// <param name="runningObjects">
|
||||
/// The number of <see cref="CurlEasy" /> objects still in process is
|
||||
/// written by this function to this reference parameter.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode Perform(ref int runningObjects)
|
||||
{
|
||||
ensureHandle();
|
||||
return NativeMethods.curl_multi_perform(_pMulti, ref runningObjects);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set internal file desriptor information before calling Select.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode FdSet()
|
||||
{
|
||||
ensureHandle();
|
||||
#if USE_LIBCURLSHIM
|
||||
return NativeMethods.curl_shim_multi_fdset(_pMulti, _fdSets, ref _maxFd);
|
||||
#else
|
||||
NativeMethods.FD_ZERO(_fd_read);
|
||||
NativeMethods.FD_ZERO(_fd_write);
|
||||
NativeMethods.FD_ZERO(_fd_except);
|
||||
return NativeMethods.curl_multi_fdset(_pMulti, ref _fd_read, ref _fd_write, ref _fd_except, ref _maxFd);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call <c>select()</c> on the CurlEasy objects.
|
||||
/// </summary>
|
||||
/// <param name="timeoutMillis">
|
||||
/// The timeout for the internal <c>select()</c> call,
|
||||
/// in milliseconds.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// Number or <see cref="CurlEasy" /> objects with pending reads.
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public int Select(int timeoutMillis)
|
||||
{
|
||||
ensureHandle();
|
||||
#if USE_LIBCURLSHIM
|
||||
return NativeMethods.curl_shim_select(_maxFd + 1, _fdSets, timeoutMillis);
|
||||
#else
|
||||
var timeout = NativeMethods.timeval.Create(timeoutMillis);
|
||||
return NativeMethods.select(_maxFd + 1, ref _fd_read, ref _fd_write, ref _fd_except, ref timeout);
|
||||
//return NativeMethods.select2(_maxFd + 1, _fd_read, _fd_write, _fd_except, timeout);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Obtain status information for a CurlMulti transfer. Requires
|
||||
/// CurlSharp be compiled with the libcurlshim helper.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// An array of <see cref="CurlMultiInfo" /> objects, one for each
|
||||
/// <see cref="CurlEasy" /> object child.
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiInfo[] InfoRead()
|
||||
{
|
||||
if (_bGotMultiInfo)
|
||||
return _multiInfo;
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
var nMsgs = 0;
|
||||
var pInfo = NativeMethods.curl_shim_multi_info_read(_pMulti, ref nMsgs);
|
||||
if (pInfo != IntPtr.Zero)
|
||||
{
|
||||
_multiInfo = new CurlMultiInfo[nMsgs];
|
||||
for (var i = 0; i < nMsgs; i++)
|
||||
{
|
||||
var msg = (CurlMessage) Marshal.ReadInt32(pInfo, i*12);
|
||||
var pEasy = Marshal.ReadIntPtr(pInfo, i*12 + 4);
|
||||
var code = (CurlCode) Marshal.ReadInt32(pInfo, i*12 + 8);
|
||||
_multiInfo[i] = new CurlMultiInfo(msg, (CurlEasy) _htEasy[pEasy], code);
|
||||
}
|
||||
NativeMethods.curl_shim_multi_info_free(pInfo);
|
||||
}
|
||||
_bGotMultiInfo = true;
|
||||
#else
|
||||
_multiInfo = null;
|
||||
throw new NotImplementedException("CurlMulti.InfoRead()");
|
||||
#endif
|
||||
#pragma warning disable CS0162 // Unreachable code detected when not compiling with the shim
|
||||
return _multiInfo;
|
||||
#pragma warning restore CS0162 // Unreachable code detected when not compiling with the shim
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Wraps the <c>cURL</c> struct <c>CURLMsg</c>. This class provides
|
||||
/// status information following a <see cref="CurlMulti" /> transfer.
|
||||
/// </summary>
|
||||
public sealed class CurlMultiInfo
|
||||
{
|
||||
// private members
|
||||
|
||||
internal CurlMultiInfo(CurlMessage msg, CurlEasy curlEasy, CurlCode result)
|
||||
{
|
||||
Msg = msg;
|
||||
CurlEasyHandle = curlEasy;
|
||||
Result = result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the status code from the <see cref="CurlMessage" /> enumeration.
|
||||
/// </summary>
|
||||
public CurlMessage Msg { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the <see cref="CurlEasy" /> object for this child.
|
||||
/// </summary>
|
||||
public CurlEasy CurlEasyHandle { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the return code for the transfer, as a
|
||||
/// <see cref="CurlCode" />.
|
||||
/// </summary>
|
||||
public CurlCode Result { get; }
|
||||
}
|
||||
}
|
@@ -1,242 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Callbacks;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This class provides an infrastructure for serializing access to data
|
||||
/// shared by multiple <see cref="CurlEasy" /> objects, including cookie data
|
||||
/// and Dns hosts. It implements the <c>curl_share_xxx</c> API.
|
||||
/// </summary>
|
||||
public class CurlShare : IDisposable
|
||||
{
|
||||
// private members
|
||||
private GCHandle _hThis; // for handle extraction
|
||||
#if USE_LIBCURLSHIM
|
||||
private NativeMethods._ShimLockCallback _pDelLock; // lock delegate
|
||||
private NativeMethods._ShimUnlockCallback _pDelUnlock; // unlock delegate
|
||||
#endif
|
||||
private IntPtr _pShare; // share handle
|
||||
private IntPtr _ptrThis; // numeric handle
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if
|
||||
/// the native <c>share</c> handle wasn't created successfully.
|
||||
/// </exception>
|
||||
public CurlShare()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_pShare = NativeMethods.curl_share_init();
|
||||
EnsureHandle();
|
||||
LockFunction = null;
|
||||
UnlockFunction = null;
|
||||
UserData = null;
|
||||
installDelegates();
|
||||
}
|
||||
|
||||
public object UserData { get; set; }
|
||||
|
||||
public CurlShareUnlockCallback UnlockFunction { get; set; }
|
||||
|
||||
public CurlShareLockCallback LockFunction { get; set; }
|
||||
|
||||
public CurlLockData Share
|
||||
{
|
||||
set { setShareOption(CurlShareOption.Share, value); }
|
||||
}
|
||||
|
||||
public CurlLockData Unshare
|
||||
{
|
||||
set { setShareOption(CurlShareOption.Unshare, value); }
|
||||
}
|
||||
|
||||
public CurlShareCode LastErrorCode { get; private set; }
|
||||
|
||||
public string LastErrorDescription { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Cleanup unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlShare()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set options for this object.
|
||||
/// </summary>
|
||||
/// <param name="option">
|
||||
/// One of the values in the <see cref="CurlShareOption" />
|
||||
/// enumeration.
|
||||
/// </param>
|
||||
/// <param name="parameter">
|
||||
/// An appropriate object based on the value passed in the
|
||||
/// <c>option</c> argument. See <see cref="CurlShareOption" />
|
||||
/// for more information about the appropriate parameter type.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlShareCode" />, hopefully
|
||||
/// <c>CurlShareCode.Ok</c>.
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if
|
||||
/// the native <c>share</c> handle wasn't created successfully.
|
||||
/// </exception>
|
||||
public CurlShareCode SetOpt(CurlShareOption option, object parameter)
|
||||
{
|
||||
EnsureHandle();
|
||||
var retCode = CurlShareCode.Ok;
|
||||
|
||||
switch (option)
|
||||
{
|
||||
case CurlShareOption.LockFunction:
|
||||
var lf = parameter as CurlShareLockCallback;
|
||||
if (lf == null)
|
||||
return CurlShareCode.BadOption;
|
||||
LockFunction = lf;
|
||||
break;
|
||||
|
||||
case CurlShareOption.UnlockFunction:
|
||||
var ulf = parameter as CurlShareUnlockCallback;
|
||||
if (ulf == null)
|
||||
return CurlShareCode.BadOption;
|
||||
UnlockFunction = ulf;
|
||||
break;
|
||||
|
||||
case CurlShareOption.Share:
|
||||
case CurlShareOption.Unshare:
|
||||
{
|
||||
var opt = (CurlLockData) Convert.ToInt32(parameter);
|
||||
retCode = setShareOption(option, opt);
|
||||
break;
|
||||
}
|
||||
|
||||
case CurlShareOption.UserData:
|
||||
UserData = parameter;
|
||||
break;
|
||||
|
||||
default:
|
||||
retCode = CurlShareCode.BadOption;
|
||||
break;
|
||||
}
|
||||
return retCode;
|
||||
}
|
||||
|
||||
private void setLastError(CurlShareCode code, CurlShareOption opt)
|
||||
{
|
||||
if ((LastErrorCode == CurlShareCode.Ok) && (code != CurlShareCode.Ok))
|
||||
{
|
||||
LastErrorCode = code;
|
||||
LastErrorDescription = $"Error: {StrError(code)} setting option {opt}";
|
||||
}
|
||||
}
|
||||
|
||||
private CurlShareCode setShareOption(CurlShareOption option, CurlLockData value)
|
||||
{
|
||||
var retCode = (value != CurlLockData.Cookie) && (value != CurlLockData.Dns)
|
||||
? CurlShareCode.BadOption
|
||||
: NativeMethods.curl_share_setopt(_pShare, option, (IntPtr) value);
|
||||
setLastError(retCode, option);
|
||||
return retCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a String description of an error code.
|
||||
/// </summary>
|
||||
/// <param name="errorNum">
|
||||
/// The <see cref="CurlShareCode" /> for which to obtain the error
|
||||
/// string description.
|
||||
/// </param>
|
||||
/// <returns>The string description.</returns>
|
||||
public string StrError(CurlShareCode errorNum)
|
||||
=> Marshal.PtrToStringAnsi(NativeMethods.curl_share_strerror(errorNum));
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
// if (disposing) cleanup managed objects
|
||||
if (_pShare != IntPtr.Zero)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
NativeMethods.curl_shim_cleanup_share_delegates(_pShare);
|
||||
#endif
|
||||
NativeMethods.curl_share_cleanup(_pShare);
|
||||
_hThis.Free();
|
||||
_ptrThis = IntPtr.Zero;
|
||||
_pShare = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal IntPtr GetHandle() => _pShare;
|
||||
|
||||
private void EnsureHandle()
|
||||
{
|
||||
if (_pShare == IntPtr.Zero)
|
||||
throw new NullReferenceException("No internal share handle");
|
||||
}
|
||||
|
||||
private void installDelegates()
|
||||
{
|
||||
_hThis = GCHandle.Alloc(this);
|
||||
_ptrThis = (IntPtr) _hThis;
|
||||
#if USE_LIBCURLSHIM
|
||||
_pDelLock = LockDelegate;
|
||||
_pDelUnlock = UnlockDelegate;
|
||||
NativeMethods.curl_shim_install_share_delegates(_pShare, _ptrThis, _pDelLock, _pDelUnlock);
|
||||
#endif
|
||||
}
|
||||
|
||||
internal static void LockDelegate(int data, int access, IntPtr userPtr)
|
||||
{
|
||||
var gch = (GCHandle) userPtr;
|
||||
var share = (CurlShare) gch.Target;
|
||||
share?.LockFunction?.Invoke((CurlLockData) data, (CurlLockAccess) access, share.UserData);
|
||||
}
|
||||
|
||||
internal static void UnlockDelegate(int data, IntPtr userPtr)
|
||||
{
|
||||
var gch = (GCHandle) userPtr;
|
||||
var share = (CurlShare) gch.Target;
|
||||
share?.UnlockFunction?.Invoke((CurlLockData) data, share.UserData);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<PackageId>CurlSharp</PackageId>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -1,141 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This class wraps a linked list of strings used in <c>cURL</c>. Use it
|
||||
/// to build string lists where they're required, such as when calling
|
||||
/// <see cref="CurlEasy.SetOpt" /> with <see cref="CurlOption.Quote" />
|
||||
/// as the option.
|
||||
/// </summary>
|
||||
public class CurlSlist : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
public CurlSlist()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
Handle = IntPtr.Zero;
|
||||
}
|
||||
|
||||
public CurlSlist(IntPtr handle)
|
||||
{
|
||||
Handle = handle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read-only copy of the strings stored in the SList
|
||||
/// </summary>
|
||||
public List<string> Strings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Handle == IntPtr.Zero)
|
||||
return null;
|
||||
var strings = new List<string>();
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
var slist = new curl_slist();
|
||||
Marshal.PtrToStructure(Handle, slist);
|
||||
|
||||
while (true)
|
||||
{
|
||||
strings.Add(slist.data);
|
||||
if (slist.next != IntPtr.Zero)
|
||||
Marshal.PtrToStructure(slist.next, slist);
|
||||
else
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return strings;
|
||||
}
|
||||
}
|
||||
|
||||
internal IntPtr Handle { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Free all internal strings.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
GC.SuppressFinalize(this);
|
||||
Dispose(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlSlist()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a string to the list.
|
||||
/// </summary>
|
||||
/// <param name="str">The <c>string</c> to append.</param>
|
||||
public void Append(string str)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
Handle = NativeMethods.curl_shim_add_string_to_slist(Handle, str);
|
||||
#else
|
||||
Handle = NativeMethods.curl_slist_append(Handle, str);
|
||||
#endif
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (Handle != IntPtr.Zero)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
NativeMethods.curl_shim_free_slist(Handle);
|
||||
#else
|
||||
NativeMethods.curl_slist_free_all(Handle);
|
||||
#endif
|
||||
Handle = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private class curl_slist
|
||||
{
|
||||
/// char*
|
||||
[MarshalAs(UnmanagedType.LPStr)] public string data;
|
||||
|
||||
/// curl_slist*
|
||||
public IntPtr next;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using CurlSharp.Callbacks;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// An instance of this class is passed to the delegate
|
||||
/// <see cref="CurlSslContextCallback" />, if it's implemented.
|
||||
/// Within that delegate, the code will have to make native calls to
|
||||
/// the <c>OpenSSL</c> library with the value returned from the
|
||||
/// <see cref="CurlSslContext.Context" /> property cast to an
|
||||
/// <c>SSL_CTX</c> pointer.
|
||||
/// </summary>
|
||||
public sealed class CurlSslContext
|
||||
{
|
||||
internal CurlSslContext(IntPtr pvContext)
|
||||
{
|
||||
Context = pvContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the underlying OpenSSL context.
|
||||
/// </summary>
|
||||
public IntPtr Context { get; }
|
||||
}
|
||||
}
|
@@ -1,207 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This class wraps a <c>curl_version_info_data</c> struct. An instance is
|
||||
/// obtained by calling <see cref="Curl.GetVersionInfo" />.
|
||||
/// </summary>
|
||||
public sealed class CurlVersionInfoData
|
||||
{
|
||||
private const int OFFSET_AGE = 0;
|
||||
private const int OFFSET_VERSION = 4;
|
||||
private const int OFFSET_VERSION_NUM = 8;
|
||||
private const int OFFSET_HOST = 12;
|
||||
private const int OFFSET_FEATURES = 16;
|
||||
private const int OFFSET_SSL_VERSION = 20;
|
||||
private const int OFFSET_SSL_VERSION_NUM = 24;
|
||||
private const int OFFSET_LIBZ_VERSION = 28;
|
||||
private const int OFFSET_PROTOCOLS = 32;
|
||||
private const int OFFSET_ARES_VERSION = 36;
|
||||
private const int OFFSET_ARES_VERSION_NUM = 40;
|
||||
private const int OFFSET_LIBIDN_VERSION = 44;
|
||||
|
||||
private readonly IntPtr m_pVersionInfoData;
|
||||
|
||||
internal CurlVersionInfoData(CurlVersion ver)
|
||||
{
|
||||
m_pVersionInfoData = NativeMethods.curl_version_info(ver);
|
||||
}
|
||||
#if USE_LIBCURLSHIM
|
||||
/// <summary>
|
||||
/// Age of this struct, depending on how recent the linked-in
|
||||
/// <c>libcurl</c> is, as a <see cref="CurlVersion" />.
|
||||
/// </summary>
|
||||
public CurlVersion Age
|
||||
{
|
||||
get { return (CurlVersion) NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_AGE); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal cURL version, as a <c>string</c>.
|
||||
/// </summary>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(
|
||||
NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData, OFFSET_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal cURL version number, a A 24-bit number created
|
||||
/// like this: [8 bits major number] | [8 bits minor number] | [8
|
||||
/// bits patch number]. For example, Version 7.12.2 is <c>0x070C02</c>.
|
||||
/// </summary>
|
||||
public int VersionNum
|
||||
{
|
||||
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_VERSION_NUM); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the host information on which the underlying cURL was built.
|
||||
/// </summary>
|
||||
public string Host
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData, OFFSET_HOST));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a bitmask of features, containing bits or'd from the
|
||||
/// <see cref="CurlVersionFeatureBitmask" /> enumeration.
|
||||
/// </summary>
|
||||
public int Features
|
||||
{
|
||||
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_FEATURES); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Ssl version, if it's linked in.
|
||||
/// </summary>
|
||||
public string SslVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_SSL_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Ssl version number, if Ssl is linked in.
|
||||
/// </summary>
|
||||
public int SSLVersionNum
|
||||
{
|
||||
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_SSL_VERSION_NUM); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the libz version, if libz is linked in.
|
||||
/// </summary>
|
||||
public string LibZVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_LIBZ_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the names of the supported protocols.
|
||||
/// </summary>
|
||||
public string[] Protocols
|
||||
{
|
||||
get
|
||||
{
|
||||
var nProts = NativeMethods.curl_shim_get_number_of_protocols(
|
||||
m_pVersionInfoData, OFFSET_PROTOCOLS);
|
||||
var aProts = new String[nProts];
|
||||
for (var i = 0; i < nProts; i++)
|
||||
{
|
||||
aProts[i] =
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_protocol_string(m_pVersionInfoData,
|
||||
OFFSET_PROTOCOLS, i));
|
||||
}
|
||||
return aProts;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the ARes version, if ARes is linked in.
|
||||
/// </summary>
|
||||
public string ARes
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Age > CurlVersion.First)
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_ARES_VERSION));
|
||||
}
|
||||
return "n.a.";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the ARes version number, if ARes is linked in.
|
||||
/// </summary>
|
||||
public int AResNum
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Age > CurlVersion.First)
|
||||
{
|
||||
return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_ARES_VERSION_NUM);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the libidn version, if libidn is linked in.
|
||||
/// </summary>
|
||||
public string LibIdn
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Age > CurlVersion.Second)
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_LIBIDN_VERSION));
|
||||
}
|
||||
return "n.a.";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the order in which cached connections
|
||||
/// are closed. One of these is passed as the
|
||||
/// <see cref="CurlOption.ClosePolicy" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlClosePolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// No close policy. Never use this.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Close the oldest cached connections first.
|
||||
/// </summary>
|
||||
Oldest = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Close the least recently used connections first.
|
||||
/// </summary>
|
||||
LeastRecentlyUsed = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Close the connections with the least traffic first.
|
||||
/// </summary>
|
||||
LeastTraffic = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Close the slowest connections first.
|
||||
/// </summary>
|
||||
Slowest = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Currently unimplemented.
|
||||
/// </summary>
|
||||
Callback = 5,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
};
|
||||
}
|
@@ -1,403 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Status code returned from <see cref="CurlEasy" /> functions.
|
||||
/// </summary>
|
||||
public enum CurlCode
|
||||
{
|
||||
/// <summary>
|
||||
/// All fine. Proceed as usual.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Aborted by callback. An internal callback returned "abort"
|
||||
/// to libcurl.
|
||||
/// </summary>
|
||||
AbortedByCallback = 42,
|
||||
|
||||
/// <summary>
|
||||
/// Internal error. A function was called in a bad order.
|
||||
/// </summary>
|
||||
BadCallingOrder = 44,
|
||||
|
||||
/// <summary>
|
||||
/// Unrecognized transfer encoding.
|
||||
/// </summary>
|
||||
BadContentEncoding = 61,
|
||||
|
||||
/// <summary>
|
||||
/// Attempting FTP resume beyond file size.
|
||||
/// </summary>
|
||||
BadDownloadResume = 36,
|
||||
|
||||
/// <summary>
|
||||
/// Internal error. A function was called with a bad parameter.
|
||||
/// </summary>
|
||||
BadFunctionArgument = 43,
|
||||
|
||||
/// <summary>
|
||||
/// Bad password entered. An error was signaled when the password was
|
||||
/// entered. This can also be the result of a "bad password" returned
|
||||
/// from a specified password callback.
|
||||
/// </summary>
|
||||
BadPasswordEntered = 46,
|
||||
|
||||
/// <summary>
|
||||
/// Failed to connect to host or proxy.
|
||||
/// </summary>
|
||||
CouldntConnect = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Couldn't resolve host. The given remote host was not resolved.
|
||||
/// </summary>
|
||||
CouldntResolveHost = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Couldn't resolve proxy. The given proxy host could not be resolved.
|
||||
/// </summary>
|
||||
CouldntResolveProxy = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Very early initialization code failed. This is likely to be an
|
||||
/// internal error or problem.
|
||||
/// </summary>
|
||||
FailedInit = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum file size exceeded.
|
||||
/// </summary>
|
||||
FilesizeExceeded = 63,
|
||||
|
||||
/// <summary>
|
||||
/// A file given with FILE:// couldn't be opened. Most likely
|
||||
/// because the file path doesn't identify an existing file. Did
|
||||
/// you check file permissions?
|
||||
/// </summary>
|
||||
FileCouldntReadFile = 37,
|
||||
|
||||
/// <summary>
|
||||
/// We were denied access when trying to login to an FTP server or
|
||||
/// when trying to change working directory to the one given in the URL.
|
||||
/// </summary>
|
||||
FtpAccessDenied = 9,
|
||||
|
||||
/// <summary>
|
||||
/// An internal failure to lookup the host used for the new
|
||||
/// connection.
|
||||
/// </summary>
|
||||
FtpCantGetHost = 15,
|
||||
|
||||
/// <summary>
|
||||
/// A bad return code on either PASV or EPSV was sent by the FTP
|
||||
/// server, preventing libcurl from being able to continue.
|
||||
/// </summary>
|
||||
FtpCantReconnect = 16,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP SIZE command returned error. SIZE is not a kosher FTP
|
||||
/// command, it is an extension and not all servers support it. This
|
||||
/// is not a surprising error.
|
||||
/// </summary>
|
||||
FtpCouldntGetSize = 32,
|
||||
|
||||
/// <summary>
|
||||
/// This was either a weird reply to a 'RETR' command or a zero byte
|
||||
/// transfer complete.
|
||||
/// </summary>
|
||||
FtpCouldntRetrFile = 19,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl failed to set ASCII transfer type (TYPE A).
|
||||
/// </summary>
|
||||
FtpCouldntSetAscii = 29,
|
||||
|
||||
/// <summary>
|
||||
/// Received an error when trying to set the transfer mode to binary.
|
||||
/// </summary>
|
||||
FtpCouldntSetBinary = 17,
|
||||
|
||||
/// <summary>
|
||||
/// FTP couldn't STOR file. The server denied the STOR operation.
|
||||
/// The error buffer usually contains the server's explanation to this.
|
||||
/// </summary>
|
||||
FtpCouldntStorFile = 25,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP REST command returned error. This should never happen
|
||||
/// if the server is sane.
|
||||
/// </summary>
|
||||
FtpCouldntUseRest = 31,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP PORT command returned error. This mostly happen when
|
||||
/// you haven't specified a good enough address for libcurl to use.
|
||||
/// See <see cref="CurlOption.FtpPort" />.
|
||||
/// </summary>
|
||||
FtpPortFailed = 30,
|
||||
|
||||
/// <summary>
|
||||
/// When sending custom "QUOTE" commands to the remote server, one
|
||||
/// of the commands returned an error code that was 400 or higher.
|
||||
/// </summary>
|
||||
FtpQuoteError = 21,
|
||||
|
||||
/// <summary>
|
||||
/// Requested FTP Ssl level failed.
|
||||
/// </summary>
|
||||
FtpSslFailed = 64,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP server rejected access to the server after the password
|
||||
/// was sent to it. It might be because the username and/or the
|
||||
/// password were incorrect or just that the server is not allowing
|
||||
/// you access for the moment etc.
|
||||
/// </summary>
|
||||
FtpUserPasswordIncorrect = 10,
|
||||
|
||||
/// <summary>
|
||||
/// FTP servers return a 227-line as a response to a PASV command.
|
||||
/// If libcurl fails to parse that line, this return code is
|
||||
/// passed back.
|
||||
/// </summary>
|
||||
FtpWeird227Format = 14,
|
||||
|
||||
/// <summary>
|
||||
/// After having sent the FTP password to the server, libcurl expects
|
||||
/// a proper reply. This error code indicates that an unexpected code
|
||||
/// was returned.
|
||||
/// </summary>
|
||||
FtpWeirdPassReply = 11,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl failed to get a sensible result back from the server as
|
||||
/// a response to either a PASV or a EPSV command. The server is flawed.
|
||||
/// </summary>
|
||||
FtpWeirdPasvReply = 13,
|
||||
|
||||
/// <summary>
|
||||
/// After connecting to an FTP server, libcurl expects to get a
|
||||
/// certain reply back. This error code implies that it got a strange
|
||||
/// or bad reply. The given remote server is probably not an
|
||||
/// OK FTP server.
|
||||
/// </summary>
|
||||
FtpWeirdServerReply = 8,
|
||||
|
||||
/// <summary>
|
||||
/// After having sent user name to the FTP server, libcurl expects a
|
||||
/// proper reply. This error code indicates that an unexpected code
|
||||
/// was returned.
|
||||
/// </summary>
|
||||
FtpWeirdUserReply = 12,
|
||||
|
||||
/// <summary>
|
||||
/// After a completed file transfer, the FTP server did not respond a
|
||||
/// proper "transfer successful" code.
|
||||
/// </summary>
|
||||
FtpWriteError = 20,
|
||||
|
||||
/// <summary>
|
||||
/// Function not found. A required LDAP function was not found.
|
||||
/// </summary>
|
||||
FunctionNotFound = 41,
|
||||
|
||||
/// <summary>
|
||||
/// Nothing was returned from the server, and under the circumstances,
|
||||
/// getting nothing is considered an error.
|
||||
/// </summary>
|
||||
GotNothing = 52,
|
||||
|
||||
/// <summary>
|
||||
/// This is an odd error that mainly occurs due to internal confusion.
|
||||
/// </summary>
|
||||
HttpPostError = 34,
|
||||
|
||||
/// <summary>
|
||||
/// The HTTP server does not support or accept range requests.
|
||||
/// </summary>
|
||||
HttpRangeError = 33,
|
||||
|
||||
/// <summary>
|
||||
/// This is returned if <see cref="CurlOption.FailOnError" />
|
||||
/// is set TRUE and the HTTP server returns an error code that
|
||||
/// is >= 400.
|
||||
/// </summary>
|
||||
HttpReturnedError = 22,
|
||||
|
||||
/// <summary>
|
||||
/// Interface error. A specified outgoing interface could not be
|
||||
/// used. Set which interface to use for outgoing connections'
|
||||
/// source IP address with <see cref="CurlOption.Interface" />.
|
||||
/// </summary>
|
||||
InterfaceFailed = 45,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in client applications.
|
||||
/// </summary>
|
||||
Last = 67,
|
||||
|
||||
/// <summary>
|
||||
/// LDAP cannot bind. LDAP bind operation failed.
|
||||
/// </summary>
|
||||
LdapCannotBind = 38,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid LDAP URL.
|
||||
/// </summary>
|
||||
LdapInvalidUrl = 62,
|
||||
|
||||
/// <summary>
|
||||
/// LDAP search failed.
|
||||
/// </summary>
|
||||
LdapSearchFailed = 39,
|
||||
|
||||
/// <summary>
|
||||
/// Library not found. The LDAP library was not found.
|
||||
/// </summary>
|
||||
LibraryNotFound = 40,
|
||||
|
||||
/// <summary>
|
||||
/// Malformat user. User name badly specified. *Not currently used*
|
||||
/// </summary>
|
||||
MalformatUser = 24,
|
||||
|
||||
/// <summary>
|
||||
/// This is not an error. This used to be another error code in an
|
||||
/// old libcurl version and is currently unused.
|
||||
/// </summary>
|
||||
Obsolete = 50,
|
||||
|
||||
/// <summary>
|
||||
/// Operation timeout. The specified time-out period was reached
|
||||
/// according to the conditions.
|
||||
/// </summary>
|
||||
OperationTimeouted = 28,
|
||||
|
||||
/// <summary>
|
||||
/// Out of memory. A memory allocation request failed. This is serious
|
||||
/// badness and things are severely messed up if this ever occurs.
|
||||
/// </summary>
|
||||
OutOfMemory = 27,
|
||||
|
||||
/// <summary>
|
||||
/// A file transfer was shorter or larger than expected. This
|
||||
/// happens when the server first reports an expected transfer size,
|
||||
/// and then delivers data that doesn't match the previously
|
||||
/// given size.
|
||||
/// </summary>
|
||||
PartialFile = 18,
|
||||
|
||||
/// <summary>
|
||||
/// There was a problem reading a local file or an error returned by
|
||||
/// the read callback.
|
||||
/// </summary>
|
||||
ReadError = 26,
|
||||
|
||||
/// <summary>
|
||||
/// Failure with receiving network data.
|
||||
/// </summary>
|
||||
RecvError = 56,
|
||||
|
||||
/// <summary>
|
||||
/// Failed sending network data.
|
||||
/// </summary>
|
||||
SendError = 55,
|
||||
|
||||
/// <summary>
|
||||
/// Sending the data requires a rewind that failed.
|
||||
/// </summary>
|
||||
SendFailRewind = 65,
|
||||
|
||||
/// <summary>
|
||||
/// CurlShare is in use.
|
||||
/// </summary>
|
||||
ShareInUse = 57,
|
||||
|
||||
/// <summary>
|
||||
/// Problem with the CA cert (path? access rights?)
|
||||
/// </summary>
|
||||
SslCaCert = 60,
|
||||
|
||||
/// <summary>
|
||||
/// There's a problem with the local client certificate.
|
||||
/// </summary>
|
||||
SslCertProblem = 58,
|
||||
|
||||
/// <summary>
|
||||
/// Couldn't use specified cipher.
|
||||
/// </summary>
|
||||
SslCipher = 59,
|
||||
|
||||
/// <summary>
|
||||
/// A problem occurred somewhere in the Ssl/TLS handshake. You really
|
||||
/// want to use the <see cref="CurlEasy.CurlDebugCallback" /> delegate and read
|
||||
/// the message there as it pinpoints the problem slightly more. It
|
||||
/// could be certificates (file formats, paths, permissions),
|
||||
/// passwords, and others.
|
||||
/// </summary>
|
||||
SslConnectError = 35,
|
||||
|
||||
/// <summary>
|
||||
/// Failed to initialize Ssl engine.
|
||||
/// </summary>
|
||||
SslEngineInitFailed = 66,
|
||||
|
||||
/// <summary>
|
||||
/// The specified crypto engine wasn't found.
|
||||
/// </summary>
|
||||
SslEngineNotFound = 53,
|
||||
|
||||
/// <summary>
|
||||
/// Failed setting the selected Ssl crypto engine as default!
|
||||
/// </summary>
|
||||
SslEngineSetFailed = 54,
|
||||
|
||||
/// <summary>
|
||||
/// The remote server's Ssl certificate was deemed not OK.
|
||||
/// </summary>
|
||||
SslPeerCertificate = 51,
|
||||
|
||||
/// <summary>
|
||||
/// A telnet option string was improperly formatted.
|
||||
/// </summary>
|
||||
TelnetOptionSyntax = 49,
|
||||
|
||||
/// <summary>
|
||||
/// Too many redirects. When following redirects, libcurl hit the
|
||||
/// maximum amount. Set your limit with
|
||||
/// <see cref="CurlOption.MaxRedirs" />.
|
||||
/// </summary>
|
||||
TooManyRedirects = 47,
|
||||
|
||||
/// <summary>
|
||||
/// An option set with <see cref="CurlOption.TelnetOptions" />
|
||||
/// was not recognized/known. Refer to the appropriate documentation.
|
||||
/// </summary>
|
||||
UnknownTelnetOption = 48,
|
||||
|
||||
/// <summary>
|
||||
/// The URL you passed to libcurl used a protocol that this libcurl
|
||||
/// does not support. The support might be a compile-time option that
|
||||
/// wasn't used, it can be a misspelled protocol string or just a
|
||||
/// protocol libcurl has no code for.
|
||||
/// </summary>
|
||||
UnsupportedProtocol = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The URL was not properly formatted.
|
||||
/// </summary>
|
||||
UrlMalformat = 3,
|
||||
|
||||
/// <summary>
|
||||
/// URL user malformatted. The user-part of the URL syntax was not
|
||||
/// correct.
|
||||
/// </summary>
|
||||
UrlMalformatUser = 4,
|
||||
|
||||
/// <summary>
|
||||
/// An error occurred when writing received data to a local file,
|
||||
/// or an error was returned to libcurl from a write callback.
|
||||
/// </summary>
|
||||
WriteError = 23,
|
||||
};
|
||||
}
|
@@ -1,76 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* Project: libcurl.NET
|
||||
*
|
||||
* Copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
* $Id: Enums.cs,v 1.1 2005/02/17 22:47:25 jeffreyphillips Exp $
|
||||
**************************************************************************/
|
||||
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// One of these is returned by <see cref="CurlHttpMultiPartForm.AddSection" />.
|
||||
/// </summary>
|
||||
public enum CurlFormCode
|
||||
{
|
||||
/// <summary>
|
||||
/// The section was added properly.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Out-of-memory when adding the section.
|
||||
/// </summary>
|
||||
Memory = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to add the same option more than once to a
|
||||
/// section.
|
||||
/// </summary>
|
||||
OptionTwice = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to pass a <c>null</c> string or byte array in
|
||||
/// one of the arguments.
|
||||
/// </summary>
|
||||
Null = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to pass an unrecognized option in one of the
|
||||
/// arguments.
|
||||
/// </summary>
|
||||
UnknownOption = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Incomplete argument lists.
|
||||
/// </summary>
|
||||
Incomplete = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to provide a nested <c>Array</c>.
|
||||
/// </summary>
|
||||
IllegalArray = 6,
|
||||
|
||||
/// <summary>
|
||||
/// This will not be returned so long as HTTP is enabled, which
|
||||
/// it always is in libcurl.NET.
|
||||
/// </summary>
|
||||
Disabled = 7,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 8
|
||||
};
|
||||
}
|
@@ -1,142 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// These are options available to build a multi-part form section
|
||||
/// in a call to <see cref="CurlHttpMultiPartForm.AddSection" />
|
||||
/// </summary>
|
||||
public enum CurlFormOption
|
||||
{
|
||||
/// <summary>
|
||||
/// Another possibility to send options to
|
||||
/// <see cref="CurlHttpMultiPartForm.AddSection" /> is this option, that
|
||||
/// passes a <see cref="CurlForms" /> array reference as its value.
|
||||
/// Each <see cref="CurlForms" /> array element has a
|
||||
/// <see cref="CurlFormOption" /> and a <c>string</c>. All available
|
||||
/// options can be used in an array, except the <c>Array</c>
|
||||
/// option itself! The last argument in such an array must always be
|
||||
/// <c>End</c>.
|
||||
/// </summary>
|
||||
Array = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c>, tells libcurl that a buffer is to be
|
||||
/// used to upload data instead of using a file.
|
||||
/// </summary>
|
||||
Buffer = 11,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by an <c>int</c> with the size of the
|
||||
/// <c>BufferPtr</c> byte array, tells libcurl the length of
|
||||
/// the data to upload.
|
||||
/// </summary>
|
||||
BufferLength = 13,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>byte[]</c> array, tells libcurl the address of
|
||||
/// the buffer containing data to upload (as indicated with
|
||||
/// <c>Buffer</c>). You must also use
|
||||
/// <c>BufferLength</c> to set the length of the buffer area.
|
||||
/// </summary>
|
||||
BufferPtr = 12,
|
||||
|
||||
/// <summary>
|
||||
/// Specifies extra headers for the form POST section. This takes an
|
||||
/// <see cref="CurlSlist" /> prepared in the usual way using
|
||||
/// <see cref="CurlSlist.Append" /> and appends the list of headers to
|
||||
/// those libcurl automatically generates.
|
||||
/// </summary>
|
||||
ContentHeader = 15,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by an <c>int</c> setting the length of the contents.
|
||||
/// </summary>
|
||||
ContentsLength = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> with a content-type will make cURL
|
||||
/// use this given content-type for this file upload part, possibly
|
||||
/// instead of an internally chosen one.
|
||||
/// </summary>
|
||||
ContentType = 14,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> is used for the contents of this part, the
|
||||
/// actual data to send away. If you'd like it to contain zero bytes,
|
||||
/// you need to set the length of the name with
|
||||
/// <c>ContentsLength</c>.
|
||||
/// </summary>
|
||||
CopyContents = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> used to set the name of this part.
|
||||
/// If you'd like it to contain zero bytes, you need to set the
|
||||
/// length of the name with <c>NameLength</c>.
|
||||
/// </summary>
|
||||
CopyName = 1,
|
||||
|
||||
/// <summary>
|
||||
/// This should be the last argument to a call to
|
||||
/// <see cref="CurlHttpMultiPartForm.AddSection" />.
|
||||
/// </summary>
|
||||
End = 17,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a file name, makes this part a file upload part. It
|
||||
/// sets the file name field to the actual file name used here,
|
||||
/// it gets the contents of the file and passes as data and sets the
|
||||
/// content-type if the given file match one of the new internally
|
||||
/// known file extension. For <c>File</c> the user may send
|
||||
/// one or more files in one part by providing multiple <c>File</c>
|
||||
/// arguments each followed by the filename (and each <c>File</c>
|
||||
/// is allowed to have a <c>ContentType</c>).
|
||||
/// </summary>
|
||||
File = 10,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a file name, and does the file read: the contents
|
||||
/// will be used in as data in this part.
|
||||
/// </summary>
|
||||
FileContent = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> file name, will make libcurl use the
|
||||
/// given name in the file upload part, instead of the actual file
|
||||
/// name given to <c>File</c>.
|
||||
/// </summary>
|
||||
Filename = 16,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by an <c>int</c> setting the length of the name.
|
||||
/// </summary>
|
||||
NameLength = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Not used.
|
||||
/// </summary>
|
||||
Nothing = 0,
|
||||
|
||||
/// <summary>
|
||||
/// No longer used.
|
||||
/// </summary>
|
||||
Obsolete = 9,
|
||||
|
||||
/// <summary>
|
||||
/// No longer used.
|
||||
/// </summary>
|
||||
Obsolete2 = 18,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>byte[]</c> used for the contents of this part.
|
||||
/// If you'd like it to contain zero bytes, you need to set the
|
||||
/// length of the name with <c>ContentsLength</c>.
|
||||
/// </summary>
|
||||
PtrContents = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>byte[]</c> used for the name of this part.
|
||||
/// If you'd like it to contain zero bytes, you need to set the
|
||||
/// length of the name with <c>NameLength</c>.
|
||||
/// </summary>
|
||||
PtrName = 2
|
||||
};
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the FTP Ssl
|
||||
/// authorization level using the
|
||||
/// <see cref="CurlOption.FtpSslAuth" /> option when calling
|
||||
/// <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlFtpAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// Let <c>libcurl</c> decide on the authorization scheme.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use "AUTH Ssl".
|
||||
/// </summary>
|
||||
SSL = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Use "AUTH TLS".
|
||||
/// </summary>
|
||||
TLS = 2,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker. Do not use in a client application.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the FTP Ssl level
|
||||
/// using the <see cref="CurlOption.FtpSsl" /> option when calling
|
||||
/// <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlFtpSsl
|
||||
{
|
||||
/// <summary>
|
||||
/// Don't attempt to use Ssl.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Try using Ssl, proceed as normal otherwise.
|
||||
/// </summary>
|
||||
Try = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Require Ssl for the control connection or fail with
|
||||
/// <see cref="CurlCode.FtpSslFailed" />.
|
||||
/// </summary>
|
||||
Control = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Require Ssl for all communication or fail with
|
||||
/// <see cref="CurlCode.FtpSslFailed" />.
|
||||
/// </summary>
|
||||
All = 3,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker. Do not use in a client application.
|
||||
/// </summary>
|
||||
Last = 4
|
||||
};
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the HTTP authentication
|
||||
/// when using the <see cref="CurlOption.HttpAuth" /> option when
|
||||
/// calling <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlHttpAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// No authentication.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP Basic authentication. This is the default choice, and the
|
||||
/// only method that is in wide-spread use and supported virtually
|
||||
/// everywhere. This is sending the user name and password over the
|
||||
/// network in plain text, easily captured by others.
|
||||
/// </summary>
|
||||
Basic = 1,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP Digest authentication. Digest authentication is defined
|
||||
/// in RFC2617 and is a more secure way to do authentication over
|
||||
/// public networks than the regular old-fashioned Basic method.
|
||||
/// </summary>
|
||||
Digest = 2,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known
|
||||
/// as plain "Negotiate") method was designed by Microsoft and is
|
||||
/// used in their web applications. It is primarily meant as a
|
||||
/// support for Kerberos5 authentication but may be also used along
|
||||
/// with another authentication methods. For more information see IETF
|
||||
/// draft draft-brezak-spnego-http-04.txt.
|
||||
/// <note>
|
||||
/// You need to use a version of libcurl.NET built with a suitable
|
||||
/// GSS-API library for this to work. This is not currently standard.
|
||||
/// </note>
|
||||
/// </summary>
|
||||
GssNegotiate = 4,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP Ntlm authentication. A proprietary protocol invented and
|
||||
/// used by Microsoft. It uses a challenge-response and hash concept
|
||||
/// similar to Digest, to prevent the password from being eavesdropped.
|
||||
/// </summary>
|
||||
Ntlm = 8,
|
||||
|
||||
/// <summary>
|
||||
/// This is a convenience macro that sets all bits and thus makes
|
||||
/// libcurl pick any it finds suitable. libcurl will automatically
|
||||
/// select the one it finds most secure.
|
||||
/// </summary>
|
||||
Any = 15, // ~0
|
||||
|
||||
/// <summary>
|
||||
/// This is a convenience macro that sets all bits except Basic
|
||||
/// and thus makes libcurl pick any it finds suitable. libcurl
|
||||
/// will automatically select the one it finds most secure.
|
||||
/// </summary>
|
||||
AnySafe = 14 // ~Basic
|
||||
};
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the HTTP version level when using
|
||||
/// the <see cref="CurlOption.HttpVersion" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlHttpVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// We don't care about what version the library uses. libcurl will
|
||||
/// use whatever it thinks fit.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce HTTP 1.0 requests.
|
||||
/// </summary>
|
||||
Http1_0 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce HTTP 1.1 requests.
|
||||
/// </summary>
|
||||
Http1_1 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce HTTP 2 requests.
|
||||
/// </summary>
|
||||
Http2_0 = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce version 2 for HTTPS, version 1.1 for HTTP.
|
||||
/// </summary>
|
||||
Http2_Tls = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce HTTP 2 without HTTP/1.1 upgrade.
|
||||
/// </summary>
|
||||
Http2_PriorKnowledge = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
}
|
||||
}
|
@@ -1,222 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration is used to extract information associated with an
|
||||
/// <see cref="CurlEasy" /> transfer. Specifically, a member of this
|
||||
/// enumeration is passed as the first argument to
|
||||
/// CurlEasy.GetInfo specifying the item to retrieve in the
|
||||
/// second argument, which is a reference to an <c>int</c>, a
|
||||
/// <c>double</c>, a <c>string</c>, a <c>DateTime</c> or an <c>object</c>.
|
||||
/// </summary>
|
||||
public enum CurlInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The second argument receives the elapsed time, as a <c>double</c>,
|
||||
/// in seconds, from the start until the connect to the remote host
|
||||
/// (or proxy) was completed.
|
||||
/// </summary>
|
||||
ConnectTime = 0x300005,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the content-length
|
||||
/// of the download. This is the value read from the Content-Length: field.
|
||||
/// </summary>
|
||||
ContentLengthDownload = 0x30000F,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the specified size
|
||||
/// of the upload.
|
||||
/// </summary>
|
||||
ContentLengthUpload = 0x300010,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>string</c>, the content-type of
|
||||
/// the downloaded object. This is the value read from the Content-Type:
|
||||
/// field. If you get <c>null</c>, it means that the server didn't
|
||||
/// send a valid Content-Type header or that the protocol used
|
||||
/// doesn't support this.
|
||||
/// </summary>
|
||||
ContentType = 0x100012,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>string</c>, the last
|
||||
/// used effective URL.
|
||||
/// </summary>
|
||||
EffectiveUrl = 0x100001,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>long</c>, the remote time
|
||||
/// of the retrieved document. You should construct a <c>DateTime</c>
|
||||
/// from this value, as shown in the <c>InfoDemo</c> sample. If you
|
||||
/// get a date in the distant
|
||||
/// past, it can be because of many reasons (unknown, the server
|
||||
/// hides it or the server doesn't support the command that tells
|
||||
/// document time etc) and the time of the document is unknown. Note
|
||||
/// that you must tell the server to collect this information before
|
||||
/// the transfer is made, by using the
|
||||
/// <see cref="CurlOption.Filetime" /> option to
|
||||
/// <see cref="CurlEasy.SetOpt" />. (Added in 7.5)
|
||||
/// </summary>
|
||||
Filetime = 0x20000E,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> specifying the total size
|
||||
/// of all the headers received.
|
||||
/// </summary>
|
||||
HeaderSize = 0x20000B,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as an <c>int</c>, a bitmask indicating
|
||||
/// the authentication method(s) available. The meaning of the bits is
|
||||
/// explained in the documentation of
|
||||
/// <see cref="CurlOption.HttpAuth" />. (Added in 7.10.8)
|
||||
/// </summary>
|
||||
HttpAuthAvail = 0x200017,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the numeric
|
||||
/// connect code for the HTTP request.
|
||||
/// </summary>
|
||||
HttpConnectCode = 0x200016,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in client applications.
|
||||
/// </summary>
|
||||
LastOne = 0x1C,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the time, in
|
||||
/// seconds it took from the start until the name resolving was
|
||||
/// completed.
|
||||
/// </summary>
|
||||
NameLookupTime = 0x300004,
|
||||
|
||||
/// <summary>
|
||||
/// Never used.
|
||||
/// </summary>
|
||||
None = 0x0,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the
|
||||
/// number of current connections. (Added in 7.13.0)
|
||||
/// </summary>
|
||||
NumConnects = 0x20001A,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the operating
|
||||
/// system error number: <c>_errro</c> or <c>GetLastError()</c>,
|
||||
/// depending on the platform. (Added in 7.12.2)
|
||||
/// </summary>
|
||||
OsErrno = 0x200019,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the time, in
|
||||
/// seconds, it took from the start until the file transfer is just about
|
||||
/// to begin. This includes all pre-transfer commands and negotiations
|
||||
/// that are specific to the particular protocol(s) involved.
|
||||
/// </summary>
|
||||
PreTransferTime = 0x300006,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a reference to the private data
|
||||
/// associated with the <see cref="CurlEasy" /> object (set with the
|
||||
/// <see cref="CurlOption.Private" /> option to
|
||||
/// <see cref="CurlEasy.SetOpt" />. (Added in 7.10.3)
|
||||
/// </summary>
|
||||
Private = 0x100015,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as an <c>int</c>, a bitmask
|
||||
/// indicating the authentication method(s) available for your
|
||||
/// proxy authentication. This will be a bitmask of
|
||||
/// <see cref="CurlHttpAuth" /> enumeration constants.
|
||||
/// (Added in 7.10.8)
|
||||
/// </summary>
|
||||
ProxyAuthAvail = 0x200018,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the total
|
||||
/// number of redirections that were actually followed. (Added in 7.9.7)
|
||||
/// </summary>
|
||||
RedirectCount = 0x200014,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the total time, in
|
||||
/// seconds, for all redirection steps include name lookup, connect,
|
||||
/// pretransfer and transfer before final transaction was started.
|
||||
/// <c>RedirectTime</c> contains the complete execution
|
||||
/// time for multiple redirections. (Added in 7.9.7)
|
||||
/// </summary>
|
||||
RedirectTime = 0x300013,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> containing the total size
|
||||
/// of the issued requests. This is so far only for HTTP requests. Note
|
||||
/// that this may be more than one request if
|
||||
/// <see cref="CurlOption.FollowLocation" /> is <c>true</c>.
|
||||
/// </summary>
|
||||
RequestSize = 0x20000C,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> with the last received HTTP
|
||||
/// or FTP code. This option was known as <c>CURLINFO_HTTP_CODE</c> in
|
||||
/// libcurl 7.10.7 and earlier.
|
||||
/// </summary>
|
||||
ResponseCode = 0x200002,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the total amount of
|
||||
/// bytes that were downloaded. The amount is only for the latest transfer
|
||||
/// and will be reset again for each new transfer.
|
||||
/// </summary>
|
||||
SizeDownload = 0x300008,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the total amount
|
||||
/// of bytes that were uploaded.
|
||||
/// </summary>
|
||||
SizeUpload = 0x300007,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the average
|
||||
/// download speed that cURL measured for the complete download.
|
||||
/// </summary>
|
||||
SpeedDownload = 0x300009,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the average
|
||||
/// upload speed that libcurl measured for the complete upload.
|
||||
/// </summary>
|
||||
SpeedUpload = 0x30000A,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <see cref="CurlSlist" /> containing
|
||||
/// the names of the available Ssl engines.
|
||||
/// </summary>
|
||||
SslEngines = 0x40001B,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> with the result of
|
||||
/// the certificate verification that was requested (using the
|
||||
/// <see cref="CurlOption.SslVerifyPeer" /> option in
|
||||
/// <see cref="CurlEasy.SetOpt" />.
|
||||
/// </summary>
|
||||
SslVerifyResult = 0x20000D,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> specifying the time,
|
||||
/// in seconds, from the start until the first byte is just about to be
|
||||
/// transferred. This includes <c>PreTransferTime</c> and
|
||||
/// also the time the server needs to calculate the result.
|
||||
/// </summary>
|
||||
StartTransferTime = 0x300011,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> indicating the total transaction
|
||||
/// time in seconds for the previous transfer. This time does not include
|
||||
/// the connect time, so if you want the complete operation time,
|
||||
/// you should add the <c>ConnectTime</c>.
|
||||
/// </summary>
|
||||
TotalTime = 0x300003,
|
||||
};
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// A member of this enumeration is passed as the first parameter to the
|
||||
/// <see cref="CurlEasy.CurlDebugCallback" /> delegate to which libcurl passes
|
||||
/// debug messages.
|
||||
/// </summary>
|
||||
public enum CurlInfoType
|
||||
{
|
||||
/// <summary>
|
||||
/// The data is informational text.
|
||||
/// </summary>
|
||||
Text = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The data is header (or header-like) data received from the peer.
|
||||
/// </summary>
|
||||
HeaderIn = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The data is header (or header-like) data sent to the peer.
|
||||
/// </summary>
|
||||
HeaderOut = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The data is protocol data received from the peer.
|
||||
/// </summary>
|
||||
DataIn = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The data is protocol data sent to the peer.
|
||||
/// </summary>
|
||||
DataOut = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The data is Ssl-related data sent to the peer.
|
||||
/// </summary>
|
||||
SslDataIn = 5,
|
||||
|
||||
/// <summary>
|
||||
/// The data is Ssl-related data received from the peer.
|
||||
/// </summary>
|
||||
SslDataOut = 6,
|
||||
|
||||
/// <summary>
|
||||
/// End of enumeration marker, don't use in a client application.
|
||||
/// </summary>
|
||||
End = 7
|
||||
};
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to initialize libcurl internally. One of
|
||||
/// these is passed in the call to <see cref="Curl.GlobalInit" />.
|
||||
/// </summary>
|
||||
public enum CurlInitFlag
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialise nothing extra. This sets no bit.
|
||||
/// </summary>
|
||||
Nothing = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize Ssl.
|
||||
/// </summary>
|
||||
Ssl = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the Win32 socket libraries.
|
||||
/// </summary>
|
||||
Win32 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize everything possible. This sets all known bits.
|
||||
/// </summary>
|
||||
All = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <c>All</c>.
|
||||
/// </summary>
|
||||
Default = All
|
||||
};
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Your handler for the <see cref="CurlEasy.CurlIoctlCallback" />
|
||||
/// delegate is passed one of these values as its first parameter.
|
||||
/// Right now, the only supported value is
|
||||
/// <code>RestartRead</code>.
|
||||
/// </summary>
|
||||
public enum CurlIoCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// No IOCTL operation; we should never see this.
|
||||
/// </summary>
|
||||
Nop = 0,
|
||||
|
||||
/// <summary>
|
||||
/// When this is sent, your callback may need to, for example,
|
||||
/// rewind a local file that is being sent via FTP.
|
||||
/// </summary>
|
||||
RestartRead = 1,
|
||||
|
||||
/// <summary>
|
||||
/// End of enumeration marker, don't use in a client application.
|
||||
/// </summary>
|
||||
Last = 2
|
||||
}
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Your handler for the <see cref="CurlEasy.CurlIoctlCallback" /> delegate
|
||||
/// should return a member of this enumeration.
|
||||
/// </summary>
|
||||
public enum CurlIoError
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicate that the callback processed everything okay.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Unknown command sent to callback. Right now, only
|
||||
/// <code>RestartRead</code> is supported.
|
||||
/// </summary>
|
||||
UnknownCommand = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Indicate to libcurl that a restart failed.
|
||||
/// </summary>
|
||||
FailRestart = 2,
|
||||
|
||||
/// <summary>
|
||||
/// End of enumeration marker, don't use in a client application.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
}
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the IP resolution
|
||||
/// method when using the <see cref="CurlOption.IpResolve" />
|
||||
/// option in a call to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlIpResolve
|
||||
{
|
||||
/// <summary>
|
||||
/// Default, resolves addresses to all IP versions that your system
|
||||
/// allows.
|
||||
/// </summary>
|
||||
Whatever = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Resolve to ipv4 addresses.
|
||||
/// </summary>
|
||||
V4 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Resolve to ipv6 addresses.
|
||||
/// </summary>
|
||||
V6 = 2
|
||||
};
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Values containing the type of shared access requested when libcurl
|
||||
/// calls the <see cref="CurlShare.CurlShareLockCallback" /> delegate.
|
||||
/// </summary>
|
||||
public enum CurlLockAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Unspecified action; the delegate should never receive this.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The delegate receives this call when libcurl is requesting
|
||||
/// read access to the shared resource.
|
||||
/// </summary>
|
||||
Shared = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The delegate receives this call when libcurl is requesting
|
||||
/// write access to the shared resource.
|
||||
/// </summary>
|
||||
Single = 2,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Members of this enumeration should be passed to
|
||||
/// <see cref="CurlShare.SetOpt" /> when it is called with the
|
||||
/// <c>CurlShare</c> or <c>Unshare</c> options
|
||||
/// provided in the <see cref="CurlShareOption" /> enumeration.
|
||||
/// </summary>
|
||||
public enum CurlLockData
|
||||
{
|
||||
/// <summary>
|
||||
/// Not used.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Used internally by libcurl.
|
||||
/// </summary>
|
||||
Share = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Cookie data will be shared across the <see cref="CurlEasy" /> objects
|
||||
/// using this shared object.
|
||||
/// </summary>
|
||||
Cookie = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Cached Dns hosts will be shared across the <see cref="CurlEasy" />
|
||||
/// objects using this shared object.
|
||||
/// </summary>
|
||||
Dns = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Not supported yet.
|
||||
/// </summary>
|
||||
SslSession = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Not supported yet.
|
||||
/// </summary>
|
||||
Connect = 5,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
};
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// The status code associated with an <see cref="CurlEasy" /> object in a
|
||||
/// <see cref="CurlMulti" /> operation. One of these is returned in response
|
||||
/// to reading the <see cref="CurlMultiInfo.Msg" /> property.
|
||||
/// </summary>
|
||||
public enum CurlMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// First entry in the enumeration, not used.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The associated <see cref="CurlEasy" /> object completed.
|
||||
/// </summary>
|
||||
Done = 1,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker, not used.
|
||||
/// </summary>
|
||||
Last = 2
|
||||
};
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains return codes for many of the functions in the
|
||||
/// <see cref="CurlMulti" /> class.
|
||||
/// </summary>
|
||||
public enum CurlMultiCode
|
||||
{
|
||||
/// <summary>
|
||||
/// You should call <see cref="CurlMulti.Perform" /> again before calling
|
||||
/// <see cref="CurlMulti.Select" />.
|
||||
/// </summary>
|
||||
CallMultiPerform = -1,
|
||||
|
||||
/// <summary>
|
||||
/// The function succeded.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The internal <see cref="CurlMulti" /> is bad.
|
||||
/// </summary>
|
||||
BadHandle = 1,
|
||||
|
||||
/// <summary>
|
||||
/// One of the <see cref="CurlEasy" /> handles associated with the
|
||||
/// <see cref="CurlMulti" /> object is bad.
|
||||
/// </summary>
|
||||
BadEasyHandle = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Out of memory. This is a severe problem.
|
||||
/// </summary>
|
||||
OutOfMemory = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Internal error deep within the libcurl library.
|
||||
/// </summary>
|
||||
InternalError = 4,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker, not used.
|
||||
/// </summary>
|
||||
Last = 5
|
||||
};
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
//
|
||||
// Copyright (c) 2017, Dr. Masroor Ehsan. All rights reserved.
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Last modified: 25.01.2017 1:29 AM
|
||||
//
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
public enum CurlMultiOption
|
||||
{
|
||||
/* This is the socket callback function pointer */
|
||||
SocketFunction = CurlOptType.FunctionPoint + 1,
|
||||
/* This is the argument passed to the socket callback */
|
||||
SocketData = CurlOptType.ObjectPoint + 2,
|
||||
/* set to 1 to enable pipelining for this multi handle */
|
||||
Pipelining = CurlOptType.Long + 3,
|
||||
/* This is the timer callback function pointer */
|
||||
TimerFunction = CurlOptType.FunctionPoint + 4,
|
||||
/* This is the argument passed to the timer callback */
|
||||
TimerDate = CurlOptType.ObjectPoint + 5,
|
||||
/* maximum number of entries in the connection cache */
|
||||
MaxConnects = CurlOptType.Long + 6,
|
||||
/* maximum number of (pipelining) connections to one host */
|
||||
MaxHostConnections = CurlOptType.Long + 7,
|
||||
/* maximum number of requests in a pipeline */
|
||||
MaxPipelineLength = CurlOptType.Long + 8,
|
||||
/* a connection with a content-length longer than this will not be considered for pipelining */
|
||||
ContentLengthPenaltySize = CurlOptType.Offset + 9,
|
||||
/* a connection with a chunk length longer than this will not be considered for pipelining */
|
||||
ChunkLengthPenaltySize = CurlOptType.Offset + 10,
|
||||
/* a list of site names(+port) that are blacklisted from pipelining */
|
||||
PipeliningSiteBlackList = CurlOptType.ObjectPoint + 11,
|
||||
/* a list of server types that are blacklisted from pipelining */
|
||||
PipeliningServerBlackList = CurlOptType.ObjectPoint + 12,
|
||||
/* maximum number of open connections in total */
|
||||
MaxTotalConnections = CurlOptType.Long + 13,
|
||||
/* This is the server push callback function pointer */
|
||||
PushFunction = CurlOptType.FunctionPoint + 14,
|
||||
/* This is the argument passed to the server push callback */
|
||||
PushData = CurlOptType.ObjectPoint + 15
|
||||
}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the preference of libcurl between
|
||||
/// using user names and passwords from your ~/.netrc file, relative to
|
||||
/// user names and passwords in the URL supplied with
|
||||
/// <see cref="CurlOption.Url" />. This is passed when using
|
||||
/// the <see cref="CurlOption.Netrc" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlNetrcOption
|
||||
{
|
||||
/// <summary>
|
||||
/// The library will ignore the file and use only the information
|
||||
/// in the URL. This is the default.
|
||||
/// </summary>
|
||||
Ignored = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The use of your ~/.netrc file is optional, and information in the
|
||||
/// URL is to be preferred. The file will be scanned with the host
|
||||
/// and user name (to find the password only) or with the host only,
|
||||
/// to find the first user name and password after that machine,
|
||||
/// which ever information is not specified in the URL.
|
||||
/// <para>
|
||||
/// Undefined values of the option will have this effect.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
Optional = 1,
|
||||
|
||||
/// <summary>
|
||||
/// This value tells the library that use of the file is required,
|
||||
/// to ignore the information in the URL, and to search the file
|
||||
/// with the host only.
|
||||
/// </summary>
|
||||
Required = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
//
|
||||
// Copyright (c) 2017, Dr. Masroor Ehsan. All rights reserved.
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Last modified: 25.01.2017 1:31 AM
|
||||
//
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
public enum CurlOptType
|
||||
{
|
||||
Long = 0,
|
||||
ObjectPoint = 10000,
|
||||
StringPoint = 10000,
|
||||
FunctionPoint = 20000,
|
||||
Offset = 30000
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
//
|
||||
// Copyright (c) 2017, Dr. Masroor Ehsan. All rights reserved.
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Last modified: 25.01.2017 1:23 AM
|
||||
//
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/* bitmask bits for CURLMOPT_PIPELINING */
|
||||
|
||||
public enum CurlPipelining : long
|
||||
{
|
||||
Nothing = 0,
|
||||
Http1 = 1,
|
||||
Multiplex = 2
|
||||
}
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the proxy type when
|
||||
/// using the <see cref="CurlOption.Proxy" /> option when calling
|
||||
/// <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlProxyType
|
||||
{
|
||||
/// <summary>
|
||||
/// Ordinary HTTP proxy.
|
||||
/// </summary>
|
||||
Http = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use if the proxy supports SOCKS4 user authentication. If you're
|
||||
/// unfamiliar with this, consult your network administrator.
|
||||
/// </summary>
|
||||
Socks4 = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Use if the proxy supports SOCKS5 user authentication. If you're
|
||||
/// unfamiliar with this, consult your network administrator.
|
||||
/// </summary>
|
||||
Socks5 = 5
|
||||
};
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains return codes from many of the functions in the
|
||||
/// <see cref="CurlShare" /> class.
|
||||
/// </summary>
|
||||
public enum CurlShareCode
|
||||
{
|
||||
/// <summary>
|
||||
/// The function succeeded.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// A bad option was passed to <see cref="CurlShare.SetOpt" />.
|
||||
/// </summary>
|
||||
BadOption = 1,
|
||||
|
||||
/// <summary>
|
||||
/// An attempt was made to pass an option to
|
||||
/// <see cref="CurlShare.SetOpt" /> while the CurlShare object is in use.
|
||||
/// </summary>
|
||||
InUse = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="CurlShare" /> object's internal handle is invalid.
|
||||
/// </summary>
|
||||
Invalid = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Out of memory. This is a severe problem.
|
||||
/// </summary>
|
||||
NoMem = 4,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 5
|
||||
};
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// A member of this enumeration is passed to the function
|
||||
/// <see cref="CurlShare.SetOpt" /> to configure a <see cref="CurlShare" />
|
||||
/// transfer.
|
||||
/// </summary>
|
||||
public enum CurlShareOption
|
||||
{
|
||||
/// <summary>
|
||||
/// Start-of-enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter, which should be a member of the
|
||||
/// <see cref="CurlLockData" /> enumeration, specifies a type of
|
||||
/// data that should be shared.
|
||||
/// </summary>
|
||||
Share = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter, which should be a member of the
|
||||
/// <see cref="CurlLockData" /> enumeration, specifies a type of
|
||||
/// data that should be unshared.
|
||||
/// </summary>
|
||||
Unshare = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter should be a reference to a
|
||||
/// <see cref="CurlShare.CurlShareLockCallback" /> delegate.
|
||||
/// </summary>
|
||||
LockFunction = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter should be a reference to a
|
||||
/// <see cref="CurlShare.CurlShareUnlockCallback" /> delegate.
|
||||
/// </summary>
|
||||
UnlockFunction = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter allows you to specify an object reference that
|
||||
/// will passed to the <see cref="CurlShare.CurlShareLockCallback" /> delegate and
|
||||
/// the <see cref="CurlShare.CurlShareUnlockCallback" /> delegate.
|
||||
/// </summary>
|
||||
UserData = 5,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
};
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the Ssl version level when using
|
||||
/// the <see cref="CurlOption.SslVersion" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlSslVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// Use whatever version the Ssl library selects.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use TLS version 1.
|
||||
/// </summary>
|
||||
Tlsv1 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Use Ssl version 2. This is not a good option unless it's the
|
||||
/// only version supported by the remote server.
|
||||
/// </summary>
|
||||
Sslv2 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Use Ssl version 3. This is a preferred option.
|
||||
/// </summary>
|
||||
Sslv3 = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 4
|
||||
};
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the time condition when using
|
||||
/// the <see cref="CurlOption.TimeCondition" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlTimeCond
|
||||
{
|
||||
/// <summary>
|
||||
/// Use no time condition.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The time condition is true if the resource has been modified
|
||||
/// since the date/time passed in
|
||||
/// <see cref="CurlOption.TimeValue" />.
|
||||
/// </summary>
|
||||
IfModSince = 1,
|
||||
|
||||
/// <summary>
|
||||
/// True if the resource has not been modified since the date/time
|
||||
/// passed in <see cref="CurlOption.TimeValue" />.
|
||||
/// </summary>
|
||||
IfUnmodSince = 2,
|
||||
|
||||
/// <summary>
|
||||
/// True if the resource's last modification date/time equals that
|
||||
/// passed in <see cref="CurlOption.TimeValue" />.
|
||||
/// </summary>
|
||||
LastMod = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 4
|
||||
};
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// A member of this enumeration is passed to the function
|
||||
/// <see cref="Curl.GetVersionInfo" />
|
||||
/// </summary>
|
||||
public enum CurlVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// Capabilities associated with the initial version of libcurl.
|
||||
/// </summary>
|
||||
First = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Capabilities associated with the second version of libcurl.
|
||||
/// </summary>
|
||||
Second = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Capabilities associated with the third version of libcurl.
|
||||
/// </summary>
|
||||
Third = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Same as <c>Third</c>.
|
||||
/// </summary>
|
||||
Now = Third,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
namespace CurlSharp.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// A bitmask of libcurl features OR'd together as the value of the
|
||||
/// property <see cref="CurlVersionInfoData.Features" />. The feature
|
||||
/// bits are summarized in the table below.
|
||||
/// </summary>
|
||||
public enum CurlVersionFeatureBitmask
|
||||
{
|
||||
/// <summary>
|
||||
/// Supports Ipv6.
|
||||
/// </summary>
|
||||
Ipv6 = 0x01,
|
||||
|
||||
/// <summary>
|
||||
/// Supports kerberos4 (when using FTP).
|
||||
/// </summary>
|
||||
Kerberos64 = 0x02,
|
||||
|
||||
/// <summary>
|
||||
/// Supports Ssl (HTTPS/FTPS).
|
||||
/// </summary>
|
||||
Ssl = 0x04,
|
||||
|
||||
/// <summary>
|
||||
/// Supports HTTP deflate using libz.
|
||||
/// </summary>
|
||||
LibZ = 0x08,
|
||||
|
||||
/// <summary>
|
||||
/// Supports HTTP Ntlm (added in 7.10.6).
|
||||
/// </summary>
|
||||
Ntlm = 0x10,
|
||||
|
||||
/// <summary>
|
||||
/// Supports HTTP GSS-Negotiate (added in 7.10.6).
|
||||
/// </summary>
|
||||
GssNegotiate = 0x20,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with extra debug capabilities built-in. This
|
||||
/// is mainly of interest for libcurl hackers. (added in 7.10.6)
|
||||
/// </summary>
|
||||
Debug = 0x40,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for asynchronous name lookups,
|
||||
/// which allows more exact timeouts (even on Windows) and less
|
||||
/// blocking when using the multi interface. (added in 7.10.7)
|
||||
/// </summary>
|
||||
AsynchDns = 0x80,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for Spnego authentication
|
||||
/// (Simple and Protected GSS-API Negotiation Mechanism, defined
|
||||
/// in RFC 2478.) (added in 7.10.8)
|
||||
/// </summary>
|
||||
Spnego = 0x100,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for large files.
|
||||
/// </summary>
|
||||
LargeFile = 0x200,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for IDNA, domain names with
|
||||
/// international letters.
|
||||
/// </summary>
|
||||
Idn = 0x400
|
||||
};
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
Copyright (c) 2013, Masroor Ehsan Choudhury
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the {organization} nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
https://github.com/masroore/CurlSharp
|
@@ -1,619 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013-2017 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
* Portions copyright (c) 2017 Katelyn Gigante (https://github.com/silasary)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
//#define USE_LIBCURLSHIM
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using CurlSharp.Enums;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// P/Invoke signatures.
|
||||
/// </summary>
|
||||
internal static unsafe class NativeMethods
|
||||
{
|
||||
private const string LIBCURL = "libcurl";
|
||||
|
||||
private const string LIBCURLSHIM = "libcurlshim";
|
||||
|
||||
private const string LIBC_LINUX = "libc";
|
||||
|
||||
private const string WINSOCK_LIB = "ws2_32.dll";
|
||||
|
||||
private const string LIB_DIR_WIN64 = "amd64";
|
||||
|
||||
private const string LIB_DIR_WIN32 = "i386";
|
||||
|
||||
static NativeMethods()
|
||||
{
|
||||
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
{
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
SetDllDirectory(Path.Combine(AssemblyDirectory, LIB_DIR_WIN64));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDllDirectory(Path.Combine(AssemblyDirectory, LIB_DIR_WIN32));
|
||||
}
|
||||
}
|
||||
#if USE_LIBCURLSHIM
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
throw new InvalidOperationException("Can not run on other platform than Win NET");
|
||||
#endif
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool SetDllDirectory(string lpPathName);
|
||||
|
||||
private static string AssemblyDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
var codeBase = typeof(NativeMethods).GetTypeInfo().Assembly.CodeBase;
|
||||
var uri = new UriBuilder(codeBase);
|
||||
var path = Uri.UnescapeDataString(uri.Path);
|
||||
return Path.GetDirectoryName(path);
|
||||
}
|
||||
}
|
||||
|
||||
#region curl_global_init
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_global_init(int flags);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_global_cleanup
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_global_cleanup();
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_escape
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr curl_easy_escape(IntPtr pEasy, string url, int length);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_unescape
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr curl_easy_unescape(IntPtr pEasy, string url, int inLength, out int outLength);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_free
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_free(IntPtr p);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_version
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_version();
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_version_info
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_version_info(CurlVersion ver);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_init
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_easy_init();
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_cleanup
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_easy_cleanup(IntPtr pCurl);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_setopt
|
||||
|
||||
#region Delegates
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate int _CurlGenericCallback(IntPtr ptr, int sz, int nmemb, IntPtr userdata);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate int _CurlProgressCallback(
|
||||
IntPtr extraData,
|
||||
double dlTotal,
|
||||
double dlNow,
|
||||
double ulTotal,
|
||||
double ulNow);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate int _CurlDebugCallback(
|
||||
IntPtr ptrCurl,
|
||||
CurlInfoType infoType,
|
||||
string message,
|
||||
int size,
|
||||
IntPtr ptrUserData);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate int _CurlSslCtxCallback(IntPtr ctx, IntPtr parm);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate CurlIoError _CurlIoctlCallback(CurlIoCommand cmd, IntPtr parm);
|
||||
|
||||
#endregion
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, IntPtr parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, string parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, byte[] parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, long parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, bool parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, _CurlGenericCallback parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, _CurlProgressCallback parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, _CurlDebugCallback parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, _CurlSslCtxCallback parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_setopt(IntPtr pCurl, CurlOption opt, _CurlIoctlCallback parm);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_perform
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_perform(IntPtr pCurl);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_duphandle
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_easy_duphandle(IntPtr pCurl);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_strerror
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_easy_strerror(CurlCode err);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_getinfo
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_getinfo(IntPtr pCurl, CurlInfo info, ref IntPtr pInfo);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlCode curl_easy_getinfo(IntPtr pCurl, CurlInfo info, ref double dblVal);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_easy_reset
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_easy_reset(IntPtr pCurl);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_init
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_multi_init();
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_cleanup
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_cleanup(IntPtr pmulti);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_add_handle
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_add_handle(IntPtr pmulti, IntPtr peasy);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_remove_handle
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_remove_handle(IntPtr pmulti, IntPtr peasy);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_setopt
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_setopt(IntPtr pmulti, CurlMultiOption opt, bool parm);
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_setopt(IntPtr pmulti, CurlMultiOption opt, long parm);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_strerror
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_multi_strerror(CurlMultiCode errorNum);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_multi_perform
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_perform(IntPtr pmulti, ref int runningHandles);
|
||||
|
||||
#endregion
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
|
||||
#region curl_multi_fdset
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_multi_fdset(IntPtr pmulti,
|
||||
[In] [Out] ref fd_set read_fd_set,
|
||||
[In] [Out] ref fd_set write_fd_set,
|
||||
[In] [Out] ref fd_set exc_fd_set,
|
||||
[In] [Out] ref int max_fd);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct fd_set
|
||||
{
|
||||
public uint fd_count;
|
||||
|
||||
// [MarshalAs(UnmanagedType.ByValArray, SizeConst = FD_SETSIZE)] public IntPtr[] fd_array;
|
||||
public fixed uint fd_array[FD_SETSIZE];
|
||||
|
||||
public const int FD_SETSIZE = 64;
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
// fd_array = null;
|
||||
}
|
||||
|
||||
public static fd_set Create()
|
||||
{
|
||||
return new fd_set
|
||||
{
|
||||
// fd_array = new IntPtr[FD_SETSIZE],
|
||||
fd_count = 0
|
||||
};
|
||||
}
|
||||
|
||||
public static fd_set Create(IntPtr socket)
|
||||
{
|
||||
var handle = Create();
|
||||
handle.fd_count = 1;
|
||||
handle.fd_array[0] = (uint)socket;
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
|
||||
public static void FD_ZERO(fd_set fds)
|
||||
{
|
||||
for (var i = 0; i < fd_set.FD_SETSIZE; i++)
|
||||
{
|
||||
fds.fd_array[i] = 0;
|
||||
}
|
||||
fds.fd_count = 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region select
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct timeval
|
||||
{
|
||||
/// <summary>
|
||||
/// Time interval, in seconds.
|
||||
/// </summary>
|
||||
public int tv_sec;
|
||||
|
||||
/// <summary>
|
||||
/// Time interval, in microseconds.
|
||||
/// </summary>
|
||||
public int tv_usec;
|
||||
|
||||
public static timeval Create(int milliseconds)
|
||||
{
|
||||
return new timeval
|
||||
{
|
||||
tv_sec = milliseconds / 1000,
|
||||
tv_usec = milliseconds % 1000 * 1000
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(LIBC_LINUX, EntryPoint = "select")]
|
||||
private static extern int select_unix(
|
||||
int nfds, // number of sockets, (ignored in winsock)
|
||||
[In] [Out] ref fd_set readfds, // read sockets to watch
|
||||
[In] [Out] ref fd_set writefds, // write sockets to watch
|
||||
[In] [Out] ref fd_set exceptfds, // error sockets to watch
|
||||
ref timeval timeout);
|
||||
|
||||
[DllImport(WINSOCK_LIB, EntryPoint = "select")]
|
||||
private static extern int select_win(
|
||||
int nfds, // number of sockets, (ignored in winsock)
|
||||
[In] [Out] ref fd_set readfds, // read sockets to watch
|
||||
[In] [Out] ref fd_set writefds, // write sockets to watch
|
||||
[In] [Out] ref fd_set exceptfds, // error sockets to watch
|
||||
ref timeval timeout);
|
||||
|
||||
public static int select(
|
||||
int nfds, // number of sockets, (ignored in winsock)
|
||||
[In] [Out] ref fd_set readfds, // read sockets to watch
|
||||
[In] [Out] ref fd_set writefds, // write sockets to watch
|
||||
[In] [Out] ref fd_set exceptfds, // error sockets to watch
|
||||
ref timeval timeout)
|
||||
{
|
||||
int result;
|
||||
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
{
|
||||
result = select_win(
|
||||
nfds, // number of sockets, (ignored in winsock)
|
||||
ref readfds, // read sockets to watch
|
||||
ref writefds, // write sockets to watch
|
||||
ref exceptfds, // error sockets to watch
|
||||
ref timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = select_unix(
|
||||
nfds, // number of sockets, (ignored in winsock)
|
||||
ref readfds, // read sockets to watch
|
||||
ref writefds, // write sockets to watch
|
||||
ref exceptfds, // error sockets to watch
|
||||
ref timeout);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endif
|
||||
|
||||
#region curl_share_init
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_share_init();
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_share_cleanup
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlShareCode curl_share_cleanup(IntPtr pShare);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_share_strerror
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_share_strerror(CurlShareCode errorCode);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_share_setopt
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlShareCode curl_share_setopt(
|
||||
IntPtr pShare,
|
||||
CurlShareOption optCode,
|
||||
IntPtr option);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_formadd
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_formadd(ref IntPtr pHttppost, ref IntPtr pLastPost,
|
||||
int codeFirst, IntPtr bufFirst,
|
||||
int codeNext, IntPtr bufNext,
|
||||
int codeLast);
|
||||
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_formfree
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_formfree(IntPtr pForm);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_slist_append
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr curl_slist_append(IntPtr slist, string data);
|
||||
|
||||
#endregion
|
||||
|
||||
#region curl_slist_free_all
|
||||
|
||||
[DllImport(LIBCURL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_slist_free_all(IntPtr pList);
|
||||
|
||||
#endregion
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
|
||||
#region libcurlshim imports
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_initialize();
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_cleanup();
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_shim_alloc_strings();
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr curl_shim_add_string_to_slist(IntPtr pStrings, string str);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr curl_shim_get_string_from_slist(IntPtr pSlist, ref IntPtr pStr);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr curl_shim_add_string(IntPtr pStrings, string str);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_free_strings(IntPtr pStrings);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_shim_install_delegates(
|
||||
IntPtr pCurl,
|
||||
IntPtr pThis,
|
||||
_ShimWriteCallback pWrite,
|
||||
_ShimReadCallback pRead,
|
||||
_ShimProgressCallback pProgress,
|
||||
_ShimDebugCallback pDebug,
|
||||
_ShimHeaderCallback pHeader,
|
||||
_ShimSslCtxCallback pCtx,
|
||||
_ShimIoctlCallback pIoctl);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_cleanup_delegates(IntPtr pThis);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_get_file_time(
|
||||
int unixTime,
|
||||
ref int yy,
|
||||
ref int mm,
|
||||
ref int dd,
|
||||
ref int hh,
|
||||
ref int mn,
|
||||
ref int ss);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_free_slist(IntPtr p);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_shim_alloc_fd_sets();
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_free_fd_sets(IntPtr fdsets);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern CurlMultiCode curl_shim_multi_fdset(IntPtr multi, IntPtr fdsets, ref int maxFD);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_shim_select(int maxFD, IntPtr fdsets, int milliseconds);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_shim_multi_info_read(IntPtr multi, ref int nMsgs);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_multi_info_free(IntPtr multiInfo);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_shim_formadd(IntPtr[] ppForms, IntPtr[] pParams, int nParams);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_shim_install_share_delegates(
|
||||
IntPtr pShare,
|
||||
IntPtr pThis,
|
||||
_ShimLockCallback pLock,
|
||||
_ShimUnlockCallback pUnlock);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void curl_shim_cleanup_share_delegates(IntPtr pShare);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_shim_get_version_int_value(IntPtr p, int offset);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_shim_get_version_char_ptr(IntPtr p, int offset);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int curl_shim_get_number_of_protocols(IntPtr p, int offset);
|
||||
|
||||
[DllImport(LIBCURLSHIM, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr curl_shim_get_protocol_string(IntPtr p, int offset, int index);
|
||||
|
||||
public delegate void _ShimLockCallback(int data, int access, IntPtr userPtr);
|
||||
|
||||
public delegate void _ShimUnlockCallback(int data, IntPtr userPtr);
|
||||
|
||||
public delegate int _ShimDebugCallback(CurlInfoType infoType, IntPtr msgBuf, int msgBufSize, IntPtr parm);
|
||||
|
||||
public delegate int _ShimHeaderCallback(IntPtr buf, int sz, int nmemb, IntPtr stream);
|
||||
|
||||
public delegate CurlIoError _ShimIoctlCallback(CurlIoCommand cmd, IntPtr parm);
|
||||
|
||||
public delegate int _ShimProgressCallback(
|
||||
IntPtr parm,
|
||||
double dlTotal,
|
||||
double dlNow,
|
||||
double ulTotal,
|
||||
double ulNow);
|
||||
|
||||
public delegate int _ShimReadCallback(IntPtr buf, int sz, int nmemb, IntPtr parm);
|
||||
|
||||
public delegate int _ShimSslCtxCallback(IntPtr ctx, IntPtr parm);
|
||||
|
||||
public delegate int _ShimWriteCallback(IntPtr buf, int sz, int nmemb, IntPtr parm);
|
||||
|
||||
#endregion
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -1,114 +0,0 @@
|
||||
CurlSharp
|
||||
=========
|
||||
|
||||
CurlSharp is a .Net binding and object-oriented wrapper for [libcurl](http://curl.haxx.se/libcurl/).
|
||||
|
||||
libcurl is a web-client library that can provide cross-platform .Net applications with an easy way to implement such things as:
|
||||
|
||||
- HTTP ( GET / HEAD / PUT / POST / multi-part / form-data )
|
||||
- FTP ( upload / download / list / 3rd-party )
|
||||
- HTTPS, FTPS, SSL, TLS ( via OpenSSL or GnuTLS )
|
||||
- Proxies, proxy tunneling, cookies, user+password authentication.
|
||||
- File transfer resume, byte ranges, multiple asynchronous transfers.
|
||||
- and much more...
|
||||
|
||||
CurlSharp provides simple get/set properties for libcurl's options and information functions, event-based hooks to libcurl's I/O, status, and progress callbacks, and wraps the c-style file I/O behind simple filename properties. The `CurlEasy` class contains has more than 100 different properties and methods to handle a wide variety of URL transfer requirements. While this may seem overwhelming at first glance, the good news is you will probably need only a tiny subset of these for most situations.
|
||||
|
||||
The CurlSharp library consists of these parts:
|
||||
|
||||
- Pure C# P/Invoke bindings to the libcurl API.
|
||||
- Optional libcurlshim helper DLL [WIN32].
|
||||
- The `CurlEasy` class which provides a wrapper around a `curl_easy` session.
|
||||
- The `CurlMulti` class, which serves as a container for multiple CurlEasy objects, and provides a wrapper around a `curl_multi` session.
|
||||
- The `CurlShare` class which provides an infrastructure for serializing access to data shared by multiple `CurlEasy` objects, including cookie data and DNS hosts. It implements the `curl_share_xxx` API.
|
||||
- The `CurlHttpMultiPartForm` to easily construct multi-part forms.
|
||||
- The `CurlSlist` class which wraps a linked list of strings used in cURL.
|
||||
|
||||
CurlSharp is available for these platforms:
|
||||
|
||||
- [Stable] Windows 32-bit
|
||||
- [Experimental] Win64 port
|
||||
- [Experimental] Mono Linux & OS X support
|
||||
|
||||
#### Examples ####
|
||||
|
||||
A simple HTTP download program...
|
||||
|
||||
```c#
|
||||
using System;
|
||||
using CurlSharp;
|
||||
|
||||
internal class EasyGet
|
||||
{
|
||||
public static void Main(String[] args)
|
||||
{
|
||||
Curl.GlobalInit(CurlInitFlag.All);
|
||||
|
||||
try
|
||||
{
|
||||
using (var easy = new CurlEasy())
|
||||
{
|
||||
easy.Url = "http://www.google.com/";
|
||||
easy.WriteFunction = OnWriteData;
|
||||
easy.Perform();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Curl.GlobalCleanup();
|
||||
}
|
||||
}
|
||||
|
||||
public static Int32 OnWriteData(byte[] buf, Int32 size, Int32 nmemb, object data)
|
||||
{
|
||||
Console.Write(Encoding.UTF8.GetString(buf));
|
||||
return size*nmemb;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Simple HTTP Post example:
|
||||
|
||||
```c#
|
||||
using (var easy = new CurlEasy())
|
||||
{
|
||||
easy.Url = "http://hostname/testpost.php";
|
||||
easy.Post = true;
|
||||
var postData = "parm1=12345&parm2=Hello+world%21";
|
||||
easy.PostFields = postData;
|
||||
easy.PostFieldSize = postData.Length;
|
||||
easy.Perform();
|
||||
}
|
||||
```
|
||||
|
||||
HTTP/2.0 download:
|
||||
|
||||
```c#
|
||||
|
||||
using (var easy = new CurlEasy())
|
||||
{
|
||||
easy.Url = "https://google.com/";
|
||||
easy.WriteFunction = OnWriteData;
|
||||
|
||||
// HTTP/2 please
|
||||
easy.HttpVersion = CurlHttpVersion.Http2_0;
|
||||
|
||||
// skip SSL verification during debugging
|
||||
easy.SslVerifyPeer = false;
|
||||
easy.SslVerifyhost = false;
|
||||
|
||||
easy.Perform();
|
||||
}
|
||||
```
|
||||
|
||||
More samples are included in the Samples folder.
|
||||
|
||||
#### Credits ####
|
||||
|
||||
CurlSharp Written by Dr. Masroor Ehsan.
|
||||
|
||||
CurlSharp is based on original code by Jeff Phillips [libcurl.NET](http://sourceforge.net/projects/libcurl-net/). Original code has been modified and greatly enhanced.
|
||||
|
||||
----------
|
||||
|
||||
CurlSharp Copyright © 2013-17 Dr. Masroor Ehsan
|
@@ -1,7 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
public class SSLFix
|
||||
{
|
||||
public const string CipherList = "rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha";
|
||||
}
|
||||
}
|
@@ -87,6 +87,7 @@ function loadJackettSettings() {
|
||||
$("#jackett-prerelease").attr('checked', data.prerelease);
|
||||
$("#jackett-logging").attr('checked', data.logging);
|
||||
$("#jackett-omdbkey").val(data.omdbkey);
|
||||
$("#jackett-omdburl").val(data.omdburl);
|
||||
var password = data.password;
|
||||
$("#jackett-adminpwd").val(password);
|
||||
if (password != null && password != '') {
|
||||
@@ -497,10 +498,14 @@ function populateConfigItems(configForm, config) {
|
||||
hasReacaptcha = true;
|
||||
captchaItem = config[i];
|
||||
}
|
||||
else if (config[i].id === 'cookieheader' && hasReacaptcha) { // inject cookie into captcha item
|
||||
captchaItem.cookieheader = config[i].value;
|
||||
console.log(captchaItem);
|
||||
}
|
||||
}
|
||||
|
||||
var setupItemTemplate = Handlebars.compile($("#setup-item").html());
|
||||
if (hasReacaptcha && !window.jackettIsLocal) {
|
||||
if (hasReacaptcha && !window.jackettIsLocal && false) { // disable this for now, use inline cookie (below)
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-nonlocalrecaptcha").html());
|
||||
captchaItem.value_element = setupValueTemplate(captchaItem);
|
||||
var template = setupItemTemplate(captchaItem);
|
||||
@@ -509,11 +514,22 @@ function populateConfigItems(configForm, config) {
|
||||
|
||||
for (var i = 0; i < config.length; i++) {
|
||||
var item = config[i];
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-" + item.type).html());
|
||||
item.value_element = setupValueTemplate(item);
|
||||
var template = setupItemTemplate(item);
|
||||
$formItemContainer.append(template);
|
||||
if ((item.id === 'username' || item.id === 'password') && hasReacaptcha) {
|
||||
continue; // skip username/password if there's a recaptcha
|
||||
}
|
||||
if (item.type != 'recaptcha') {
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-" + item.type).html());
|
||||
item.value_element = setupValueTemplate(item);
|
||||
var template = setupItemTemplate(item);
|
||||
$formItemContainer.append(template);
|
||||
}
|
||||
if (item.type === 'recaptcha') {
|
||||
// inject cookie dialog until recaptcha can be solved again
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-nonlocalrecaptcha").html());
|
||||
captchaItem.value_element = setupValueTemplate(captchaItem);
|
||||
var template = setupItemTemplate(captchaItem);
|
||||
$formItemContainer.append(template);
|
||||
/*
|
||||
var jackettrecaptcha = $('.jackettrecaptcha');
|
||||
jackettrecaptcha.data("version", item.version);
|
||||
switch (item.version) {
|
||||
@@ -543,6 +559,7 @@ function populateConfigItems(configForm, config) {
|
||||
});
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -714,16 +731,16 @@ function updateReleasesRow(row)
|
||||
labels.empty();
|
||||
|
||||
if (IMDBId) {
|
||||
labels.append('\n<a href="http://www.imdb.com/title/tt' + IMDBId + '/" class="label label-imdb" alt="IMDB" title="IMDB">IMDB</a>');
|
||||
labels.append('\n<a href="http://www.imdb.com/title/tt' + ("000000" + IMDBId).slice(-7) + '/" class="label label-imdb" alt="IMDB" title="IMDB">IMDB</a>');
|
||||
}
|
||||
|
||||
if (!isNaN(DownloadVolumeFactor)) {
|
||||
if (DownloadVolumeFactor == 0) {
|
||||
labels.append('\n<span class="label label-success">FREELEECH</span>');
|
||||
} else if (DownloadVolumeFactor < 1) {
|
||||
labels.append('\n<span class="label label-primary">' + DownloadVolumeFactor * 100 + '%DL</span>');
|
||||
labels.append('\n<span class="label label-primary">' + (DownloadVolumeFactor * 100).toFixed(0) + '%DL</span>');
|
||||
} else if (DownloadVolumeFactor > 1) {
|
||||
labels.append('\n<span class="label label-danger">' + DownloadVolumeFactor * 100 + '%DL</span>');
|
||||
labels.append('\n<span class="label label-danger">' + (DownloadVolumeFactor * 100).toFixed(0) + '%DL</span>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -731,7 +748,7 @@ function updateReleasesRow(row)
|
||||
if (UploadVolumeFactor == 0) {
|
||||
labels.append('\n<span class="label label-warning">NO UPLOAD</span>');
|
||||
} else if (UploadVolumeFactor != 1) {
|
||||
labels.append('\n<span class="label label-info">' + UploadVolumeFactor * 100 + '%UL</span>');
|
||||
labels.append('\n<span class="label label-info">' + (UploadVolumeFactor * 100).toFixed(0) + '%UL</span>');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1134,6 +1151,7 @@ function bindUIButtons() {
|
||||
var jackett_prerelease = $("#jackett-prerelease").is(':checked');
|
||||
var jackett_logging = $("#jackett-logging").is(':checked');
|
||||
var jackett_omdb_key = $("#jackett-omdbkey").val();
|
||||
var jackett_omdb_url = $("#jackett-omdburl").val();
|
||||
|
||||
var jackett_proxy_url = $("#jackett-proxy-url").val();
|
||||
var jackett_proxy_type = $("#jackett-proxy-type").val();
|
||||
@@ -1150,6 +1168,7 @@ function bindUIButtons() {
|
||||
logging: jackett_logging,
|
||||
basepathoverride: jackett_basepathoverride,
|
||||
omdbkey: jackett_omdb_key,
|
||||
omdburl: jackett_omdb_url,
|
||||
proxy_type: jackett_proxy_type,
|
||||
proxy_url: jackett_proxy_url,
|
||||
proxy_port: jackett_proxy_port,
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<script type="text/javascript" src="../bootstrap/bootstrap.min.js?changed=2017083001"></script>
|
||||
<script type="text/javascript" src="../libs/bootstrap-notify.js?changed=2017083001"></script>
|
||||
<script type="text/javascript" src="../libs/bootstrap-multiselect.js?changed=2017083001"></script>
|
||||
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?render=explicit" async defer></script>
|
||||
<!--<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?render=explicit" async defer></script>-->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../bootstrap/bootstrap.min.css?changed=2017083001">
|
||||
<link rel="stylesheet" type="text/css" href="../animate.css?changed=2017083001">
|
||||
@@ -94,11 +94,11 @@
|
||||
<hr />
|
||||
<h3>Jackett Configuration</h3>
|
||||
<div class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-toolbar">
|
||||
<button id="change-jackett-port" class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-wrench"></i> Apply server settings <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button id="view-jackett-logs" class="btn btn-danger btn-sm">
|
||||
<button id="view-jackett-logs" class="btn btn-success btn-sm">
|
||||
<i class="fa fa-rss"></i> View logs <span class="glyphicon glyphicon-ok-wrench" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button id="trigger-updater" class="btn btn-warning btn-sm">
|
||||
@@ -152,7 +152,7 @@
|
||||
</div>
|
||||
<div class="input-area">
|
||||
<span class="input-header">Proxy password: </span>
|
||||
<input id="jackett-proxy-password" class="form-control input-right" type="text" value="" placeholder="">
|
||||
<input id="jackett-proxy-password" class="form-control input-right" type="password" value="" placeholder="">
|
||||
</div>
|
||||
|
||||
<div class="input-area">
|
||||
@@ -177,6 +177,10 @@
|
||||
<span class="input-header">OMDB API key: </span>
|
||||
<input id="jackett-omdbkey" class="form-control input-right" type="text" value="" placeholder="">
|
||||
</div>
|
||||
<div class="input-area">
|
||||
<span class="input-header">OMDB API Url: </span>
|
||||
<input id="jackett-omdburl" class="form-control input-right" type="text" value="" placeholder="Blank for default">
|
||||
</div>
|
||||
<hr />
|
||||
<div id="footer">
|
||||
<a href="https://github.com/Jackett/Jackett" target="_blank" title="Jackett on GitHub">Jackett</a> Version <span id="app-version"></span>
|
||||
@@ -189,7 +193,7 @@
|
||||
<div class="setup-item-recaptcha">
|
||||
<p>This site requires you to solve a ReCaptcha. It's no longer possible to solve the captcha in Jackett. Please enter the cookie for the site manually. <a href="https://github.com/Jackett/Jackett/wiki/Finding-cookies" target="_blank">See here</a> on how get the cookies.</p>
|
||||
<div class="setup-item-label">Full cookie header</div>
|
||||
<input class="form-control" type="text" value="" />
|
||||
<input class="form-control" type="text" value="{{cookieheader}}" />
|
||||
</div>
|
||||
</script>
|
||||
<script id="setup-item" type="text/x-handlebars-template">
|
||||
@@ -659,6 +663,6 @@
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
|
||||
<script type="text/javascript" src="../custom.js?changed=2017110602"></script>
|
||||
<script type="text/javascript" src="../custom.js?changed=20180711"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,282 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CurlSharp;
|
||||
using CurlSharp.Enums;
|
||||
using Jackett.Common.Models.Config;
|
||||
using Jackett.Common.Utils;
|
||||
|
||||
namespace Jackett.Common
|
||||
{
|
||||
public class CurlHelper
|
||||
{
|
||||
private static readonly object instance = new object();
|
||||
|
||||
public class CurlRequest
|
||||
{
|
||||
public string Url { get; private set; }
|
||||
public string Cookies { get; private set; }
|
||||
public string Referer { get; private set; }
|
||||
public HttpMethod Method { get; private set; }
|
||||
public IEnumerable<KeyValuePair<string, string>> PostData { get; set; }
|
||||
public Dictionary<string, string> Headers { get; set; }
|
||||
public string RawPOSTDdata { get; set; }
|
||||
|
||||
public CurlRequest(HttpMethod method, string url, string cookies = null, string referer = null, Dictionary<string, string> headers = null, string rawPOSTData = null)
|
||||
{
|
||||
Method = method;
|
||||
Url = url.Replace(" ", "+"); // avoids bad request to cloudflare for urls containing a space followed by H (" H")
|
||||
Cookies = cookies;
|
||||
Referer = referer;
|
||||
Headers = headers;
|
||||
RawPOSTDdata = rawPOSTData;
|
||||
}
|
||||
}
|
||||
|
||||
public class CurlResponse
|
||||
{
|
||||
public List<string[]> HeaderList { get; private set; }
|
||||
public byte[] Content { get; private set; }
|
||||
public HttpStatusCode Status { get; private set; }
|
||||
public string Cookies { set; get; }
|
||||
|
||||
public CurlResponse(List<string[]> headers, byte[] content, HttpStatusCode s, string cookies)
|
||||
{
|
||||
HeaderList = headers;
|
||||
Content = content;
|
||||
Status = s;
|
||||
Cookies = cookies;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<CurlResponse> GetAsync(string url, ServerConfig config, string cookies = null, string referer = null, Dictionary<string, string> headers = null)
|
||||
{
|
||||
var curlRequest = new CurlRequest(HttpMethod.Get, url, cookies, referer, headers);
|
||||
var result = await PerformCurlAsync(curlRequest, config);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async Task<CurlResponse> PostAsync(string url, ServerConfig config, IEnumerable<KeyValuePair<string, string>> formData, string cookies = null, string referer = null, Dictionary<string, string> headers = null, string rawPostData = null)
|
||||
{
|
||||
var curlRequest = new CurlRequest(HttpMethod.Post, url, cookies, referer, headers);
|
||||
curlRequest.PostData = formData;
|
||||
curlRequest.RawPOSTDdata = rawPostData;
|
||||
var result = await PerformCurlAsync(curlRequest, config);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async Task<CurlResponse> PerformCurlAsync(CurlRequest curlRequest, ServerConfig config)
|
||||
{
|
||||
return await Task.Run(() => PerformCurl(curlRequest, config));
|
||||
}
|
||||
|
||||
public delegate void ErrorMessage(string s);
|
||||
public static ErrorMessage OnErrorMessage;
|
||||
|
||||
public static CurlResponse PerformCurl(CurlRequest curlRequest, ServerConfig config)
|
||||
{
|
||||
lock (instance)
|
||||
{
|
||||
var headerBuffers = new List<byte[]>();
|
||||
var contentBuffers = new List<byte[]>();
|
||||
|
||||
using (var easy = new CurlEasy())
|
||||
{
|
||||
easy.Url = curlRequest.Url;
|
||||
easy.BufferSize = 64 * 1024;
|
||||
easy.UserAgent = BrowserUtil.ChromeUserAgent;
|
||||
easy.FollowLocation = false;
|
||||
easy.ConnectTimeout = 20;
|
||||
if (curlRequest.Headers != null)
|
||||
{
|
||||
CurlSlist curlHeaders = new CurlSlist();
|
||||
foreach (var header in curlRequest.Headers)
|
||||
{
|
||||
curlHeaders.Append(header.Key + ": " + header.Value);
|
||||
}
|
||||
easy.SetOpt(CurlOption.HttpHeader, curlHeaders);
|
||||
}
|
||||
|
||||
easy.WriteFunction = (byte[] buf, int size, int nmemb, object data) =>
|
||||
{
|
||||
contentBuffers.Add(buf);
|
||||
return size * nmemb;
|
||||
};
|
||||
|
||||
easy.HeaderFunction = (byte[] buf, int size, int nmemb, object extraData) =>
|
||||
{
|
||||
headerBuffers.Add(buf);
|
||||
return size * nmemb;
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(curlRequest.Cookies))
|
||||
easy.Cookie = curlRequest.Cookies;
|
||||
|
||||
if (!string.IsNullOrEmpty(curlRequest.Referer))
|
||||
easy.Referer = curlRequest.Referer;
|
||||
|
||||
if (curlRequest.Method == HttpMethod.Post)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(curlRequest.RawPOSTDdata))
|
||||
{
|
||||
easy.Post = true;
|
||||
easy.PostFields = curlRequest.RawPOSTDdata;
|
||||
easy.PostFieldSize = Encoding.UTF8.GetByteCount(curlRequest.RawPOSTDdata);
|
||||
}
|
||||
else
|
||||
{
|
||||
easy.Post = true;
|
||||
var postString = StringUtil.PostDataFromDict(curlRequest.PostData);
|
||||
easy.PostFields = postString;
|
||||
easy.PostFieldSize = Encoding.UTF8.GetByteCount(postString);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.RuntimeSettings.DoSSLFix == true)
|
||||
{
|
||||
// http://stackoverflow.com/questions/31107851/how-to-fix-curl-35-cannot-communicate-securely-with-peer-no-common-encryptio
|
||||
// https://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html
|
||||
easy.SslCipherList = SSLFix.CipherList;
|
||||
easy.FreshConnect = true;
|
||||
easy.ForbidReuse = true;
|
||||
}
|
||||
|
||||
if (config.RuntimeSettings.IgnoreSslErrors == true)
|
||||
{
|
||||
easy.SetOpt(CurlOption.SslVerifyhost, false);
|
||||
easy.SetOpt(CurlOption.SslVerifyPeer, false);
|
||||
}
|
||||
|
||||
var proxy = config.GetProxyUrl();
|
||||
if (proxy != null)
|
||||
{
|
||||
easy.SetOpt(CurlOption.HttpProxyTunnel, 1);
|
||||
easy.SetOpt(CurlOption.Proxy, proxy);
|
||||
|
||||
var authString = config.GetProxyAuthString();
|
||||
if (authString != null)
|
||||
{
|
||||
easy.SetOpt(CurlOption.ProxyUserPwd, authString);
|
||||
}
|
||||
}
|
||||
|
||||
easy.Perform();
|
||||
|
||||
if (easy.LastErrorCode != CurlCode.Ok)
|
||||
{
|
||||
var message = "Error " + easy.LastErrorCode.ToString() + " " + easy.LastErrorDescription + " " + easy.ErrorBuffer;
|
||||
if (null != OnErrorMessage)
|
||||
OnErrorMessage(message);
|
||||
else
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
}
|
||||
|
||||
var headerBytes = Combine(headerBuffers.ToArray());
|
||||
var headerString = Encoding.UTF8.GetString(headerBytes);
|
||||
if (config.GetProxyUrl() != null)
|
||||
{
|
||||
var firstcrlf = headerString.IndexOf("\r\n\r\n");
|
||||
var secondcrlf = headerString.IndexOf("\r\n\r\n", firstcrlf + 1);
|
||||
if (secondcrlf > 0)
|
||||
{
|
||||
headerString = headerString.Substring(firstcrlf + 4, secondcrlf - (firstcrlf));
|
||||
}
|
||||
}
|
||||
var headerParts = headerString.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var headers = new List<string[]>();
|
||||
var headerCount = 0;
|
||||
HttpStatusCode status = HttpStatusCode.NotImplemented;
|
||||
var cookieBuilder = new StringBuilder();
|
||||
var cookies = new List<Tuple<string, string>>();
|
||||
foreach (var headerPart in headerParts)
|
||||
{
|
||||
if (headerCount == 0)
|
||||
{
|
||||
var split = headerPart.Split(' ');
|
||||
if (split.Length < 2)
|
||||
throw new Exception("HTTP Header missing");
|
||||
var responseCode = int.Parse(headerPart.Split(' ')[1]);
|
||||
status = (HttpStatusCode)responseCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
var keyVal = headerPart.Split(new char[] { ':' }, 2);
|
||||
if (keyVal.Length > 1)
|
||||
{
|
||||
var key = keyVal[0].ToLower().Trim();
|
||||
var value = keyVal[1].Trim();
|
||||
|
||||
if (key == "set-cookie")
|
||||
{
|
||||
var nameSplit = value.IndexOf('=');
|
||||
if (nameSplit > -1)
|
||||
{
|
||||
var cKey = value.Substring(0, nameSplit);
|
||||
var cVal = value.Split(';')[0] + ";";
|
||||
cookies.Add(new Tuple<string, string>(cKey, cVal));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
headers.Add(new[] { key, value });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
headerCount++;
|
||||
}
|
||||
|
||||
foreach (var cookieGroup in cookies.GroupBy(c => c.Item1))
|
||||
{
|
||||
cookieBuilder.AppendFormat("{0} ", cookieGroup.Last().Item2);
|
||||
}
|
||||
|
||||
// add some debug output to track down the problem causing people getting InternalServerError results
|
||||
if (status == HttpStatusCode.NotImplemented || status == HttpStatusCode.InternalServerError)
|
||||
{
|
||||
try
|
||||
{
|
||||
OnErrorMessage("got NotImplemented/InternalServerError");
|
||||
OnErrorMessage("request.Method: " + curlRequest.Method);
|
||||
OnErrorMessage("request.Url: " + curlRequest.Url);
|
||||
OnErrorMessage("request.Cookies: " + curlRequest.Cookies);
|
||||
OnErrorMessage("request.Referer: " + curlRequest.Referer);
|
||||
OnErrorMessage("request.RawPOSTDdata: " + curlRequest.RawPOSTDdata);
|
||||
OnErrorMessage("cookies: " + cookieBuilder.ToString().Trim());
|
||||
OnErrorMessage("headerString:\n" + headerString);
|
||||
|
||||
foreach (var headerPart in headerParts)
|
||||
{
|
||||
OnErrorMessage("headerParts: " + headerPart);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnErrorMessage(string.Format("CurlHelper: error while handling NotImplemented/InternalServerError:\n{0}", ex));
|
||||
}
|
||||
}
|
||||
|
||||
var contentBytes = Combine(contentBuffers.ToArray());
|
||||
var curlResponse = new CurlResponse(headers, contentBytes, status, cookieBuilder.ToString().Trim());
|
||||
return curlResponse;
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] Combine(params byte[][] arrays)
|
||||
{
|
||||
byte[] ret = new byte[arrays.Sum(x => x.Length)];
|
||||
int offset = 0;
|
||||
foreach (byte[] data in arrays)
|
||||
{
|
||||
Buffer.BlockCopy(data, 0, ret, offset, data.Length);
|
||||
offset += data.Length;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<dllmap dll="libcurl.dll" target="libcurl.so.4" />
|
||||
<dllmap os="osx" dll="libcurl.dll" target="libcurl.4.dylib"/>
|
||||
<!--<dllmap os="freebsd" dll="libcurl.dll" target="libcurl.so.4" />-->
|
||||
<!--<dllmap os="solaris" dll="libcurl.dll" target="libcurl.so.4" />-->
|
||||
</configuration>
|
@@ -120,11 +120,21 @@
|
||||
paths:
|
||||
# present trending results if there are no search parms supplied
|
||||
- path: "{{if .Keywords}}/search/{{ .Keywords}}/1/{{else}}/trending{{end}}"
|
||||
- path: "{{if .Keywords}}/search/{{ .Keywords}}/2/{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/search/{{ .Keywords}}/3/{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/search/{{ .Keywords}}/4/{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/search/{{ .Keywords}}/5/{{else}}{{end}}"
|
||||
keywordsfilters:
|
||||
- name: replace # use this as a workaround till #893 is implemented
|
||||
args: ["Greys Anatomy", "Grey's Anatomy"]
|
||||
rows:
|
||||
selector: tr:has(a[href^="/torrent/"])
|
||||
fields:
|
||||
title:
|
||||
selector: td[class^="coll-1"] a[href^="/torrent/"]
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Grey's Anatomy", "Greys Anatomy"]
|
||||
category:
|
||||
optional: true
|
||||
selector: td[class^="coll-1"] a[href^="/sub/"]
|
||||
|
@@ -6,6 +6,8 @@
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.2f4y.me/
|
||||
legacylinks:
|
||||
- http://www.2f4y.me/
|
||||
|
||||
caps:
|
||||
|
@@ -48,9 +48,6 @@
|
||||
- selector: span.errormsg
|
||||
test:
|
||||
path: index.php
|
||||
|
||||
download:
|
||||
selector: a[href^="download.php?id="]
|
||||
|
||||
search:
|
||||
paths:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
---
|
||||
---
|
||||
site: Bittorrentfiles
|
||||
name: Bittorrentfiles
|
||||
description: "Bittorrentfiles is a Private GERMAN tracker"
|
||||
@@ -135,22 +135,22 @@
|
||||
selector: a[href^="/download.php"]
|
||||
attribute: href
|
||||
files:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(5) > a
|
||||
selector: td:nth-child(5)
|
||||
grabs:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(2)
|
||||
selector: td:nth-child(4)
|
||||
size:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(6)
|
||||
selector: td:nth-child(6)
|
||||
filters:
|
||||
- name: replace
|
||||
args: [".", ""]
|
||||
- name: replace
|
||||
args: [",", "."]
|
||||
seeders:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(2)
|
||||
selector: td:nth-child(2) > a
|
||||
leechers:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(3)
|
||||
selector: td:nth-child(3)
|
||||
date:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(10)
|
||||
selector: td:nth-child(10)
|
||||
filters:
|
||||
- name: split
|
||||
args: ["by", 0]
|
||||
@@ -168,4 +168,4 @@
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
img[alt="2xU"]: "2"
|
||||
"*": "1"
|
||||
"*": "1"
|
||||
|
@@ -38,10 +38,13 @@
|
||||
type: info
|
||||
label: Category Id Note
|
||||
default: "You can filter your searches by using any of the following category numbers (comma delimited):<br>1 :Anime - Sub<br>2 :Anime - Raw<br>3 :Anime - Dub<br>4 :LA - Sub<br>5 :LA - Raw<br>6 :Light Novel<br>7 :Manga - TLed<br>8 :Manga - Raw<br>9 :♫ - Lossy<br>10 :♫ - Lossless<br>11 :♫ - Video<br>12 :Games<br>13 :Applications<br>14 :Pictures<br>15 :Adult Video<br>16 :Other"
|
||||
|
||||
- name: lang-id
|
||||
type: text
|
||||
label: Language Id
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: "?{{if .Config.cat-id}}id={{.Config.cat-id }}&{{else}}{{end}}q={{if .Keywords}}{{.Keywords}}{{else}}{{end}}"
|
||||
- path: "?{{if .Config.cat-id}}id={{.Config.cat-id }}&{{else}}{{end}}{{if .Config.lang-id}}lang_id={{.Config.lang-id}}&{{else}}{{end}}q={{if .Keywords}}{{.Keywords}}{{else}}{{end}}"
|
||||
rows:
|
||||
selector: div.table-responsive > table > tbody > tr
|
||||
fields:
|
||||
@@ -53,6 +56,9 @@
|
||||
args: id
|
||||
title:
|
||||
selector: td:nth-child(3) > a.torrent > span.span-1440
|
||||
filters:
|
||||
- name: re_replace # remove anidb id from return string
|
||||
args: ["(\\[[A-Z0-9]*\\])\\.", "."]
|
||||
details:
|
||||
selector: td:nth-child(3) > a.torrent
|
||||
attribute: href
|
||||
|
@@ -6,6 +6,8 @@
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.arabafenice.me/
|
||||
legacylinks:
|
||||
- http://www.arabafenice.me/
|
||||
|
||||
caps:
|
||||
@@ -99,6 +101,13 @@
|
||||
search:
|
||||
paths:
|
||||
- path: index.php
|
||||
keywordsfilters:
|
||||
- name: diacritics
|
||||
args: replace
|
||||
- name: re_replace # S01 to 1
|
||||
args: ["(?i)\\bS0*(\\d+)\\b", "$1"]
|
||||
- name: re_replace # S01E01 to 1 1
|
||||
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "$1 $2"]
|
||||
inputs:
|
||||
search: "{{if .Query.IMDBID}}{{ .Query.IMDBIDShort }}{{else}}{{ .Keywords }}{{end}}"
|
||||
page: "torrents"
|
||||
@@ -113,6 +122,21 @@
|
||||
attribute: href
|
||||
title:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
filters:
|
||||
- name: re_replace # S01 E01 to S01E01
|
||||
args: ["(?i)\\bS(\\d+)\\sE(\\d+)\\b", "S$1E$2"]
|
||||
- name: re_replace # 01x01 to S01E01
|
||||
args: ["(?i)(\\d{2})x(\\d+)", "S$1E$2"]
|
||||
- name: re_replace # 1x01 to S01E01
|
||||
args: ["(?i)\\b(\\d{1})x(\\d+)", "S0$1E$2"]
|
||||
- name: re_replace # Stagione X --> S0X
|
||||
args: ["(?i)\\bStagion[ei]\\s?(\\d{1})\\b|\\bSeason'?s?\\s?(\\d{1})\\b", "S0$1$2"]
|
||||
- name: re_replace # Stagione XX --> SXX
|
||||
args: ["(?i)\\bStagion[ei]\\s?(\\d{2,})\\b|\\bSeason'?s?\\s?(\\d{2,})\\b", "S$1$2"]
|
||||
- name: re_replace # Episodio 4 to E4
|
||||
args: ["(?i)\\b(?:[\\/\\|]?Episodio\\s?(\\d+)|Puntata\\s?(\\d+))", "E$1$2"]
|
||||
- name: re_replace # Episodi 4 5 to E04-05
|
||||
args: ["(?i)\\b(?:Puntate\\s*)(\\d+)\\s?(\\d+)", "E0$1-0$2"]
|
||||
banner:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
attribute: onmouseover
|
||||
|
163
src/Jackett.Common/Definitions/arenabg.yml
Normal file
163
src/Jackett.Common/Definitions/arenabg.yml
Normal file
@@ -0,0 +1,163 @@
|
||||
---
|
||||
site: arenabg
|
||||
name: ArenaBG
|
||||
description: "ArenaBG is a BULGARIAN Semi-Private Torrent Tracker for 0DAY / GENERAL"
|
||||
language: bg-BG
|
||||
type: semi-private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://arenabg.com/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: "movies", cat: Movies, desc: "Movies"}
|
||||
- {id: "arenabgtv", cat: Movies, desc: "Movies / ArenaBG.TV"}
|
||||
- {id: "xvid", cat: Movies, desc: "Movies / XviD"}
|
||||
- {id: "dvd-r", cat: Movies, desc: "Movies / DVD-R"}
|
||||
- {id: "x264", cat: Movies, desc: "Movies / x264"}
|
||||
- {id: "animemanga", cat: Movies, desc: "Movies / Anime & Manga"}
|
||||
- {id: "documentaries", cat: Movies, desc: "Movies / Documentaries"}
|
||||
- {id: "blu-ray", cat: Movies, desc: "Movies / Blu-ray"}
|
||||
- {id: "boxset", cat: Movies, desc: "Movies / Boxset"}
|
||||
- {id: "x264boxset", cat: Movies, desc: "Movies / x264 Boxset"}
|
||||
- {id: "tvepisodeshd", cat: Movies, desc: "Movies / HDTV"}
|
||||
- {id: "3d", cat: Movies, desc: "Movies / 3D"}
|
||||
- {id: "movies-hd", cat: Movies, desc: "Movies / Movies HD"}
|
||||
- {id: "x265", cat: Movies, desc: "Movies / x265"}
|
||||
- {id: "series", cat: TV, desc: "Series"}
|
||||
- {id: "hdtv", cat: TV, desc: "Series / TV Episodes HD"}
|
||||
- {id: "tvepisodes", cat: TV, desc: "Series / TV Episodes"}
|
||||
- {id: "tvboxset", cat: TV, desc: "Series / TV Boxset"}
|
||||
- {id: "tvboxsethd", cat: TV, desc: "Series / TV Boxset HD"}
|
||||
- {id: "music", cat: Audio, desc: "Music"}
|
||||
- {id: "mp3", cat: Audio, desc: "Music / MP3"}
|
||||
- {id: "music-video", cat: Audio, desc: "Music / Video"}
|
||||
- {id: "flac", cat: Audio, desc: "Music / FLAC"}
|
||||
- {id: "music-dvd", cat: Audio, desc: "Music / DVD"}
|
||||
- {id: "music-ape", cat: Audio, desc: "Music / APE"}
|
||||
- {id: "music-dts", cat: Audio, desc: "Music / DTS"}
|
||||
- {id: "musicwavpack", cat: Audio, desc: "Music / WavePack"}
|
||||
- {id: "musicost", cat: Audio, desc: "Music / OST"}
|
||||
- {id: "games", cat: PC, desc: "Games"}
|
||||
- {id: "games-iso", cat: PC, desc: "Games / PC ISO"}
|
||||
- {id: "pc-rip", cat: PC, desc: "Games / PC RIP"}
|
||||
- {id: "ps2", cat: Console, desc: "Games / PS2"}
|
||||
- {id: "psp", cat: Console, desc: "Games / PSP"}
|
||||
- {id: "xbox", cat: Console, desc: "Games / XBOX"}
|
||||
- {id: "xbox-360", cat: Console, desc: "Games / XBOX-360"}
|
||||
- {id: "ps3", cat: Console, desc: "Games / PS3"}
|
||||
- {id: "wii", cat: Console, desc: "Games / WII"}
|
||||
- {id: "PS4", cat: Console, desc: "Games / PS4"}
|
||||
- {id: "software", cat: PC, desc: "Software"}
|
||||
- {id: "pc-iso", cat: PC, desc: "Software / PC ISO"}
|
||||
- {id: "pdasmartphone", cat: PC, desc: "Software / Smartphone"}
|
||||
- {id: "tutorial", cat: PC, desc: "Software / Tutorial"}
|
||||
- {id: "android", cat: PC, desc: "Software / Android"}
|
||||
- {id: "ios", cat: PC, desc: "Software / iOS"}
|
||||
- {id: "misc", cat: Other, desc: "Misc"}
|
||||
- {id: "other", cat: Other, desc: "Misc / Other"}
|
||||
- {id: "e-books", cat: Other, desc: "Misc / e-Books"}
|
||||
- {id: "sports", cat: Other, desc: "Misc / Sports"}
|
||||
- {id: "0-day", cat: Other, desc: "Misc / 0-Day"}
|
||||
- {id: "xxx", cat: XXX, desc: "XXX"}
|
||||
- {id: "porn", cat: XXX, desc: "XXX / Porn"}
|
||||
- {id: "xxx-hd", cat: XXX, desc: "XXX / XXX HD"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
login:
|
||||
path: /
|
||||
method: form
|
||||
form: form[action="/users/"]
|
||||
inputs:
|
||||
email: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
action: login
|
||||
error:
|
||||
- selector: div.row div div.alert i.fa-warning
|
||||
message:
|
||||
selector: div.row div div.alert
|
||||
test:
|
||||
path: /
|
||||
selector: a[href="/users/logout/"]
|
||||
|
||||
download:
|
||||
selector: a[href^="magnet:?"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /torrents/
|
||||
method: post
|
||||
followredirect: true
|
||||
inputs:
|
||||
text: "{{ if .Keywords }}{{ .Keywords }}{{else}}{{end}}"
|
||||
"text_mobile": ""
|
||||
type: 0
|
||||
audio: 0
|
||||
subtitles: 0
|
||||
action: search
|
||||
|
||||
rows:
|
||||
selector: tr:has(td.category)
|
||||
fields:
|
||||
title:
|
||||
# use the second div for full title
|
||||
selector: td.filename div:nth-child(2) a
|
||||
details:
|
||||
selector: td.filename div a
|
||||
attribute: href
|
||||
category:
|
||||
selector: td.category a
|
||||
attribute: href
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["/torrents/type:(.+?)/", "$1"]
|
||||
download:
|
||||
selector: td.filename div a
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(4)
|
||||
date:
|
||||
# 08:49:09
|
||||
selector: td:nth-child(3):has(":")
|
||||
optional: true
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "15:04:05"
|
||||
date:
|
||||
# 2018-10-19
|
||||
selector: td:nth-child(3):has("-")
|
||||
optional: true
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "2006-01-02"
|
||||
seeders:
|
||||
selector: td:nth-child(6)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["-", "0"]
|
||||
- name: replace
|
||||
args: ["DHT", "0"] # torrent can only be downloaded via DHT
|
||||
leechers:
|
||||
selector: td:nth-child(7)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["-", "0"]
|
||||
grabs:
|
||||
selector: td:nth-child(8)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["-", "0"]
|
||||
banner:
|
||||
selector: td.filename div:nth-child(2) a
|
||||
attribute: onmouseover
|
||||
filters:
|
||||
- name: regexp
|
||||
args: src=\\'([^\s\\]+)
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
@@ -40,6 +40,18 @@
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: info
|
||||
type: info
|
||||
label: Results Per Page
|
||||
default: For best results, change the 'Torrentliste' setting to "Platzsparendes Layout mit PopUp für zusätzliche Informationen" in your profile.
|
||||
|
||||
login:
|
||||
path: takelogin.php
|
||||
@@ -63,9 +75,13 @@
|
||||
|
||||
rows:
|
||||
selector: table.tableinborder > tbody > tr:has(a[href^="details.php"])
|
||||
fields:
|
||||
fields: # note: two alternative layouts available
|
||||
title:
|
||||
selector: a[href^="details.php"]
|
||||
title:
|
||||
optional: true
|
||||
selector: a[href^="details.php"][title]
|
||||
attribute: title
|
||||
category:
|
||||
selector: a[href^="browse.php?cat="]
|
||||
attribute: href
|
||||
@@ -76,32 +92,34 @@
|
||||
selector: a[href^="details.php"]
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href^=" /gettorrent/ssl/"]
|
||||
selector: a[href^=" /gettorrent/"]
|
||||
attribute: href
|
||||
files:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(1) > b:nth-child(2)
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(1) > b:nth-child(2), a[href*="&filelist=1"]
|
||||
grabs:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(3) > b:nth-child(1)
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(3) > b:nth-child(1), a[href*="&tosnatchers=1"]
|
||||
size:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(1) > b:nth-child(1)
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(1) > b:nth-child(1), td:nth-child(7):has(br)
|
||||
filters:
|
||||
- name: replace
|
||||
args: [".", ""]
|
||||
- name: replace
|
||||
args: [",", "."]
|
||||
seeders:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(2) > b:nth-child(1)
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(2) > b:nth-child(1), a[href*="&toseeders=1"]
|
||||
leechers:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(2) > b:nth-child(3)
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(2) > b:nth-child(3), a[href*="&todlers=1"]
|
||||
date:
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(5)
|
||||
selector: td:nth-child(2) > table > tbody > tr:nth-child(2) > td:nth-child(5), td:nth-child(5):has(br)
|
||||
filters:
|
||||
- name: replace
|
||||
args: [" ", ""]
|
||||
- name: append
|
||||
args: " +2:00"
|
||||
- name: replace
|
||||
args: ["\xA0", " "]
|
||||
args: ["\xA0", ""]
|
||||
- name: dateparse
|
||||
args: "02.01.2006 15:04:05 -07:00"
|
||||
args: "02.01.200615:04:05 -07:00"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[src="/pic/free.gif"]: "0"
|
||||
|
132
src/Jackett.Common/Definitions/audiobookbay.yml
Normal file
132
src/Jackett.Common/Definitions/audiobookbay.yml
Normal file
@@ -0,0 +1,132 @@
|
||||
---
|
||||
site: audiobookbay
|
||||
name: AudioBookBay
|
||||
description: "AudioBook Bay (ABB) is a semi-private Torrent Tracker for AUDIOBOOKS"
|
||||
language: en-us
|
||||
type: semi-private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- http://audiobookbay.nl/
|
||||
- https://audiobookbay.la/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: Children, cat: Audio/Audiobook, desc: "Children"}
|
||||
- {id: Teen, cat: Audio/Audiobook, desc: "Teen & Young Adult"}
|
||||
- {id: Adults, cat: Audio/Audiobook, desc: "Adults"}
|
||||
- {id: The, cat: Audio/Audiobook, desc: "The Undead"}
|
||||
- {id: Action, cat: Audio/Audiobook, desc: "Action"}
|
||||
- {id: Adventure, cat: Audio/Audiobook, desc: "Adventure"}
|
||||
- {id: Art, cat: Audio/Audiobook, desc: "Art"}
|
||||
- {id: Autobiography, cat: Audio/Audiobook, desc: "Autobiography & Biographies"}
|
||||
- {id: Business, cat: Audio/Audiobook, desc: "Business"}
|
||||
- {id: Computer, cat: Audio/Audiobook, desc: "Computer"}
|
||||
- {id: Contemporary, cat: Audio/Audiobook, desc: "Contemporary"}
|
||||
- {id: Crime, cat: Audio/Audiobook, desc: "Crime"}
|
||||
- {id: Detective, cat: Audio/Audiobook, desc: "Detective"}
|
||||
- {id: Doctor, cat: Audio/Audiobook, desc: "Doctor Who"}
|
||||
- {id: Education, cat: Audio/Audiobook, desc: "Education"}
|
||||
- {id: Fantasy, cat: Audio/Audiobook, desc: "Fantasy"}
|
||||
- {id: General, cat: Audio/Audiobook, desc: "General Fiction"}
|
||||
- {id: Historical, cat: Audio/Audiobook, desc: "Historical Fiction"}
|
||||
- {id: History, cat: Audio/Audiobook, desc: "History"}
|
||||
- {id: Horror, cat: Audio/Audiobook, desc: "Horror"}
|
||||
- {id: Humor, cat: Audio/Audiobook, desc: "Humor"}
|
||||
- {id: Lecture, cat: Audio/Audiobook, desc: "Lecture"}
|
||||
- {id: LGBT, cat: Audio/Audiobook, desc: "LGBT"}
|
||||
- {id: Literature, cat: Audio/Audiobook, desc: "Literature"}
|
||||
- {id: LitRPG, cat: Audio/Audiobook, desc: "LitRPG"}
|
||||
- {id: Misc., cat: Audio/Audiobook, desc: "Misc. Non-fiction"}
|
||||
- {id: Mystery, cat: Audio/Audiobook, desc: "Mystery"}
|
||||
- {id: Myth, cat: Audio/Audiobook, desc: "Myth Hunting"}
|
||||
- {id: Paranormal, cat: Audio/Audiobook, desc: "Paranormal"}
|
||||
- {id: Plays, cat: Audio/Audiobook, desc: "Plays & Theater"}
|
||||
- {id: Poetry, cat: Audio/Audiobook, desc: "Poetry"}
|
||||
- {id: Political, cat: Audio/Audiobook, desc: "Political"}
|
||||
- {id: Postapocalyptic, cat: Audio/Audiobook, desc: "Postapocalyptic"}
|
||||
- {id: Radio, cat: Audio/Audiobook, desc: "Radio Productions"}
|
||||
- {id: Romance, cat: Audio/Audiobook, desc: "Romance"}
|
||||
- {id: Sci-Fi, cat: Audio/Audiobook, desc: "Sci-Fi"}
|
||||
- {id: Science, cat: Audio/Audiobook, desc: "Science"}
|
||||
- {id: Self-help, cat: Audio/Audiobook, desc: "Self-help"}
|
||||
- {id: SHTF, cat: Audio/Audiobook, desc: "SHTF"}
|
||||
- {id: Spiritual, cat: Audio/Audiobook, desc: "Spiritual & Religious"}
|
||||
- {id: Sports, cat: Audio/Audiobook, desc: "Sports"}
|
||||
- {id: Suspense, cat: Audio/Audiobook, desc: "Suspense"}
|
||||
- {id: Thriller, cat: Audio/Audiobook, desc: "Thriller"}
|
||||
- {id: True, cat: Audio/Audiobook, desc: "True Crime"}
|
||||
- {id: Tutorial, cat: Audio/Audiobook, desc: "Tutorial"}
|
||||
- {id: Westerns, cat: Audio/Audiobook, desc: "Westerns"}
|
||||
- {id: Anthology, cat: Audio/Audiobook, desc: "Anthology"}
|
||||
- {id: Bestsellers, cat: Audio/Audiobook, desc: "Bestsellers"}
|
||||
- {id: Classic, cat: Audio/Audiobook, desc: "Classic"}
|
||||
- {id: Documentary, cat: Audio/Audiobook, desc: "Documentary"}
|
||||
- {id: Full, cat: Audio/Audiobook, desc: "Full Cast"}
|
||||
- {id: Libertarian, cat: Audio/Audiobook, desc: "Libertarian"}
|
||||
- {id: Military, cat: Audio/Audiobook, desc: "Military"}
|
||||
- {id: Novel, cat: Audio/Audiobook, desc: "Novel"}
|
||||
- {id: Short, cat: Audio/Audiobook, desc: "Short Story"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
|
||||
login:
|
||||
path: https://audiobookbay.nl/member/login.php
|
||||
form: form[action="https://audiobookbay.nl/member/login.php"]
|
||||
method: post
|
||||
form: form
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
login: "Login"
|
||||
error:
|
||||
- selector: td.embedded:has(h2:contains("Invalid"))
|
||||
test:
|
||||
path: /member/users/
|
||||
|
||||
download:
|
||||
selector: a[href^="/download?"]
|
||||
attribute: href
|
||||
|
||||
search:
|
||||
paths:
|
||||
# with just 7 results per page, try to grab up to 35 results
|
||||
# http://audiobookbay.nl/?s=teeth
|
||||
# http://audiobookbay.nl/page/2/?s=teeth
|
||||
- path: "{{if .Keywords}}/?s={{ .Keywords}}{{else}}/{{end}}"
|
||||
- path: "{{if .Keywords}}/page/2/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/page/3/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/page/4/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}/page/5/?s={{ .Keywords}}{{else}}{{end}}"
|
||||
rows:
|
||||
selector: div.post:has(div[class="postTitle"])
|
||||
fields:
|
||||
title:
|
||||
selector: div.postTitle
|
||||
details:
|
||||
selector: div.postTitle h2 a
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href^="/audio-books/"]
|
||||
attribute: href
|
||||
banner:
|
||||
optional: true
|
||||
selector: img
|
||||
attribute: src
|
||||
category:
|
||||
selector: div.postInfo
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Category: (.+?)\\s"
|
||||
date:
|
||||
selector: div.postContent p:contains("Posted:")
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Posted: (.+?)Format:"
|
||||
- name: dateparse
|
||||
args: "2 Jan 2006"
|
||||
size:
|
||||
selector: div.postContent p:contains("File Size:")
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "File Size: (.+?)s"
|
@@ -72,7 +72,7 @@
|
||||
rows:
|
||||
selector: tr.browse_color, tr.freeleech_color, tr[id^="kdescr"]
|
||||
after: 1
|
||||
fields:
|
||||
fields: # some users (rank specific?) have an extra column (td:nth-child(4)) with bookmark features
|
||||
banner:
|
||||
selector: a[href^="details.php?id="][onmouseover]
|
||||
attribute: onmouseover
|
||||
@@ -98,20 +98,20 @@
|
||||
selector: a[href^="download.php"]
|
||||
attribute: href
|
||||
files:
|
||||
selector: td:nth-child(4)
|
||||
selector: a[href^="filelist.php"]
|
||||
size:
|
||||
selector: td:nth-child(7)
|
||||
selector: td:nth-last-child(6)
|
||||
grabs:
|
||||
selector: td:nth-child(8)
|
||||
selector: td:nth-last-child(5)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: ([\d,]+)
|
||||
seeders:
|
||||
selector: td:nth-child(9)
|
||||
selector: td:nth-last-child(4)
|
||||
leechers:
|
||||
selector: td:nth-child(10)
|
||||
selector: td:nth-last-child(3)
|
||||
date:
|
||||
selector: td:nth-child(6)
|
||||
selector: td:nth-last-child(7)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"a.info > b:contains(\"[FREE]\")": "0"
|
||||
|
175
src/Jackett.Common/Definitions/bigtower.yml
Normal file
175
src/Jackett.Common/Definitions/bigtower.yml
Normal file
@@ -0,0 +1,175 @@
|
||||
---
|
||||
site: bigtower
|
||||
name: BigTower
|
||||
description: "Big Tower is an ITALIAN Private site for TV / MOVIES / GENERAL"
|
||||
language: it-it
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- http://bigtower.info/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
|
||||
# Movies
|
||||
- {id: 91, cat: Movies/HD, desc: "DSS"}
|
||||
- {id: 92, cat: Movies/HD, desc: "DSS 3D"}
|
||||
- {id: 14, cat: Movies, desc: "Screener"}
|
||||
- {id: 15, cat: Movies/SD, desc: "DVDRip"}
|
||||
- {id: 16, cat: Movies/HD, desc: "BDRip"}
|
||||
- {id: 17, cat: Movies/HD, desc: "HD 720p"}
|
||||
- {id: 18, cat: Movies/HD, desc: "HD 1080p"}
|
||||
- {id: 19, cat: Movies/HD, desc: "HD 3D"}
|
||||
- {id: 83, cat: Movies/HD, desc: "4K (Ultra HD)"}
|
||||
- {id: 89, cat: Movies/DVD, desc: "DVD 5"}
|
||||
- {id: 90, cat: Movies/DVD, desc: "DVD 9"}
|
||||
- {id: 37, cat: Movies, desc: "MP4"}
|
||||
- {id: 61, cat: TV, desc: "TV Show"}
|
||||
- {id: 78, cat: TV, desc: "Serie TV"}
|
||||
- {id: 96, cat: TV/HD, desc: "Serie TV 720p"}
|
||||
- {id: 97, cat: TV/HD, desc: "Serie TV 1080p"}
|
||||
- {id: 98, cat: TV, desc: "Serie TV MP4"}
|
||||
- {id: 24, cat: TV/Anime, desc: "Cartoni"}
|
||||
- {id: 66, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 71, cat: TV, desc: "SUB iTA"}
|
||||
- {id: 75, cat: TV/Documentary, desc: "Documentari"}
|
||||
- {id: 72, cat: TV/Sport, desc: "Sport"}
|
||||
|
||||
# GAMES
|
||||
- {id: 28, cat: PC/Games, desc: "PC Games"}
|
||||
- {id: 63, cat: Console/Xbox 360, desc: "XBOX 360"}
|
||||
- {id: 64, cat: Console/PS3, desc: "PS3"}
|
||||
- {id: 33, cat: Console/Wii, desc: "WII"}
|
||||
- {id: 76, cat: Console/Other, desc: "PS2"}
|
||||
- {id: 81, cat: Console/Xbox One, desc: "XBOX ONE"}
|
||||
- {id: 84, cat: Console/PS4, desc: "PS4"}
|
||||
|
||||
# MUSIC
|
||||
- {id: 35, cat: Audio, desc: "MP3"}
|
||||
- {id: 67, cat: Audio, desc: "FLAC"}
|
||||
|
||||
# SOFTWARE
|
||||
- {id: 52, cat: PC/ISO, desc: "Windows"}
|
||||
- {id: 54, cat: PC/ISO, desc: "Mac"}
|
||||
- {id: 69, cat: PC/ISO, desc: "Linux"}
|
||||
|
||||
# PHONE
|
||||
- {id: 40, cat: PC/Phone-IOS, desc: "Android"}
|
||||
- {id: 41, cat: PC/Phone-Android, desc: "Iphone"}
|
||||
|
||||
# OTHER
|
||||
- {id: 44, cat: Other, desc: "Varie"}
|
||||
- {id: 82, cat: Other, desc: "Music Video"}
|
||||
- {id: 86, cat: Other, desc: "Navigatori"}
|
||||
- {id: 95, cat: Other, desc: "Immagini"}
|
||||
- {id: 99, cat: Other, desc: "AudioLibri"}
|
||||
|
||||
# EBOOK
|
||||
- {id: 46, cat: Books, desc: "Ebook"}
|
||||
- {id: 73, cat: Books/Comics, desc: "Fumetti"}
|
||||
- {id: 74, cat: Books/Comics, desc: "Manga"}
|
||||
- {id: 87, cat: Books, desc: "Giornali"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: donor
|
||||
type: checkbox
|
||||
label: Show donor torrent? (Enable if you're a donor)
|
||||
default: false
|
||||
|
||||
login:
|
||||
path: index.php?page=login
|
||||
method: post
|
||||
inputs:
|
||||
uid: "{{ .Config.username }}"
|
||||
pwd: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: span:contains("Nome Utente non corretto")
|
||||
test:
|
||||
path: index.php
|
||||
selector: a[href="logout.php"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: index.php
|
||||
inputs:
|
||||
search: "{{ .Keywords }}"
|
||||
page: "torrents"
|
||||
category: "{{range .Categories}}{{.}};{{end}}"
|
||||
options: "0"
|
||||
active: "0"
|
||||
rows:
|
||||
selector: table > tbody > tr > td > table.lista > tbody > tr:has(a[href^="index.php?page=torrent-details&id="]){{if .Config.donor }}{{else}}:not(:has(img[src*="keditbookmarks.png"])){{end}}
|
||||
fields:
|
||||
download:
|
||||
selector: a[href^="index.php?page=torrent-details&id="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["index.php?page=torrent-details&id=", "download.php?id="]
|
||||
title:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
filters:
|
||||
- name: re_replace # rimozioni varie
|
||||
args: ["(?i)(\\[Richiesta\\])", ""]
|
||||
banner:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
attribute: onmouseover
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "src=(.*?) "
|
||||
category:
|
||||
selector: a[href^="index.php?page=torrents&category="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: category
|
||||
details:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-last-child(2)
|
||||
date:
|
||||
selector: td:nth-last-child(7)
|
||||
filters:
|
||||
- name: append
|
||||
args: " +01:00"
|
||||
- name: dateparse
|
||||
args: "02/01/2006 -07:00"
|
||||
grabs:
|
||||
selector: td:nth-last-child(4)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["---", "0"]
|
||||
seeders:
|
||||
selector: td:nth-last-child(6)
|
||||
leechers:
|
||||
selector: td:nth-last-child(5)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[alt="Gold 100% Free"]: "0"
|
||||
img[alt="Silver 50% Free"]: "0.5"
|
||||
img[alt="Bronze 25% Free"]: "0.75"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
img[alt="2x Upload Multiplier"]: "2"
|
||||
img[alt="3x Upload Multiplier"]: "3"
|
||||
img[alt="4x Upload Multiplier"]: "4"
|
||||
img[alt="5x Upload Multiplier"]: "5"
|
||||
img[alt="6x Upload Multiplier"]: "6"
|
||||
img[alt="7x Upload Multiplier"]: "7"
|
||||
img[alt="8x Upload Multiplier"]: "8"
|
||||
img[alt="9x Upload Multiplier"]: "9"
|
||||
img[alt="10x Upload Multiplier"]: "10"
|
||||
"*": "1"
|
@@ -69,9 +69,18 @@
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
# download button can be disbled in the profile, use details link instead
|
||||
# download:
|
||||
# selector: a[href^="download.php/"]
|
||||
# attribute: href
|
||||
download:
|
||||
selector: a[href^="download.php/"]
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["details.php?id=", "download.php/"]
|
||||
- name: append
|
||||
args: "/invalid.torrent"
|
||||
title:
|
||||
selector: a[href^="details.php?id="]
|
||||
title:
|
||||
|
@@ -26,7 +26,7 @@
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: table.main:contains("Login Failed!")
|
||||
- selector: form[action*="/login"] .text-red
|
||||
test:
|
||||
path: /torrents
|
||||
|
||||
@@ -44,15 +44,8 @@
|
||||
sorting: created_at
|
||||
direction: desc
|
||||
qty: 100
|
||||
preprocessingfilters:
|
||||
- name: jsonjoinarray
|
||||
args: ["$.result", ""]
|
||||
- name: prepend
|
||||
args: "<table>"
|
||||
- name: append
|
||||
args: "</table>"
|
||||
rows:
|
||||
selector: tr
|
||||
selector: table > tbody > tr
|
||||
fields:
|
||||
category:
|
||||
selector: a[href*="/categories/"]
|
||||
@@ -63,18 +56,11 @@
|
||||
title:
|
||||
selector: a.view-torrent
|
||||
download:
|
||||
selector: a[href*="/download_check/"]
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["/download_check/", "/download/"]
|
||||
details:
|
||||
selector: a.view-torrent
|
||||
attribute: href
|
||||
imdb:
|
||||
optional: true
|
||||
selector: a[href*="://www.imdb.com/title/"]
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(5)
|
||||
seeders:
|
||||
@@ -88,18 +74,37 @@
|
||||
args: ([\d\.]+)
|
||||
date:
|
||||
selector: time
|
||||
attribute: datetime
|
||||
filters:
|
||||
- name: append
|
||||
args: " +00:00"
|
||||
- name: dateparse
|
||||
args: "2006-01-02 15:04:05 -07:00"
|
||||
# translations for Turkish|Estonian|Danish|Italian|Polish|Norwegian|Portoguese|Czech|Russian|Romanian|Spanish|French|German|Bulgarian|Dutch
|
||||
- name: re_replace
|
||||
args: ["(önce|tagasi|geleden|fa|temu|siden|atrás|nazpět|назад|acum|hace|il y a|vor|преди)", "ago"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minut|minuto|minuta|minutt|минута|Minute|minuut)", "minute"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minutit|minutter|minuti|minuty|minutos|минуты|минут|Minuten|минути|minuten)", "minutes"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tund|time|ora|godzina|hora|hodina|час|oră|heure|Stunde|uur)", "hour"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tundi|timer|ore|godziny|horas|hodiny|hoden|часа|часов|ore|heures|Stunden)", "hours"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päev|dag|giorno|dzień|dia|den|день|zi|día|jour|Tag|ден)", "day"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päeva|dage|giorni|dni|dias|dny|дня|дней|zile|días|jours|Tagen|дни|dagen)", "days"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädal|uge|settimana|tydzień|uke|semana|týden|неделю|săptămână|semaine|Woche|седмица)", "week"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädalat|uger|settimane|tygodnie|uker|semanas|týdny|недели|недель|săptămâni|semaines|Wochen|седмици|weken)", "weeks"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuu|måned|mese|miesiąc|mês|měsíc|месяц|lună|mes|mois|Monat|месец|maand)", "month"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuud|måneder|mesi|miesiące|meses|měsíce|месяца|месяцев|luni|meses|mois|Monaten|месеца|maanden)", "months"]
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"100% Free\"]": "0"
|
||||
"i[data-original-title=\"Global FreeLeech\"]": "0"
|
||||
"i[data-original-title=\"100% Free\"]": "0" # Single Torrent Freeleech
|
||||
"i[data-original-title=\"Global FreeLeech\"]": "0" # Global Freeleech
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"Double upload\"]": "2"
|
||||
"i[data-original-title=\"Double upload\"]": "2" # Single Torrent Double Upload
|
||||
"i[data-original-title=\"Double Upload\"]": "2" # Global Double Upload
|
||||
"*": "1"
|
||||
|
@@ -1,94 +0,0 @@
|
||||
---
|
||||
site: bt-scene
|
||||
name: BT-Scene
|
||||
description: "BT-Scene (BTS) is a Public site for MOVIES / TV / GENERAL"
|
||||
language: us-en
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://bt-scene.cc/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Movies"}
|
||||
- {id: 2, cat: TV, desc: "Series"}
|
||||
- {id: 3, cat: Audio, desc: "Music"}
|
||||
- {id: 4, cat: PC/Games, desc: "Games"}
|
||||
- {id: 5, cat: PC/0day, desc: "Software"}
|
||||
- {id: 6, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 7, cat: Books, desc: "Ebooks"}
|
||||
- {id: 8, cat: Other, desc: "Misc"}
|
||||
- {id: 9, cat: XXX, desc: "Porn"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: category
|
||||
type: select
|
||||
label: Category
|
||||
default: "0"
|
||||
options:
|
||||
"0" : "All"
|
||||
"1": "Movies"
|
||||
"2": "Series"
|
||||
"3": "Music"
|
||||
"4": "Games"
|
||||
"5": "Software"
|
||||
"6": "Anime"
|
||||
"7": "Ebooks"
|
||||
"8": "Misc"
|
||||
"9": "Porn"
|
||||
|
||||
search:
|
||||
# https://bt-scene.cc/cat/id/1/
|
||||
# https://bt-scene.cc/results_.php?q=midnight+texas+s01e10&advcat=2
|
||||
keywordsfilters:
|
||||
# replace space between keywords with +
|
||||
- name: re_replace
|
||||
args: [" ", "+"]
|
||||
paths:
|
||||
- path: "{{ if .Keywords }}results_.php?q={{ .Keywords }}&advcat={{ .Config.category }}{{else}}indexfull/{{end}}"
|
||||
rows:
|
||||
selector: table.tor > tbody > tr[id^="_"]
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
title:
|
||||
selector: td[class^="tname"] > a
|
||||
details:
|
||||
selector: td[class^="tname"] > a
|
||||
attribute: href
|
||||
category:
|
||||
selector: td[class^="tname"] > div.subinfo > a[href^="/cat/id"]
|
||||
optional: true
|
||||
attribute: href
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["[^\\d+]", ""]
|
||||
download:
|
||||
# build "/torrentget.php?id=5730447" from "_5730447"
|
||||
selector: tr
|
||||
attribute: id
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["_", ""]
|
||||
- name: prepend
|
||||
args: "/torrentget.php?id="
|
||||
size:
|
||||
selector: td[class^="tsize"]
|
||||
seeders:
|
||||
selector: td[class^="tseeds"]
|
||||
leechers:
|
||||
selector: td[class^="tpeers"]
|
||||
date:
|
||||
selector: td[class^="ttime"]
|
||||
filters:
|
||||
- name: append
|
||||
args: " ago"
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
@@ -28,7 +28,7 @@
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: "list/{{if .Keywords}}{{.Keywords}}{{else}}movie{{end}}.html"
|
||||
- path: "list/{{if .Keywords}}{{.Keywords}}{{else}}movie{{end}}/1-1-0.html"
|
||||
rows:
|
||||
selector: .rs
|
||||
fields:
|
||||
@@ -53,6 +53,10 @@
|
||||
selector: .sbar span:nth-of-type(5) b
|
||||
grabs:
|
||||
selector: .sbar span:nth-of-type(6) b
|
||||
seeders:
|
||||
text: "1"
|
||||
leechers:
|
||||
text: "1"
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: "{{if .Keywords}}q/{{ .Keywords}}/?sort=time{{else}}recent{{end}}"
|
||||
- path: "{{if .Keywords}}q/{{ .Keywords}}/?sort=time{{else}}q/test/{{end}}"
|
||||
- path: "{{if .Keywords}}q/{{ .Keywords}}/2?sort=time{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}q/{{ .Keywords}}/3?sort=time{{else}}{{end}}"
|
||||
- path: "{{if .Keywords}}q/{{ .Keywords}}/4?sort=time{{else}}{{end}}"
|
||||
@@ -63,9 +63,9 @@
|
||||
grabs:
|
||||
selector: div[class$="info"] span:nth-of-type(4)
|
||||
seeders:
|
||||
text: "999"
|
||||
selector: div[class$="info"] span:nth-of-type(4)
|
||||
leechers:
|
||||
text: "999"
|
||||
selector: div[class$="info"] span:nth-of-type(4)
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
|
117
src/Jackett.Common/Definitions/btgigs.yml
Normal file
117
src/Jackett.Common/Definitions/btgigs.yml
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
site: btgigs
|
||||
name: BTGigs
|
||||
description: "BTGigs (TG) is a POLISH Private Torrent Tracker for MOVIES / TV / GENERAL"
|
||||
language: pl-pl
|
||||
type: private
|
||||
encoding: ISO-8859-2
|
||||
links:
|
||||
- https://btgigs.info/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 36, cat: Audio/Audiobook, desc: "aBooki"}
|
||||
- {id: 27, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 1, cat: PC, desc: "Aplikacje PC"}
|
||||
- {id: 10, cat: Books/EBook, desc: "eBooki"}
|
||||
- {id: 34, cat: Movies/BluRay, desc: "Filmy/BR"}
|
||||
- {id: 4, cat: Movies/SD, desc: "Filmy/DVD-R"}
|
||||
- {id: 31, cat: Movies/HD, desc: "Filmy/HD Rip"}
|
||||
- {id: 17, cat: Movies/Other, desc: "Filmy/Inne"}
|
||||
- {id: 35, cat: Movies/UHD, desc: "Filmy/UHD"}
|
||||
- {id: 20, cat: Movies/SD, desc: "Filmy/XviD"}
|
||||
- {id: 21, cat: Console, desc: "Gry/konsole"}
|
||||
- {id: 7, cat: PC/Games, desc: "Gry/PC ISO"}
|
||||
- {id: 12, cat: PC/Games, desc: "Gry/PC Rips"}
|
||||
- {id: 28, cat: Other, desc: "GSM/PDA"}
|
||||
- {id: 19, cat: Audio/Video, desc: "Koncerty/Teledyski"}
|
||||
- {id: 32, cat: Audio/Lossless, desc: "musicDVD/DTS/FLAC"}
|
||||
- {id: 5, cat: Audio/MP3, desc: "Muzyka/MP3"}
|
||||
- {id: 26, cat: Other, desc: "Rozne"}
|
||||
- {id: 30, cat: TV/Sport, desc: "Sport"}
|
||||
- {id: 6, cat: TV, desc: "TV/Seriale"}
|
||||
- {id: 29, cat: PC, desc: "Witaminki"}
|
||||
- {id: 9, cat: XXX, desc: "XXX"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
login:
|
||||
path: /takelogin__akcja.php
|
||||
method: post
|
||||
inputs:
|
||||
username_dupa: "{{ .Config.username }}"
|
||||
password__dupa: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: td.embedded:has(h2:contains("failed"))
|
||||
- selector: td.embedded:has(h2:contains("Error"))aD
|
||||
test:
|
||||
selector: a[href^="logout.php"]
|
||||
path: /browse.php
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /browse.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
incldead: 1
|
||||
tyt: 0
|
||||
lang: 0
|
||||
subcat: 0
|
||||
rows:
|
||||
selector: table[border="1"][cellpadding=5] > tbody > tr:has(a[href^="details.php?id="])
|
||||
fields:
|
||||
title:
|
||||
selector: a[href^="details.php?id="]
|
||||
details:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
category:
|
||||
selector: a[href^="browse.php?cat="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: cat
|
||||
download:
|
||||
selector: a[href^="download.php/"]
|
||||
attribute: href
|
||||
description:
|
||||
optional: true
|
||||
selector: img[src^="/pic/cat_pl/"]
|
||||
attribute: src
|
||||
filters:
|
||||
- name: append
|
||||
args: "Language: polish\n<br>"
|
||||
- name: prepend
|
||||
args: {{ .Result.description }}
|
||||
imdb:
|
||||
optional: true
|
||||
selector: a[href^="http://www.imdb.com/title/tt"]
|
||||
date:
|
||||
selector: td:nth-child(5)
|
||||
filters:
|
||||
- name: append
|
||||
args: " +00:00"
|
||||
- name: dateparse
|
||||
args: "2006-01-0215:04:05 -07:00"
|
||||
grabs:
|
||||
selector: td:nth-child(7)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: (\d+)
|
||||
size:
|
||||
selector: td:nth-child(6)
|
||||
seeders:
|
||||
selector: td:nth-child(8)
|
||||
leechers:
|
||||
selector: td:nth-child(9)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"img[src=\"pic/ico_disk1.png\"]": 0
|
||||
"img[src=\"pic/ico_disk2.png\"]": 1
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
78
src/Jackett.Common/Definitions/btstornet.yml
Normal file
78
src/Jackett.Common/Definitions/btstornet.yml
Normal file
@@ -0,0 +1,78 @@
|
||||
---
|
||||
site: btstornet
|
||||
name: BTstor.net
|
||||
description: "BTstor.net is a Public BT-Scene clone for MOVIES / TV / GENERAL"
|
||||
language: us-en
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://btstor.net/
|
||||
|
||||
caps:
|
||||
categories:
|
||||
"anime": TV/Anime
|
||||
"books": Books
|
||||
"games": PC/Games
|
||||
"movies": Movies
|
||||
"music": Audio
|
||||
"other": Other
|
||||
"shows": TV
|
||||
"software": PC
|
||||
"video": Movies
|
||||
"xxx": XXX
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings: []
|
||||
|
||||
download:
|
||||
selector: "#dlt_"
|
||||
|
||||
search:
|
||||
# https://btstor.net/
|
||||
# https://btstor.net/q/midnight+texas+s01e10/date/
|
||||
keywordsfilters:
|
||||
# replace space between keywords with +
|
||||
- name: re_replace
|
||||
args: [" ", "+"]
|
||||
paths:
|
||||
- path: "q/{{ if .Keywords }}{{ .Keywords }}{{else}}test{{end}}/date/"
|
||||
rows:
|
||||
selector: table.tor > tbody > tr[class$="_tr"]
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
title:
|
||||
selector: td.tname_index > a
|
||||
details:
|
||||
selector: td.tname_index > a
|
||||
attribute: href
|
||||
category:
|
||||
# src="https://btstor.net/templates/btscene/images/shows.png"
|
||||
selector: td.tname_index > img
|
||||
attribute: src
|
||||
filters:
|
||||
- name: replace
|
||||
args: [".png", ""]
|
||||
- name: split
|
||||
args: ["/", 6]
|
||||
download:
|
||||
selector: td.tname_index > a
|
||||
attribute: href
|
||||
size:
|
||||
selector: td.tsize_index
|
||||
seeders:
|
||||
selector: td.tseeds_index
|
||||
leechers:
|
||||
selector: td.tpeers_index
|
||||
date:
|
||||
selector: td.tupd_index
|
||||
filters:
|
||||
- name: timeago
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
109
src/Jackett.Common/Definitions/btxpress.yml
Normal file
109
src/Jackett.Common/Definitions/btxpress.yml
Normal file
@@ -0,0 +1,109 @@
|
||||
---
|
||||
site: btxpress
|
||||
name: BTXpress
|
||||
description: "HD Tracker Movies/TV"
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://btxpress.org/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Movies"}
|
||||
- {id: 2, cat: TV, desc: "TV"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
login:
|
||||
path: /login
|
||||
method: form
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: table.main:contains("Login Failed!")
|
||||
test:
|
||||
path: /torrents
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /filterTorrents
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}categories[]={{.}}&{{end}}"
|
||||
search: "{{if .Query.IMDBID}}{{else}}{{ .Keywords }}{{end}}"
|
||||
uploader: ""
|
||||
imdb: "{{ .Query.IMDBIDShort }}"
|
||||
tvdb: ""
|
||||
tmdb: ""
|
||||
mal: ""
|
||||
sorting: created_at
|
||||
direction: desc
|
||||
qty: 100
|
||||
rows:
|
||||
selector: table > tbody > tr
|
||||
fields:
|
||||
category:
|
||||
selector: a[href*="/categories/"]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "/categories/.*?\\.(\\d+)"
|
||||
title:
|
||||
selector: a.view-torrent
|
||||
download:
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
details:
|
||||
selector: a.view-torrent
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(4)
|
||||
seeders:
|
||||
selector: td:nth-child(6)
|
||||
leechers:
|
||||
selector: td:nth-child(7)
|
||||
grabs:
|
||||
selector: td:nth-child(5)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: ([\d\.]+)
|
||||
date:
|
||||
selector: time
|
||||
filters:
|
||||
# translations for Turkish|Estonian|Danish|Italian|Polish|Norwegian|Portoguese|Czech|Russian|Romanian|Spanish|French|German|Bulgarian|Dutch
|
||||
- name: re_replace
|
||||
args: ["(önce|tagasi|geleden|fa|temu|siden|atrás|nazpět|назад|acum|hace|il y a|vor|преди)", "ago"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minut|minuto|minuta|minutt|минута|Minute|minuut)", "minute"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minutit|minutter|minuti|minuty|minutos|минуты|минут|Minuten|минути|minuten)", "minutes"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tund|time|ora|godzina|hora|hodina|час|oră|heure|Stunde|uur)", "hour"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tundi|timer|ore|godziny|horas|hodiny|hoden|часа|часов|ore|heures|Stunden)", "hours"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päev|dag|giorno|dzień|dia|den|день|zi|día|jour|Tag|ден)", "day"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päeva|dage|giorni|dni|dias|dny|дня|дней|zile|días|jours|Tagen|дни|dagen)", "days"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädal|uge|settimana|tydzień|uke|semana|týden|неделю|săptămână|semaine|Woche|седмица)", "week"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädalat|uger|settimane|tygodnie|uker|semanas|týdny|недели|недель|săptămâni|semaines|Wochen|седмици|weken)", "weeks"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuu|måned|mese|miesiąc|mês|měsíc|месяц|lună|mes|mois|Monat|месец|maand)", "month"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuud|måneder|mesi|miesiące|meses|měsíce|месяца|месяцев|luni|meses|mois|Monaten|месеца|maanden)", "months"]
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"100% Free\"]": "0" # Single Torrent Freeleech
|
||||
"i[data-original-title=\"Global FreeLeech\"]": "0" # Global Freeleech
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"Double upload\"]": "2" # Single Torrent Double Upload
|
||||
"i[data-original-title=\"Double Upload\"]": "2" # Global Double Upload
|
||||
"*": "1"
|
@@ -45,10 +45,7 @@
|
||||
- selector: table:contains("Login failed!")
|
||||
test:
|
||||
path: index.php
|
||||
|
||||
download:
|
||||
selector: a[href^="download.php?id="]
|
||||
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: browse.php
|
||||
|
@@ -1,13 +1,39 @@
|
||||
---
|
||||
# Update by LA5T based on the orignial 'cinematik.yml'
|
||||
# 29.07.2018 22:53 UTC+2
|
||||
#
|
||||
site: cinematik
|
||||
name: Cinematik
|
||||
description: "Non-Hollywood movie tracker"
|
||||
description: "Tracker for non-hollywood movies."
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.cinematik.net
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: incldead
|
||||
type: select
|
||||
label: Status
|
||||
default: 1
|
||||
options:
|
||||
0: Active
|
||||
1: "Active and Inactive"
|
||||
2: Inactive
|
||||
- name: srchdtls
|
||||
type: checkbox
|
||||
label: "Detailed search"
|
||||
- name: info_results
|
||||
type: info
|
||||
label: "Search results"
|
||||
default: "You can increase the number of search results in your profile.<br />Default is 15."
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Comedy"}
|
||||
@@ -42,13 +68,15 @@
|
||||
- selector: table:contains("Login failed!")
|
||||
test:
|
||||
path: my.php
|
||||
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: browse.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
incldead: "{{ .Config.incldead }}"
|
||||
srchdtls: "{{ if .Config.srchdtls }}1{{ else }}0{{ end }}"
|
||||
rows:
|
||||
selector: table[border="1"] tr:not(:first-child)
|
||||
fields:
|
||||
@@ -82,11 +110,11 @@
|
||||
selector: td:nth-child(11) div.addedtor
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"img[title=\"Golden Torrent: No Download Stats are Recorded\"]": "0"
|
||||
"img[title=\"Silver Torrent: Download Stats are 25% Recorded\"]": "0.25"
|
||||
"img[title=\"Platinum Torrent: No Download Stats are Recorded, Upload Stats are Doubled!\"]": "0"
|
||||
"*": "1"
|
||||
"img[title=\"Golden Torrent: No Download Stats are Recorded\"]": 0
|
||||
"img[title=\"Silver Torrent: Download Stats are 25% Recorded\"]": 0.25
|
||||
"img[title=\"Platinum Torrent: No Download Stats are Recorded, Upload Stats are Doubled!\"]": 0
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"img[title=\"Platinum Torrent: No Download Stats are Recorded, Upload Stats are Doubled!\"]": "2"
|
||||
"*": "1"
|
||||
"img[title=\"Platinum Torrent: No Download Stats are Recorded, Upload Stats are Doubled!\"]": 2
|
||||
"*": 1
|
@@ -5,9 +5,14 @@
|
||||
language: fr-fr
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- http://cpasbiens1.com/
|
||||
- https://www.cpasbien.blue/
|
||||
legacylinks:
|
||||
- http://www.cpasbiens.cc/
|
||||
- http://www.cpabien.cm/
|
||||
- http://cpabien.cm/
|
||||
- http://cpasbiens1.com/
|
||||
- http://cpabien.mx/
|
||||
- https://www.cpabien.bz/
|
||||
- http://www.cpabien.bz/
|
||||
@@ -17,6 +22,13 @@
|
||||
- http://cpabien.co/
|
||||
- http://cpabien.la/
|
||||
- http://cpabien.club/
|
||||
- http://www.cpabien.io/
|
||||
- https://ww1.cpabien.io/
|
||||
- https://wvw.cpabien.cm/
|
||||
- https://www.cpabien.io/
|
||||
- https://www.cpabien.cx/
|
||||
- https://www.cpabien9.net/
|
||||
- https://wwv.cpabien.cm/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
@@ -30,13 +42,13 @@
|
||||
settings: []
|
||||
|
||||
download:
|
||||
selector: "#telecharger a"
|
||||
|
||||
selector: div.btn-download a
|
||||
attribute: href
|
||||
search:
|
||||
paths:
|
||||
- path: "/search.php?t={{ .Keywords }}"
|
||||
- path: "{{ if .Keywords }}recherche/{{ .Keywords }}{{else}}derniers/{{end}}"
|
||||
rows:
|
||||
selector: div[class^='ligne']
|
||||
selector: table.table-corps tbody tr td
|
||||
fields:
|
||||
site_date:
|
||||
selector: a
|
||||
|
@@ -38,16 +38,15 @@
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: cookie
|
||||
type: text
|
||||
label: Cookie
|
||||
|
||||
login:
|
||||
path: /login-page
|
||||
method: form
|
||||
form: form[action^="/login"]
|
||||
method: cookie
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
persistent_login: "1"
|
||||
error:
|
||||
- selector: div.error
|
||||
cookie: "{{ .Config.cookie }}"
|
||||
test:
|
||||
path: /torrents
|
||||
|
||||
@@ -68,6 +67,14 @@
|
||||
args: [".*? / ", ""]
|
||||
- name: diacritics
|
||||
args: replace
|
||||
- name: replace
|
||||
args: ["1080i", "1080p"]
|
||||
- name: replace
|
||||
args: ["720i", "720p"]
|
||||
- name: replace
|
||||
args: ["pLQ", "p"]
|
||||
- name: replace
|
||||
args: ["pHD", "p"]
|
||||
- name: replace
|
||||
args: ["serie", ""]
|
||||
- name: replace
|
||||
|
@@ -128,7 +128,18 @@
|
||||
"2" : "Argent (Silver)"
|
||||
"3" : "Or (Gold)"
|
||||
"4" : "Argent & Or (Both)"
|
||||
|
||||
- name: multilang
|
||||
type: checkbox
|
||||
label: Replace MULTI by another language in release name
|
||||
default: false
|
||||
- name: multilanguage
|
||||
type: select
|
||||
label: Replace MULTI by this language
|
||||
default: FRENCH
|
||||
options:
|
||||
FRENCH : "FRENCH"
|
||||
MULTI.FRENCH : "MULTI.FRENCH"
|
||||
ENGLISH: "ENGLISH"
|
||||
login:
|
||||
path: tracker/index.php?page=login
|
||||
method: post
|
||||
@@ -168,8 +179,15 @@
|
||||
rows:
|
||||
selector: table > tbody > tr > td > table.lista > tbody > tr:has(td[onmouseover="this.className='post'"])
|
||||
fields:
|
||||
title:
|
||||
title_phase1:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
title_multilang:
|
||||
text: "{{ .Result.title_phase1 }}"
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["[\\.\\s\\[\\-][Mm][Uu][Ll][Tt][Ii][\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."]
|
||||
title:
|
||||
text: "{{if .Config.multilang }}{{ .Result.title_multilang }}{{else}}{{ .Result.title_phase1 }}{{end}}"
|
||||
details:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
attribute: href
|
||||
@@ -189,23 +207,23 @@
|
||||
- name: querystring
|
||||
args: "category"
|
||||
date:
|
||||
selector: td:nth-of-type(4)
|
||||
selector: td:nth-of-type(5)
|
||||
filters:
|
||||
- name: append
|
||||
args: " -04:00"
|
||||
- name: dateparse
|
||||
args: "02/01/2006 15:04:05 -07:00"
|
||||
seeders:
|
||||
selector: td:nth-of-type(6)
|
||||
leechers:
|
||||
selector: td:nth-of-type(7)
|
||||
grabs:
|
||||
leechers:
|
||||
selector: td:nth-of-type(8)
|
||||
grabs:
|
||||
selector: td:nth-of-type(9)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["---", "0"]
|
||||
size:
|
||||
selector: td:nth-of-type(10)
|
||||
selector: td:nth-of-type(11)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[src="images/freeleech.gif"]: "0"
|
||||
|
116
src/Jackett.Common/Definitions/dxdhd.yml
Normal file
116
src/Jackett.Common/Definitions/dxdhd.yml
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
site: dxdhd
|
||||
name: DXDHD
|
||||
description: "General Tracker"
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://dxdhd.com/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Movies"}
|
||||
- {id: 2, cat: TV, desc: "TV"}
|
||||
- {id: 3, cat: Audio, desc: "Music"}
|
||||
- {id: 4, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 5, cat: PC/0day, desc: "Apps"}
|
||||
- {id: 6, cat: Books, desc: "Books"}
|
||||
- {id: 7, cat: PC/Games, desc: "Games"}
|
||||
- {id: 8, cat: TV/Sport, desc: "Sports"}
|
||||
- {id: 9, cat: Other, desc: "Other"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
login:
|
||||
path: /login
|
||||
method: form
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: table.main:contains("Login Failed!")
|
||||
test:
|
||||
path: /torrents
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /filterTorrents
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}categories[]={{.}}&{{end}}"
|
||||
search: "{{if .Query.IMDBID}}{{else}}{{ .Keywords }}{{end}}"
|
||||
uploader: ""
|
||||
imdb: "{{ .Query.IMDBIDShort }}"
|
||||
tvdb: ""
|
||||
tmdb: ""
|
||||
mal: ""
|
||||
sorting: created_at
|
||||
direction: desc
|
||||
qty: 100
|
||||
rows:
|
||||
selector: table > tbody > tr
|
||||
fields:
|
||||
category:
|
||||
selector: a[href*="/categories/"]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "/categories/.*?\\.(\\d+)"
|
||||
title:
|
||||
selector: a.view-torrent
|
||||
download:
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
details:
|
||||
selector: a.view-torrent
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(5)
|
||||
seeders:
|
||||
selector: td:nth-child(7)
|
||||
leechers:
|
||||
selector: td:nth-child(8)
|
||||
grabs:
|
||||
selector: td:nth-child(6)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: ([\d\.]+)
|
||||
date:
|
||||
selector: time
|
||||
filters:
|
||||
# translations for Turkish|Estonian|Danish|Italian|Polish|Norwegian|Portoguese|Czech|Russian|Romanian|Spanish|French|German|Bulgarian|Dutch
|
||||
- name: re_replace
|
||||
args: ["(önce|tagasi|geleden|fa|temu|siden|atrás|nazpět|назад|acum|hace|il y a|vor|преди)", "ago"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minut|minuto|minuta|minutt|минута|Minute|minuut)", "minute"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minutit|minutter|minuti|minuty|minutos|минуты|минут|Minuten|минути|minuten)", "minutes"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tund|time|ora|godzina|hora|hodina|час|oră|heure|Stunde|uur)", "hour"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tundi|timer|ore|godziny|horas|hodiny|hoden|часа|часов|ore|heures|Stunden)", "hours"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päev|dag|giorno|dzień|dia|den|день|zi|día|jour|Tag|ден)", "day"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päeva|dage|giorni|dni|dias|dny|дня|дней|zile|días|jours|Tagen|дни|dagen)", "days"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädal|uge|settimana|tydzień|uke|semana|týden|неделю|săptămână|semaine|Woche|седмица)", "week"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädalat|uger|settimane|tygodnie|uker|semanas|týdny|недели|недель|săptămâni|semaines|Wochen|седмици|weken)", "weeks"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuu|måned|mese|miesiąc|mês|měsíc|месяц|lună|mes|mois|Monat|месец|maand)", "month"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuud|måneder|mesi|miesiące|meses|měsíce|месяца|месяцев|luni|meses|mois|Monaten|месеца|maanden)", "months"]
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"100% Free\"]": "0" # Single Torrent Freeleech
|
||||
"i[data-original-title=\"Global FreeLeech\"]": "0" # Global Freeleech
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"Double upload\"]": "2" # Single Torrent Double Upload
|
||||
"i[data-original-title=\"Double Upload\"]": "2" # Global Double Upload
|
||||
"*": "1"
|
75
src/Jackett.Common/Definitions/elitetorrent-biz.yml
Normal file
75
src/Jackett.Common/Definitions/elitetorrent-biz.yml
Normal file
@@ -0,0 +1,75 @@
|
||||
---
|
||||
site: elitetorrent-biz
|
||||
name: EliteTorrent.biz
|
||||
description: "EliteTorrent.biz is a Public torrent site for TV, movies and documentaries"
|
||||
language: es-es
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.elitetorrent.biz/
|
||||
|
||||
caps:
|
||||
categories:
|
||||
"series": TV
|
||||
"peliculas": Movies
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings: []
|
||||
|
||||
download:
|
||||
selector: a[href^="magnet:?"]
|
||||
attribute: href
|
||||
|
||||
search:
|
||||
path: index.php
|
||||
keywordsfilters:
|
||||
# most ES/ITA TV torrents are in XXxYY format, so we search without S/E prefixes and filter later
|
||||
- name: re_replace
|
||||
args: ["S0?(\\d{1,2})", " $1 "]
|
||||
- name: re_replace
|
||||
args: ["E(\\d{2,3})", " $1 "]
|
||||
inputs:
|
||||
s: "{{ .Keywords }}"
|
||||
$raw: "&x=0&y=0"
|
||||
rows:
|
||||
selector: "#principal .miniboxs-ficha li"
|
||||
fields:
|
||||
title:
|
||||
selector: .meta a
|
||||
# normalize to SXXEYY format
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["(\\d{2})×(\\d{2})", "S$1E$2"]
|
||||
- name: re_replace
|
||||
args: ["(\\d{1})×(\\d{2})", "S0$1E$2"]
|
||||
details:
|
||||
selector: .meta a
|
||||
attribute: href
|
||||
download:
|
||||
selector: .meta a
|
||||
attribute: href
|
||||
category:
|
||||
selector: .meta a
|
||||
attribute: href
|
||||
filters:
|
||||
- name: split
|
||||
args: ["/", 3]
|
||||
size:
|
||||
selector: .voto1
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["s", ""]
|
||||
date:
|
||||
text: now
|
||||
seeders:
|
||||
text: "1"
|
||||
leechers:
|
||||
text: "1"
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
@@ -115,6 +115,8 @@
|
||||
|
||||
rows:
|
||||
selector: table > tbody > tr:has(img[src*="/pic/categories/"])
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
title:
|
||||
# using attribute title from td(3) because the text from td(2) a(2) can be abbreviated
|
||||
|
@@ -1,177 +0,0 @@
|
||||
---
|
||||
site: eotforum
|
||||
name: EoT-Forum
|
||||
description: "A German gerneral tracker"
|
||||
language: de-de
|
||||
type: private
|
||||
encoding: windows-1252
|
||||
links:
|
||||
- https://eot-forum.net
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
# Filme
|
||||
- {id: 14, cat: Movies/SD, desc: "SD XviD"}
|
||||
- {id: 15, cat: Movies/SD, desc: "SD x264"}
|
||||
- {id: 16, cat: Movies/HD, desc: "HD"}
|
||||
- {id: 68, cat: Movies/HD, desc: "UHD"}
|
||||
- {id: 17, cat: Movies/3D, desc: "3D"}
|
||||
- {id: 18, cat: Movies/DVD, desc: "DVD-R"}
|
||||
- {id: 19, cat: Movies, desc: "Pack"}
|
||||
- {id: 20, cat: Movies, desc: "International"}
|
||||
- {id: 21, cat: XXX, desc: "XXX"}
|
||||
|
||||
# Serien/TV
|
||||
- {id: 23, cat: TV/SD, desc: "SD XviD"}
|
||||
- {id: 24, cat: TV/SD, desc: "SD x264"}
|
||||
- {id: 25, cat: TV/HD, desc: "HD"}
|
||||
- {id: 26, cat: TV/SD, desc: "DVD-R"}
|
||||
- {id: 27, cat: TV, desc: "Pack"}
|
||||
- {id: 28, cat: TV, desc: "International"}
|
||||
- {id: 29, cat: TV/Sport, desc: "Sport"}
|
||||
|
||||
# Dokus
|
||||
- {id: 31, cat: TV/Documentary, desc: "SD XviD"}
|
||||
- {id: 32, cat: TV/Documentary, desc: "SD x264"}
|
||||
- {id: 33, cat: TV/Documentary, desc: "HD"}
|
||||
- {id: 34, cat: TV/Documentary, desc: "3D"}
|
||||
- {id: 35, cat: TV/Documentary, desc: "Pack"}
|
||||
- {id: 67, cat: TV/Documentary, desc: "DVD-R"}
|
||||
- {id: 36, cat: TV/Documentary, desc: "International"}
|
||||
|
||||
# Audio
|
||||
- {id: 38, cat: Audio, desc: "Charts"}
|
||||
- {id: 39, cat: Audio/MP3, desc: "MP3"}
|
||||
- {id: 40, cat: Audio/Lossless, desc: "Flac"}
|
||||
- {id: 41, cat: Audio, desc: "Pack"}
|
||||
- {id: 42, cat: Audio/Video, desc: "MusikVideo"}
|
||||
- {id: 43, cat: Audio/Audiobook, desc: "Hörbücher"}
|
||||
|
||||
# Spiele
|
||||
- {id: 45, cat: PC/Games, desc: "Windows"}
|
||||
- {id: 46, cat: PC/Mac, desc: "MacOS"}
|
||||
- {id: 47, cat: Console/PS4, desc: "Sony PS"}
|
||||
- {id: 48, cat: Console/Xbox , desc: "Microsoft XBox"}
|
||||
- {id: 49, cat: Console/NDS, desc: "Nintendo"}
|
||||
- {id: 50, cat: PC/Games, desc: "Linux"}
|
||||
- {id: 51, cat: Console, desc: "Andere"}
|
||||
|
||||
# Software
|
||||
- {id: 53, cat: PC, desc: "Windows"}
|
||||
- {id: 54, cat: PC/Mac, desc: "MacOS"}
|
||||
- {id: 55, cat: PC, desc: "Linux"}
|
||||
- {id: 56, cat: PC/Phone-Android, desc: "Android"}
|
||||
- {id: 57, cat: PC/Phone-IOS, desc: "Apple IOS"}
|
||||
- {id: 58, cat: PC/Phone-Other, desc: "Andere"}
|
||||
|
||||
# Sonstiges
|
||||
- {id: 60, cat: Books, desc: "EBooks"}
|
||||
- {id: 61, cat: Other, desc: "Bilder"}
|
||||
- {id: 62, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 63, cat: Other, desc: "MISC"}
|
||||
- {id: 64, cat: XXX, desc: "XXX-Bilder/EBooks/Audio"}
|
||||
|
||||
# EOT-Specials
|
||||
- {id: 66, cat: Other, desc: "Special"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
|
||||
login:
|
||||
path: index.php?page=login
|
||||
method: post
|
||||
inputs:
|
||||
uid: "{{ .Config.username }}"
|
||||
pwd: "{{ .Config.password }}"
|
||||
rememberme: "forever"
|
||||
submit: "Login"
|
||||
error:
|
||||
- selector: td.lista[align="center"][colspan="2"] > span
|
||||
test:
|
||||
path: index.php
|
||||
selector: a[href^="logout.php"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: index.php
|
||||
inputs:
|
||||
page: "torrents"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
options: "0"
|
||||
active: "0"
|
||||
gold: "0"
|
||||
rows:
|
||||
selector: table.lista > tbody > tr:has(a[href^="index.php?page=torrent-details&id="])
|
||||
dateheaders:
|
||||
selector: ":has(td.header > b)"
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Torrents vom ", ""]
|
||||
- name: replace
|
||||
args: ["Januar", "January"]
|
||||
- name: replace
|
||||
args: ["Februar", "February"]
|
||||
- name: replace
|
||||
args: ["März", "March"]
|
||||
- name: replace
|
||||
args: ["Mai", "May"]
|
||||
- name: replace
|
||||
args: ["Juni", "June"]
|
||||
- name: replace
|
||||
args: ["Juli", "July"]
|
||||
- name: replace
|
||||
args: ["Oktober", "October"]
|
||||
- name: replace
|
||||
args: ["Dezember", "December"]
|
||||
- name: dateparse
|
||||
args: "02.January.2006"
|
||||
fields:
|
||||
download:
|
||||
selector: a[href^="download.php?id="]
|
||||
attribute: href
|
||||
title:
|
||||
selector: a[href^="index.php?page=torrent-details&id="]
|
||||
attribute: title
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["Details anzeigen: ", ""]
|
||||
category:
|
||||
selector: a[href^="index.php?page=torrents&category="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: category
|
||||
comments:
|
||||
selector: a[href*="#comments"]
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(3)
|
||||
grabs:
|
||||
selector: td:nth-child(5)
|
||||
filters:
|
||||
- name: split
|
||||
args: ["♦", 2]
|
||||
- name: replace
|
||||
args: ["---", "0"]
|
||||
seeders:
|
||||
selector: td:nth-child(5) > a:nth-child(1)
|
||||
leechers:
|
||||
selector: td:nth-child(5) > a:nth-child(2)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[alt="gold"]: "0"
|
||||
img[alt="silver"]: "0.5"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
img[alt="2x Upload Multiplier"]: "2"
|
||||
img[alt="3x Upload Multiplier"]: "3"
|
||||
img[alt="4x Upload Multiplier"]: "4"
|
||||
img[alt="5x Upload Multiplier"]: "5"
|
||||
img[alt="6x Upload Multiplier"]: "6"
|
||||
img[alt="7x Upload Multiplier"]: "7"
|
||||
img[alt="8x Upload Multiplier"]: "8"
|
||||
img[alt="9x Upload Multiplier"]: "9"
|
||||
img[alt="10x Upload Multiplier"]: "10"
|
||||
"*": "1"
|
@@ -1,4 +1,4 @@
|
||||
---
|
||||
---
|
||||
site: ethor
|
||||
name: Ethor.net (Thor's Land)
|
||||
description: "A French gerneral tracker"
|
||||
@@ -40,6 +40,26 @@
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: multilang
|
||||
type: checkbox
|
||||
label: Replace VFQ/MULTI by another language in release name
|
||||
default: false
|
||||
- name: multilanguage
|
||||
type: select
|
||||
label: Replace MULTI by this language
|
||||
default: MULTI.FRENCH
|
||||
options:
|
||||
FRENCH : "FRENCH"
|
||||
MULTI.FRENCH : "MULTI.FRENCH"
|
||||
ENGLISH: "ENGLISH"
|
||||
|
||||
login:
|
||||
path: login3.php
|
||||
method: form
|
||||
@@ -81,8 +101,28 @@
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["/details.php", "/download.php"]
|
||||
title:
|
||||
_title_original:
|
||||
selector: a[href^="/details.php"]:has(b)
|
||||
_title_original: # long titles (shortened with ...)
|
||||
selector: a[href^="/details.php"][title]
|
||||
attribute: title
|
||||
optional: true
|
||||
_title_normalized:
|
||||
text: "{{ .Result._title_original }}"
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["S(\\d{2}) E(\\d{2})", "S$1E$2"]
|
||||
- name: re_replace
|
||||
args: ["S(\\d{1}) E(\\d{2})", "S0$1E$2"]
|
||||
_title_multilang:
|
||||
text: "{{ .Result._title_normalized }}"
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["(?i)[\\.\\s\\[\\-]MULTI[\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."]
|
||||
- name: re_replace
|
||||
args: ["(?i)[\\.\\s\\[\\-]VFQ[\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."]
|
||||
title:
|
||||
text: "{{if .Config.multilang }}{{ .Result._title_multilang }}{{else}}{{ .Result._title_normalized }}{{end}}"
|
||||
category:
|
||||
selector: a[href^="/browse.php?cat="]
|
||||
attribute: href
|
||||
|
@@ -52,16 +52,25 @@
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
settings: []
|
||||
settings:
|
||||
- name: downloadlink
|
||||
type: select
|
||||
label: Download link
|
||||
default: "magnet:"
|
||||
options:
|
||||
"https://etorrent.click/" : "eTorrent.click"
|
||||
"magnet:": "magnet"
|
||||
|
||||
download:
|
||||
selector: a[href^="magnet:"]
|
||||
selector: a[href^="{{ .Config.downloadlink }}"]
|
||||
|
||||
search:
|
||||
path: torrents-search.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
sort: "id"
|
||||
order: "desc"
|
||||
incldead: "1"
|
||||
keywordsfilters:
|
||||
- name: replace
|
||||
@@ -103,4 +112,4 @@
|
||||
downloadvolumefactor:
|
||||
text: "0"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
||||
text: "1"
|
||||
|
@@ -5,8 +5,12 @@
|
||||
language: en-us
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- https://eztv.io/
|
||||
legacylinks:
|
||||
- https://eztv.ag/
|
||||
- https://eztv.re/
|
||||
|
||||
caps:
|
||||
categories:
|
||||
|
@@ -87,6 +87,7 @@
|
||||
- selector: div.myFrame:has(font.error)
|
||||
test:
|
||||
path: torrents-search.php
|
||||
selector: a.logout
|
||||
|
||||
search:
|
||||
paths:
|
||||
|
@@ -47,11 +47,41 @@
|
||||
paths:
|
||||
- path: "{{ if .Keywords }}buscar/descargas/{{ .Config.category }}/{{ .Keywords }}?search=Buscar{{else}}descargas{{end}}"
|
||||
- path: "{{ if .Keywords }}buscar/descargas/{{ .Config.category }}/{{ .Keywords }}?search=Buscar&page=2{{else}}descargas{{end}}"
|
||||
keywordsfilters:
|
||||
- name: re_replace #remove S/EXX from search string
|
||||
args: ["(S1)", ""]
|
||||
- name: re_replace #remove S/EXX from search string
|
||||
args: ["(S2)", "segunda temporada"]
|
||||
- name: re_replace #remove S/EXX from search string
|
||||
args: ["(S3)", "tercera temporada"]
|
||||
- name: re_replace #remove S/EXX from search string
|
||||
args: ["E([0-9]+)", "$1"]
|
||||
rows:
|
||||
selector: table#descargas > tbody > tr:has(td:has(a[href^="magnet:?"]))
|
||||
fields:
|
||||
title:
|
||||
selector: td.tit a
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["\\/", " "]
|
||||
- name: re_replace
|
||||
args: ["\\(", ""]
|
||||
- name: re_replace
|
||||
args: ["\\)", ""]
|
||||
- name: re_replace
|
||||
args: ["([A-z]*) temporada", ""]
|
||||
- name: re_replace
|
||||
args: ["S[pP]rimera", ""]
|
||||
- name: re_replace
|
||||
args: ["S[sS]egunda", ""]
|
||||
- name: re_replace
|
||||
args: ["S[tT]ercera", ""]
|
||||
- name: re_replace
|
||||
args: ["S([0-9]+) - Episodio ([0-9]+)", "$2"]
|
||||
- name: re_replace
|
||||
args: ["- Episodio ([0-9]*)", "$1"]
|
||||
- name: append
|
||||
args: " [spanish]"
|
||||
details:
|
||||
selector: td.tit a
|
||||
attribute: href
|
||||
|
151
src/Jackett.Common/Definitions/gay-torrentsorg.yml
Normal file
151
src/Jackett.Common/Definitions/gay-torrentsorg.yml
Normal file
@@ -0,0 +1,151 @@
|
||||
---
|
||||
# By LA5T for https://gay-torrents.org (29.07.2018 22:55 UTC+2)
|
||||
#
|
||||
site: gay-torrentsorg
|
||||
name: gay-torrents.org
|
||||
description: "Tracker for GAY XXX, movies, TV, books and PC."
|
||||
language: en-us
|
||||
type: semi-private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://gay-torrents.org
|
||||
- https://gay-area.org/
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: active
|
||||
type: select
|
||||
label: Status
|
||||
default: 0
|
||||
options:
|
||||
0: "Active and Inactive"
|
||||
1: Active
|
||||
2: Inactive
|
||||
- name: info_categories
|
||||
type: info
|
||||
label: "Hidden categories"
|
||||
default: "Results for categories hidden in profile will not be visible."
|
||||
- name: info_results
|
||||
type: info
|
||||
label: "Search results"
|
||||
default: "You can increase the number of search results in your profile.<br />Default is 15."
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 15, cat: XXX, desc: "Amateur"}
|
||||
- {id: 16, cat: XXX, desc: "Anal"}
|
||||
- {id: 42, cat: XXX, desc: "Animation"}
|
||||
- {id: 18, cat: XXX, desc: "Asian"}
|
||||
- {id: 19, cat: XXX, desc: "Bareback"}
|
||||
- {id: 20, cat: XXX, desc: "Bears"}
|
||||
- {id: 22, cat: XXX, desc: "Bisexual"}
|
||||
- {id: 21, cat: XXX, desc: "Black"}
|
||||
- {id: 23, cat: XXX, desc: "Chubs"}
|
||||
- {id: 25, cat: XXX, desc: "Cross Generation"}
|
||||
- {id: 51, cat: XXX, desc: "Doctor/Medical"}
|
||||
- {id: 27, cat: XXX, desc: "Fetish"}
|
||||
- {id: 28, cat: XXX, desc: "Group Sex"}
|
||||
- {id: 30, cat: XXX, desc: "Hunks"}
|
||||
- {id: 52, cat: XXX, desc: "Interracial"}
|
||||
- {id: 68, cat: XXX, desc: "Homo Erotic"}
|
||||
- {id: 68, cat: Movies, desc: "Homo Erotic"}
|
||||
- {id: 68, cat: TV, desc: "Homo Erotic"}
|
||||
- {id: 68, cat: Other, desc: "Homo Erotic"}
|
||||
- {id: 32, cat: XXX, desc: "Latino"}
|
||||
- {id: 50, cat: XXX, desc: "Middle Eastern"}
|
||||
- {id: 33, cat: XXX, desc: "Military"}
|
||||
- {id: 34, cat: XXX, desc: "Oral-Sex"}
|
||||
- {id: 40, cat: Other, desc: "Other"}
|
||||
- {id: 35, cat: XXX, desc: "Solo"}
|
||||
- {id: 36, cat: XXX, desc: "Transsexual"}
|
||||
- {id: 37, cat: XXX, desc: "Twinks"}
|
||||
- {id: 38, cat: XXX, desc: "Vintage"}
|
||||
- {id: 39, cat: XXX, desc: "Wrestling"}
|
||||
- {id: 17, cat: PC, desc: "Applications"}
|
||||
- {id: 31, cat: XXX/Imageset, desc: "Images"}
|
||||
- {id: 49, cat: Books, desc: "Books"}
|
||||
- {id: 41, cat: Movies, desc: "Non-Porn"}
|
||||
- {id: 41, cat: TV, desc: "Non-Porn"}
|
||||
- {id: 41, cat: Other, desc: "Non-Porn"}
|
||||
modes:
|
||||
search: [q]
|
||||
|
||||
login:
|
||||
method: post
|
||||
path: login.php
|
||||
inputs:
|
||||
uid: "{{ .Config.username }}"
|
||||
pwd: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: div.fixed_width:nth-child(4) > span:contains("Incorrect")
|
||||
test:
|
||||
path: usercp.php
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: torrents_beta.php
|
||||
method: get
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}category[]={{.}}&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
active: "{{ .Config.active }}"
|
||||
rows:
|
||||
selector: div.torrent
|
||||
fields:
|
||||
title:
|
||||
selector: div:nth-child(2) > div:nth-child(1) > a:nth-child(1)
|
||||
category:
|
||||
selector: a[href^="torrents_beta.php?category="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: category
|
||||
details:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
banner:
|
||||
optional: true
|
||||
selector: a.screenshot
|
||||
attribute: rel
|
||||
grabs:
|
||||
selector: div.downloadTimes
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["No downloads yet", "0"]
|
||||
- name: regexp
|
||||
args: ([\d,]+)
|
||||
comments:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href^="download.php?id="]
|
||||
attribute: href
|
||||
size:
|
||||
selector: div.size
|
||||
seeders:
|
||||
selector: div.downloadPeers div:nth-child(1) > a
|
||||
leechers:
|
||||
selector: div.downloadPeers > div:nth-child(2) > a
|
||||
date:
|
||||
selector: div.date
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["on (\\d{2}:\\d{2}) (\\d{2})-([a-zA-Z]{3})-(\\d{4})", "$2 $3 $4 $1"]
|
||||
- name: append
|
||||
args: " +01:00"
|
||||
- name: dateparse
|
||||
args: "02 Jan 2006 15:04 -07:00"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"div:nth-child(2) > div:nth-child(3) > a:contains(\"FREE!\")": 0
|
||||
"div:nth-child(2) > div:nth-child(3) > a:contains(\"-50%\")": 0.5
|
||||
"div:nth-child(2) > div:nth-child(3) > a:contains(\"-25%\")": 0.25
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": 1
|
@@ -1,52 +1,80 @@
|
||||
---
|
||||
# Update by LA5T based on the orignial 'gaytorrentru.yml'
|
||||
# 29.07.2018 23:02 UTC+2
|
||||
#
|
||||
site: gaytorrentru
|
||||
name: GayTorrent.ru
|
||||
description: "World largest gay porn library for free with a stunning forum and 24/7 Chat"
|
||||
name: GAYtorrent.ru
|
||||
description: "World largest gay porn library for free with a stunning forum and 24/7 chat."
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://www.gaytorrent.ru/
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
label: Username
|
||||
- name: password
|
||||
type: password
|
||||
label: Password
|
||||
- name: incldead
|
||||
type: select
|
||||
label: Status
|
||||
default: 1
|
||||
options:
|
||||
0: Active
|
||||
1: "Active and Inactive"
|
||||
2: Inactive
|
||||
- name: info
|
||||
type: info
|
||||
label: "Hidden categories"
|
||||
default: "For results in the following categories you must edit your profile.<br />- Straight<br />- Bisexual<br />- Scat"
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 62 , cat: XXX , desc: "Amateur"}
|
||||
- {id: 29 , cat: XXX , desc: "Anal"}
|
||||
- {id: 46 , cat: XXX , desc: "Anime Games"}
|
||||
- {id: 30 , cat: XXX , desc: "Asian"}
|
||||
- {id: 43 , cat: XXX , desc: "Bareback"}
|
||||
- {id: 19 , cat: XXX , desc: "BDSM"}
|
||||
- {id: 17 , cat: XXX , desc: "Bears"}
|
||||
- {id: 44 , cat: XXX , desc: "Black"}
|
||||
- {id: 50 , cat: Books , desc: "Books & Magazines"}
|
||||
- {id: 9 , cat: XXX , desc: "Chubbies"}
|
||||
- {id: 7 , cat: XXX , desc: "Clips"}
|
||||
- {id: 48 , cat: Books/Comics , desc: "Comic & Yaoi"}
|
||||
- {id: 5 , cat: XXX , desc: "Daddies / Sons"}
|
||||
- {id: 34 , cat: XXX , desc: "Fetish"}
|
||||
- {id: 27 , cat: XXX , desc: "Grey / Older"}
|
||||
- {id: 32 , cat: XXX , desc: "Group-Sex"}
|
||||
- {id: 63 , cat: XXX , desc: "Homemade"}
|
||||
- {id: 12 , cat: XXX , desc: "Hunks"}
|
||||
- {id: 33 , cat: XXX , desc: "Images"}
|
||||
- {id: 53 , cat: XXX , desc: "Interracial"}
|
||||
- {id: 57 , cat: XXX , desc: "Jocks"}
|
||||
- {id: 35 , cat: XXX , desc: "Latino"}
|
||||
- {id: 36 , cat: XXX , desc: "Mature"}
|
||||
- {id: 58 , cat: PC , desc: "Media Programs"}
|
||||
- {id: 37 , cat: XXX , desc: "Member"}
|
||||
- {id: 54 , cat: XXX , desc: "Middle Eastern"}
|
||||
- {id: 38 , cat: XXX , desc: "Military"}
|
||||
- {id: 39 , cat: XXX , desc: "Oral-Sex"}
|
||||
- {id: 47 , cat: XXX , desc: "Shemale"}
|
||||
- {id: 56 , cat: XXX , desc: "Softcore"}
|
||||
- {id: 40 , cat: XXX , desc: "Solo"}
|
||||
- {id: 45 , cat: Movies , desc: "Themed Movie"}
|
||||
- {id: 1 , cat: TV , desc: "TV / Episodes"}
|
||||
- {id: 41 , cat: XXX , desc: "Twinks"}
|
||||
- {id: 42 , cat: XXX , desc: "Vintage"}
|
||||
- {id: 51 , cat: XXX , desc: "Voyeur"}
|
||||
- {id: 65 , cat: XXX , desc: "Wrestling and Sports"}
|
||||
- {id: 28 , cat: XXX , desc: "Youngblood"}
|
||||
- {id: 62, cat: XXX, desc: "Amateur"}
|
||||
- {id: 29, cat: XXX, desc: "Anal"}
|
||||
- {id: 46, cat: XXX, desc: "Anime Games"}
|
||||
- {id: 30, cat: XXX, desc: "Asian"}
|
||||
- {id: 43, cat: XXX, desc: "Bareback"}
|
||||
- {id: 19, cat: XXX, desc: "BDSM"}
|
||||
- {id: 17, cat: XXX, desc: "Bears"}
|
||||
- {id: 44, cat: XXX, desc: "Black"}
|
||||
- {id: 50, cat: Books, desc: "Books & Magazines"}
|
||||
- {id: 9, cat: XXX, desc: "Chubbies"}
|
||||
- {id: 7, cat: XXX, desc: "Clips"}
|
||||
- {id: 48, cat: Books/Comics, desc: "Comic & Yaoi"}
|
||||
- {id: 5, cat: XXX, desc: "Daddies / Sons"}
|
||||
- {id: 34, cat: XXX, desc: "Fetish"}
|
||||
- {id: 27, cat: XXX, desc: "Grey / Older"}
|
||||
- {id: 32, cat: XXX, desc: "Group-Sex"}
|
||||
- {id: 63, cat: XXX, desc: "Homemade"}
|
||||
- {id: 12, cat: XXX, desc: "Hunks"}
|
||||
- {id: 33, cat: XXX/Imageset, desc: "Images"}
|
||||
- {id: 53, cat: XXX, desc: "Interracial"}
|
||||
- {id: 57, cat: XXX, desc: "Jocks"}
|
||||
- {id: 35, cat: XXX, desc: "Latino"}
|
||||
- {id: 36, cat: XXX, desc: "Mature"}
|
||||
- {id: 58, cat: PC, desc: "Media Programs"}
|
||||
- {id: 37, cat: XXX, desc: "Member"}
|
||||
- {id: 54, cat: XXX, desc: "Middle Eastern"}
|
||||
- {id: 38, cat: XXX, desc: "Military"}
|
||||
- {id: 39, cat: XXX, desc: "Oral-Sex"}
|
||||
- {id: 47, cat: XXX, desc: "Shemale"}
|
||||
- {id: 56, cat: XXX, desc: "Softcore"}
|
||||
- {id: 40, cat: XXX, desc: "Solo"}
|
||||
- {id: 45, cat: Movies, desc: "Themed Movie"}
|
||||
- {id: 1, cat: TV, desc: "TV / Episodes"}
|
||||
- {id: 41, cat: XXX, desc: "Twinks"}
|
||||
- {id: 42, cat: XXX, desc: "Vintage"}
|
||||
- {id: 51, cat: XXX, desc: "Voyeur"}
|
||||
- {id: 65, cat: XXX, desc: "Wrestling and Sports"}
|
||||
- {id: 28, cat: XXX, desc: "Youngblood"}
|
||||
- {id: 59, cat: XXX, desc: "Bisexual"}
|
||||
- {id: 61, cat: XXX, desc: "Straight older"}
|
||||
- {id: 60, cat: XXX, desc: "Straight younger"}
|
||||
- {id: 64, cat: XXX, desc: "Scat"}
|
||||
modes:
|
||||
search: [q]
|
||||
|
||||
@@ -65,7 +93,7 @@
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
incldead: "0" # Searches only for alive torrents
|
||||
incldead: "{{ .Config.incldead }}"
|
||||
rows:
|
||||
selector: table.browse_result > tbody > tr:has(a[href^="details.php?id="])
|
||||
fields:
|
||||
@@ -89,12 +117,12 @@
|
||||
selector: .tfiles
|
||||
filters:
|
||||
- name: regexp
|
||||
args: ([\d]+)
|
||||
args: ([\d,]+)
|
||||
size:
|
||||
selector: .tsize
|
||||
seeders:
|
||||
optional: true
|
||||
selector: a[href$="&toseeders=1"]
|
||||
selector: a[href$="&toseeders=1"], span.red
|
||||
leechers:
|
||||
optional: true
|
||||
selector: a[href$="&todlers=1"]
|
||||
@@ -102,13 +130,13 @@
|
||||
selector: .tadded
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["(\\d{4}-\\d{2}-\\d{2})(\\d{2}:\\d{2}:\\d{2})(.*)","$1 $2"]
|
||||
args: ["(\\d{4}-\\d{2}-\\d{2})(\\d{2}:\\d{2}:\\d{2}).*", "$1 $2"]
|
||||
- name: dateparse
|
||||
args: "2006-01-02 15:04:05"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"td:nth-child(3) > div > nobr > font[color=\"yellow\"]": "0"
|
||||
"*": "1"
|
||||
"td:nth-child(3) > div > nobr > font[color=\"yellow\"]": 0
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": "1"
|
||||
"*": 1
|
@@ -80,3 +80,10 @@
|
||||
selector: td:nth-child(8)
|
||||
date:
|
||||
selector: td:nth-child(4)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"strong.tl_free": "0"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": "1"
|
||||
|
195
src/Jackett.Common/Definitions/girotorrent.yml
Normal file
195
src/Jackett.Common/Definitions/girotorrent.yml
Normal file
@@ -0,0 +1,195 @@
|
||||
---
|
||||
site: girotorrent
|
||||
name: Girotorrent
|
||||
description: "Girotorrent is an ITALIAN Private site for TV / MOVIES / GENERAL"
|
||||
language: it-it
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- http://girotorrent.org/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
# LIBREDICOLA
|
||||
- {id: 13, cat: Books, desc: "Giornali e Riviste"}
|
||||
- {id: 15, cat: Books, desc: "Ebook"}
|
||||
- {id: 16, cat: Books, desc: "Fumetti"}
|
||||
- {id: 70, cat: Books, desc: "Manuali e Guide"}
|
||||
- {id: 72, cat: Audio/Audiobook, desc: "Audiolibri"}
|
||||
# CINEMA
|
||||
- {id: 17, cat: Movies/Other, desc: "Movie Cam-Ts"}
|
||||
- {id: 18, cat: Movies/Other, desc: "Movie Screener"}
|
||||
- {id: 61, cat: Movies/Other, desc: "Movie R5-R6"}
|
||||
- {id: 19, cat: Movies/Other, desc: "Movie DVDRip"}
|
||||
- {id: 20, cat: Movies/Other, desc: "Movie BDRip"}
|
||||
- {id: 60, cat: Movies/Other, desc: "Movie BluRay"}
|
||||
- {id: 63, cat: Movies/Other, desc: "Movie WEBDLRip"}
|
||||
# VIDEOTECA
|
||||
- {id: 22, cat: Movies/SD, desc: "Movie BDRip"}
|
||||
- {id: 23, cat: Movies/SD, desc: "Movie DvdRip"}
|
||||
- {id: 23, cat: Movies/SD, desc: "Movie WEBRip"}
|
||||
- {id: 24, cat: Movies/DVD, desc: "Movie DVD-R 5"}
|
||||
- {id: 25, cat: Movies/DVD, desc: "Movie DVD-R 9"}
|
||||
- {id: 26, cat: Movies/HD, desc: "Movie Blu-Ray HD"}
|
||||
- {id: 27, cat: Movies/3D, desc: "Movie 3D-SBS"}
|
||||
- {id: 96, cat: Movies/HD, desc: "Movie x265 HEVC"}
|
||||
- {id: 28, cat: Movies/Foreign, desc: "Movie Subbet-ita"}
|
||||
- {id: 73, cat: Movies/SD, desc: "Movie MP4"}
|
||||
- {id: 29, cat: Movies/Foreign, desc: "Movie Ligua Originale"}
|
||||
# ANIMAZIONE
|
||||
- {id: 32, cat: TV/Anime, desc: "Anime Disney"}
|
||||
- {id: 33, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 34, cat: TV/Anime, desc: "Anime Altri Cartoni"}
|
||||
# TELEVISIONE
|
||||
- {id: 36, cat: TV, desc: "TV Serie TV"}
|
||||
- {id: 77, cat: TV, desc: "TV Reality"}
|
||||
- {id: 37, cat: TV, desc: "TV Film TV"}
|
||||
- {id: 59, cat: TV, desc: "TV Sport"}
|
||||
- {id: 38, cat: TV, desc: "TV Concerti-Spettacoli"}
|
||||
- {id: 39, cat: TV, desc: "TV Teatro-Cabaret"}
|
||||
- {id: 40, cat: TV/Documentary, desc: "Tv Documentario"}
|
||||
# MUSICA
|
||||
- {id: 42, cat: Audio, desc: "Musica CD Singoli"}
|
||||
- {id: 43, cat: Audio, desc: "Musica Italiana"}
|
||||
- {id: 44, cat: Audio, desc: "Musica Straniera"}
|
||||
- {id: 45, cat: Audio, desc: "Musica Compilation"}
|
||||
- {id: 46, cat: Audio, desc: "Musica Video Clip"}
|
||||
- {id: 58, cat: Audio, desc: "Musica Discografie"}
|
||||
# SALA GIOCHI
|
||||
- {id: 47, cat: PC/Games, desc: "PC Games"}
|
||||
- {id: 48, cat: PC/Games, desc: "PC Giochi PS2-PS3"}
|
||||
- {id: 49, cat: PC/Games, desc: "PC Giochi Nintendo Wii"}
|
||||
- {id: 50, cat: PC/Games, desc: "PC Giochi Xbox"}
|
||||
- {id: 52, cat: PC/Games, desc: "PC Giochi DS-DS3"}
|
||||
# SOFTWARE
|
||||
- {id: 54, cat: PC, desc: "PC Programmi Windows"}
|
||||
- {id: 55, cat: PC/Mac, desc: "PC Mac"}
|
||||
- {id: 69, cat: PC, desc: "PC Portable"}
|
||||
- {id: 56, cat: PC, desc: "PC Linux"}
|
||||
# CELLULARI-PALMARI
|
||||
- {id: 71, cat: PC/Phone-Android, desc: "Android APP"}
|
||||
- {id: 74, cat: Other, desc: "Varie"}
|
||||
- {id: 75, cat: Other, desc: "Immagini Wallpaper"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
login:
|
||||
path: /index.php?page=login
|
||||
method: post
|
||||
inputs:
|
||||
uid: "{{ .Config.username }}"
|
||||
pwd: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: div.error
|
||||
test:
|
||||
path: /index.php
|
||||
selector: a[href="logout.php"]
|
||||
|
||||
download:
|
||||
before:
|
||||
path: "thanks.php"
|
||||
method: "post"
|
||||
inputs:
|
||||
infohash: "{{ .DownloadUri.Query.id }}"
|
||||
thanks: "1"
|
||||
rndval: "1487013827343"
|
||||
selector: a[href^="download.php?id="]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /index.php
|
||||
inputs:
|
||||
search: "{{ .Keywords }}"
|
||||
category: "{{range .Categories}}{{.}};{{end}}"
|
||||
page: "torrents"
|
||||
active: 0
|
||||
keywordsfilters:
|
||||
- name: diacritics
|
||||
args: replace
|
||||
- name: re_replace # S01 to 1
|
||||
args: ["(?i)\\bS0*(\\d+)\\b", "$1"]
|
||||
- name: re_replace # S01E01 to 1 1
|
||||
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "$1 $2"]
|
||||
rows:
|
||||
selector: div.b-content > table > tbody > tr > td > table.lista > tbody > tr:has(a[href^="index.php?page=torrent-details&id="])
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
download:
|
||||
selector: a[href^="index.php?page=downloadcheck&id="]
|
||||
attribute: href
|
||||
title:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
filters:
|
||||
- name: re_replace # replace special characters with " " (space)
|
||||
args: ["[^a-zA-Z0-9\\s]|\\.", " "]
|
||||
- name: re_replace # replace multiple spaces
|
||||
args: ["[ ]{2,}", " "]
|
||||
# normalize to SXXEYY format
|
||||
- name: re_replace # S01 E01 to S01E01
|
||||
args: ["(?i)\\bS(\\d+)\\sE(\\d+)\\b", "S$1E$2"]
|
||||
- name: re_replace # 01x01 to S01E01
|
||||
args: ["(?i)(\\d{2})x(\\d+)", "S$1E$2"]
|
||||
- name: re_replace # 1x01 to S01E01
|
||||
args: ["(?i)\\b(\\d{1})x(\\d+)", "S0$1E$2"]
|
||||
- name: re_replace # Stagione X --> S0X
|
||||
args: ["(?i)\\bStagion[ei]\\s?(\\d{1})\\b|\\bSeason'?s?\\s?(\\d{1})\\b", "S0$1$2"]
|
||||
- name: re_replace # Stagione XX --> SXX
|
||||
args: ["(?i)\\bStagion[ei]\\s?(\\d{2,})\\b|\\bSeason'?s?\\s?(\\d{2,})\\b", "S$1$2"]
|
||||
- name: re_replace # Episodio 4 to E4
|
||||
args: ["(?i)\\b(?:[\\/\\|]?Episodio\\s?(\\d+)|Puntata\\s?(\\d+))", "E$1$2"]
|
||||
- name: re_replace # Episodi 4 5 to E04-05
|
||||
args: ["(?i)\\b(?:Puntate\\s*)(\\d+)\\s?(\\d+)", "E0$1-0$2"]
|
||||
- name: re_replace # rimozioni varie
|
||||
args: ["(?i)(Serie completa|Completat?a?|in pausa)", ""]
|
||||
category:
|
||||
selector: a[href^="index.php?page=torrents&category="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
args: category
|
||||
details:
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
attribute: href
|
||||
banner:
|
||||
optional: true
|
||||
selector: a[onmouseover][href^="index.php?page=torrent-details&id="]
|
||||
attribute: onmouseover
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "src=(.+?) "
|
||||
size:
|
||||
selector: td:nth-last-child(3)
|
||||
date:
|
||||
selector: td:nth-last-child(8)
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "02/01/2006"
|
||||
grabs:
|
||||
selector: td:nth-last-child(5)
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["---", "0"]
|
||||
seeders:
|
||||
selector: td:nth-last-child(7)
|
||||
leechers:
|
||||
selector: td:nth-last-child(6)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[alt="Free Leech"]: "0"
|
||||
img[alt="Gold 100% Free"]: "0"
|
||||
img[alt="Silver 50% Free"]: "0.5"
|
||||
img[alt="Bronze 25% Free"]: "0.75"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
||||
uploadvolumefactor:
|
||||
optional: true
|
||||
selector: img[alt$="x Upload Multiplier"]
|
||||
attribute: alt
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["x Upload Multiplier", ""]
|
@@ -5,11 +5,20 @@
|
||||
language: fr-fr
|
||||
type: public
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- http://www.gktorrent.net/
|
||||
- https://www.gktorrent.me/
|
||||
legacylinks:
|
||||
- https://www.gktorrent.com/ # they're forcing http
|
||||
- https://www.gktorrent.org/
|
||||
- https://www.gktorrent.com/
|
||||
- http://www.gktorrent.com/
|
||||
- http://ww1.gktorrent.com/
|
||||
- http://ww2.gktorrent.com/
|
||||
- https://ww2.gktorrent.com/
|
||||
- https://ww3.gktorrent.com/
|
||||
- http://www.gktorrent.net/
|
||||
- https://www.gktorrent.net/
|
||||
- https://ww4.gktorrent.com/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
|
115
src/Jackett.Common/Definitions/hd4free.yml
Normal file
115
src/Jackett.Common/Definitions/hd4free.yml
Normal file
@@ -0,0 +1,115 @@
|
||||
---
|
||||
site: hd4free
|
||||
name: hd4free
|
||||
description: "General Tracker Movies/TV/Apps/Games/Music/Books"
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://hd4.xyz/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Movies"}
|
||||
- {id: 2, cat: TV, desc: "TV"}
|
||||
- {id: 3, cat: Audio, desc: "Music"}
|
||||
- {id: 4, cat: Books, desc: "Books"}
|
||||
- {id: 5, cat: PC/Mac, desc: "Apps"}
|
||||
- {id: 6, cat: Other, desc: "Other"}
|
||||
- {id: 7, cat: PC/Games, desc: "Games"}
|
||||
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
login:
|
||||
path: /login
|
||||
method: form
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: table.main:contains("Login Failed!")
|
||||
test:
|
||||
path: /torrents
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /filterTorrents
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}categories[]={{.}}&{{end}}"
|
||||
search: "{{if .Query.IMDBID}}{{else}}{{ .Keywords }}{{end}}"
|
||||
uploader: ""
|
||||
imdb: "{{ .Query.IMDBIDShort }}"
|
||||
tvdb: ""
|
||||
tmdb: ""
|
||||
mal: ""
|
||||
sorting: created_at
|
||||
direction: desc
|
||||
qty: 100
|
||||
rows:
|
||||
selector: table > tbody > tr
|
||||
fields:
|
||||
category:
|
||||
selector: a[href*="/categories/"]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "/categories/.*?\\.(\\d+)"
|
||||
title:
|
||||
selector: a.view-torrent
|
||||
download:
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
details:
|
||||
selector: a.view-torrent
|
||||
attribute: href
|
||||
size:
|
||||
selector: td:nth-child(5)
|
||||
seeders:
|
||||
selector: td:nth-child(7)
|
||||
leechers:
|
||||
selector: td:nth-child(8)
|
||||
grabs:
|
||||
selector: td:nth-child(6)
|
||||
filters:
|
||||
- name: regexp
|
||||
args: ([\d\.]+)
|
||||
date:
|
||||
selector: time
|
||||
filters:
|
||||
# translations for Turkish|Estonian|Danish|Italian|Polish|Norwegian|Portoguese|Czech|Russian|Romanian|Spanish|French|German|Bulgarian|Dutch
|
||||
- name: re_replace
|
||||
args: ["(önce|tagasi|geleden|fa|temu|siden|atrás|nazpět|назад|acum|hace|il y a|vor|преди)", "ago"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minut|minuto|minuta|minutt|минута|Minute|minuut)", "minute"]
|
||||
- name: re_replace
|
||||
args: ["(dakika|minutit|minutter|minuti|minuty|minutos|минуты|минут|Minuten|минути|minuten)", "minutes"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tund|time|ora|godzina|hora|hodina|час|oră|heure|Stunde|uur)", "hour"]
|
||||
- name: re_replace
|
||||
args: ["(saat|tundi|timer|ore|godziny|horas|hodiny|hoden|часа|часов|ore|heures|Stunden)", "hours"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päev|dag|giorno|dzień|dia|den|день|zi|día|jour|Tag|ден)", "day"]
|
||||
- name: re_replace
|
||||
args: ["(gün|päeva|dage|giorni|dni|dias|dny|дня|дней|zile|días|jours|Tagen|дни|dagen)", "days"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädal|uge|settimana|tydzień|uke|semana|týden|неделю|săptămână|semaine|Woche|седмица)", "week"]
|
||||
- name: re_replace
|
||||
args: ["(hafta|nädalat|uger|settimane|tygodnie|uker|semanas|týdny|недели|недель|săptămâni|semaines|Wochen|седмици|weken)", "weeks"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuu|måned|mese|miesiąc|mês|měsíc|месяц|lună|mes|mois|Monat|месец|maand)", "month"]
|
||||
- name: re_replace
|
||||
args: ["(ay|kuud|måneder|mesi|miesiące|meses|měsíce|месяца|месяцев|luni|meses|mois|Monaten|месеца|maanden)", "months"]
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"100% Free\"]": "0"
|
||||
"i[data-original-title=\"Global FreeLeech\"]": "0"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"i[data-original-title=\"Double upload\"]": "2"
|
||||
"i[data-original-title=\"Double Upload\"]": "2" # Global Double Upload
|
||||
"*": "1"
|
@@ -33,9 +33,6 @@
|
||||
- selector: table.main:contains("Login Failed!")
|
||||
test:
|
||||
path: my.php
|
||||
|
||||
download:
|
||||
selector: a[href^="/download.php"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user