Compare commits
2063 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
81875fae10 | ||
|
509af62586 | ||
|
c331ef9aaf | ||
|
03118b9918 | ||
|
c208ad9357 | ||
|
bd506f6831 | ||
|
21f703b5a9 | ||
|
ff3f6ddb90 | ||
|
deac75af89 | ||
|
a0ff530318 | ||
|
2e8d2b1e16 | ||
|
911a6a3145 | ||
|
104b8c340c | ||
|
3e491c17f4 | ||
|
1f5d4b0830 | ||
|
2ac5f94594 | ||
|
2270fe4953 | ||
|
f11dbb1b28 | ||
|
1e0405a91e | ||
|
5028c7aa0a | ||
|
10637efee3 | ||
|
e87e7d1d3a | ||
|
3575d1d185 | ||
|
a4e8beabdf | ||
|
4f2a43365b | ||
|
33c596189d | ||
|
07b950cf65 | ||
|
c2d740ef44 | ||
|
93166171db | ||
|
0116d87445 | ||
|
66b3b20bf4 | ||
|
8ff2a89cac | ||
|
f9d27e3bae | ||
|
8044bc8cb1 | ||
|
1347cd7bfa | ||
|
1e5ac9b3fc | ||
|
7831afa29a | ||
|
434e8dc3f4 | ||
|
67df02fe4c | ||
|
ceea867c69 | ||
|
c64bdb42c8 | ||
|
55c0a49911 | ||
|
5457855aa1 | ||
|
cc6fa1d8d0 | ||
|
16a413aa9f | ||
|
a259a4f868 | ||
|
877ed4698e | ||
|
dd2c648a78 | ||
|
5bd2ef1edc | ||
|
49634a4e58 | ||
|
2828b09d54 | ||
|
7a1900d814 | ||
|
3cf88d98b2 | ||
|
dee77c7597 | ||
|
aec2e3b7bf | ||
|
4bb1873f7b | ||
|
36be6e3980 | ||
|
f7f67023f4 | ||
|
8739acdccd | ||
|
8a1f0aad1d | ||
|
2ea85a741a | ||
|
d035fc804d | ||
|
9d0b565155 | ||
|
563e0216cc | ||
|
470debb945 | ||
|
64454a8b23 | ||
|
69967f6dd9 | ||
|
f831794a55 | ||
|
5970ee397b | ||
|
2f3582d952 | ||
|
7c0e4b73db | ||
|
bd7c07ff22 | ||
|
7b07869d68 | ||
|
bb0a82acbc | ||
|
6b11b3593f | ||
|
d8ef9943d9 | ||
|
ac019d6eff | ||
|
e137bb67e9 | ||
|
b0ef54a6e0 | ||
|
5234e0bb8e | ||
|
a77168c745 | ||
|
f51be6538b | ||
|
090a2a6c76 | ||
|
5cbc70cd6f | ||
|
fd201207b4 | ||
|
41445b191d | ||
|
16309a1fbc | ||
|
c65a3d4140 | ||
|
593515cac6 | ||
|
d9249d85e2 | ||
|
1a782e468d | ||
|
9c79bf2368 | ||
|
ebed27a0bd | ||
|
51da8020ee | ||
|
c3f7b17ef3 | ||
|
da091b9142 | ||
|
186af54185 | ||
|
6b01e6afae | ||
|
a69bf2c6dd | ||
|
5c9e842244 | ||
|
e3a9919af1 | ||
|
20414b9ef1 | ||
|
5ee8270f47 | ||
|
47cbd520d0 | ||
|
9ddff8f245 | ||
|
98d392d473 | ||
|
c971c5c9bc | ||
|
c5eb4bc068 | ||
|
c838a33deb | ||
|
810114613b | ||
|
dd6ff1ca92 | ||
|
cb79429f27 | ||
|
9af19a9b74 | ||
|
f17cb126fa | ||
|
157f29b858 | ||
|
b70bce0d7b | ||
|
ac08a2cfaf | ||
|
7adbfe143d | ||
|
6a295d46b8 | ||
|
9d3007194e | ||
|
11278542d1 | ||
|
7b43f64e87 | ||
|
4bf83d4411 | ||
|
8f3ae2b376 | ||
|
13a113f717 | ||
|
2499c7a712 | ||
|
bde68d8e30 | ||
|
0d0aee916e | ||
|
bfcb420524 | ||
|
55cd332861 | ||
|
a07be6e3bd | ||
|
ce7e84ec61 | ||
|
db6bf4c6b4 | ||
|
10738f5b7b | ||
|
30e35574a1 | ||
|
592bce02bf | ||
|
fa22327719 | ||
|
238e1670fc | ||
|
7760a1d7cb | ||
|
1e52ff598b | ||
|
dda1fe6bbb | ||
|
454e5d7ea8 | ||
|
b64faff248 | ||
|
0ba7833804 | ||
|
33d99a0148 | ||
|
040160564f | ||
|
41d21477fd | ||
|
1532b3e58f | ||
|
fc95d844f3 | ||
|
7a2b319830 | ||
|
fcdd966619 | ||
|
18c0623649 | ||
|
b20a4f012d | ||
|
8b6e3e5edb | ||
|
6df78d125c | ||
|
b01c005596 | ||
|
dbc0d0d65f | ||
|
162dbf74e0 | ||
|
4850354630 | ||
|
26bde30e95 | ||
|
39d7151da4 | ||
|
8be62bb811 | ||
|
7b3a7dba1d | ||
|
24abe9c53c | ||
|
e95f12e91e | ||
|
9bc54336c2 | ||
|
d5eb3c510e | ||
|
01af3d1c52 | ||
|
6faa6d749a | ||
|
2bfbbd4a47 | ||
|
67bf364b04 | ||
|
d4b107a07f | ||
|
fce63f1c35 | ||
|
7cf64f7893 | ||
|
99de55778d | ||
|
68c3e64a7c | ||
|
b69147fb8d | ||
|
122172a329 | ||
|
f969236d93 | ||
|
1fabc48169 | ||
|
d19249757e | ||
|
6a199aa581 | ||
|
7862d37279 | ||
|
65c1e58f77 | ||
|
2dcdbbd34e | ||
|
e8d2b6d707 | ||
|
fd976a5dce | ||
|
3e1fbdf298 | ||
|
5a3e464c23 | ||
|
9eb9ce44d7 | ||
|
a98f8a1de6 | ||
|
60450b5165 | ||
|
cccf70f7c2 | ||
|
3bf3e0baa3 | ||
|
34f1052450 | ||
|
d358115298 | ||
|
ca5164c3a3 | ||
|
56b15a8eb8 | ||
|
c7ba2e1ec5 | ||
|
404bc34aef | ||
|
4c4b3bae53 | ||
|
f18e867352 | ||
|
43c9997f07 | ||
|
eb0d8bfa76 | ||
|
d76984517c | ||
|
e5778ba01c | ||
|
c684680360 | ||
|
4bf3ba57be | ||
|
5512d1956d | ||
|
3c2d488ae7 | ||
|
9ecdf6a4fa | ||
|
a87d5829f3 | ||
|
4c23b45375 | ||
|
b1870d40e8 | ||
|
5d0454f96e | ||
|
729adf7e71 | ||
|
e422b4908e | ||
|
e57012679e | ||
|
52553f323b | ||
|
1680c43c3e | ||
|
b51ca53d4b | ||
|
cbdc5a11e5 | ||
|
ee3de983ab | ||
|
78156484bf | ||
|
f299427ad1 | ||
|
f0ef11bcf5 | ||
|
5625e13ef1 | ||
|
e6b6e8eafc | ||
|
c1db8d6409 | ||
|
10942aa8ae | ||
|
52b11b092c | ||
|
7f593bfe31 | ||
|
a743f84529 | ||
|
7674feaf61 | ||
|
a4960f89ac | ||
|
08a76445ae | ||
|
affc0396f1 | ||
|
b5886882ee | ||
|
86bb8458b8 | ||
|
705477a011 | ||
|
9187691b3e | ||
|
316b161671 | ||
|
fcd3a7f204 | ||
|
a75ead776f | ||
|
ac46e6dfcb | ||
|
6eded85bcd | ||
|
d216cf612f | ||
|
9d5088adf0 | ||
|
41cff23878 | ||
|
c982079363 | ||
|
5d9ad372f9 | ||
|
6e5b2fb776 | ||
|
993e65483d | ||
|
3dde957d39 | ||
|
c4a2649267 | ||
|
7b1bdf405c | ||
|
5cbe9eba94 | ||
|
2b3b0eb6c2 | ||
|
b5b2e81d3b | ||
|
f0d1fe9b84 | ||
|
658a300d63 | ||
|
6e3177ea31 | ||
|
362346e69d | ||
|
00fe51f005 | ||
|
55959257d9 | ||
|
4d93834e28 | ||
|
5a3e2f235b | ||
|
b386f5285a | ||
|
592b2ccc77 | ||
|
5a7eb090e2 | ||
|
5c22eafa31 | ||
|
0aad7c8f0e | ||
|
a8aa6d4331 | ||
|
1ed490786e | ||
|
fc2637be6b | ||
|
6f0d97858a | ||
|
eeaed09f51 | ||
|
43ba0db577 | ||
|
c0b0d87ff4 | ||
|
4299d4d7cc | ||
|
4b6db8bb1b | ||
|
7435dfd0ff | ||
|
4213d169bf | ||
|
f315f05073 | ||
|
e353b82ab5 | ||
|
cf02ac04c8 | ||
|
f549a3735d | ||
|
95d9cbd65d | ||
|
1617a7c5be | ||
|
21da37712b | ||
|
c83ecb9527 | ||
|
d10e963845 | ||
|
b44bc01644 | ||
|
793bbfac53 | ||
|
b1da175ea7 | ||
|
02ec6b03c6 | ||
|
6905dd36bd | ||
|
1c3c6599fe | ||
|
60d151b976 | ||
|
78e56ecf88 | ||
|
669efe4d8c | ||
|
34ae762e5a | ||
|
c06bd30fed | ||
|
ef70e3938b | ||
|
7ae0625ae3 | ||
|
031df3195c | ||
|
acb9fb270e | ||
|
0af3e7a7c6 | ||
|
5fe58be79e | ||
|
f6995ba239 | ||
|
90470cbaf9 | ||
|
cffade5cfc | ||
|
5017fb16b9 | ||
|
0c5ecb549d | ||
|
c2665ae528 | ||
|
2ca5f25dff | ||
|
d75175848f | ||
|
bf5de0a81d | ||
|
730c3c3cc8 | ||
|
d0564ec946 | ||
|
d12fc09cae | ||
|
6b777ff8c2 | ||
|
4d00bd9e94 | ||
|
37bc68c91a | ||
|
4408940a3d | ||
|
c33cf5f81a | ||
|
db9f76eb5c | ||
|
634eb72760 | ||
|
5cbb785529 | ||
|
5b0c480df7 | ||
|
74b6a15a75 | ||
|
d8626bd790 | ||
|
b90777b550 | ||
|
872d76e9c4 | ||
|
51f4904431 | ||
|
66c9095ba9 | ||
|
5415707721 | ||
|
4be05fe85e | ||
|
83373cf1c8 | ||
|
63ec96dde3 | ||
|
4b27f9c844 | ||
|
d5f0bf6928 | ||
|
a426823aee | ||
|
c0774a7bde | ||
|
f35663f0aa | ||
|
fc4fe6ea58 | ||
|
e75333e29d | ||
|
816f760dad | ||
|
f077aedde0 | ||
|
8cef08cc81 | ||
|
03d14ed434 | ||
|
a2e1b4bb68 | ||
|
4cea3c1095 | ||
|
46e2760f0e | ||
|
bb3bc5cac4 | ||
|
c9b4c1d285 | ||
|
c9c321c435 | ||
|
84bd141025 | ||
|
6b276a8c4e | ||
|
7008873277 | ||
|
6a361b80aa | ||
|
6a08924dd1 | ||
|
ec2e0af7db | ||
|
fd1c48b710 | ||
|
d0c14824e1 | ||
|
0548a05f86 | ||
|
921d5a0c5f | ||
|
7ebd9eb75c | ||
|
50ab349d1b | ||
|
e04055e67f | ||
|
6c0b2d8b82 | ||
|
43088d3d1d | ||
|
45bd02ecb7 | ||
|
d07fd0a327 | ||
|
a634e0dfaa | ||
|
c24104008a | ||
|
98fe68e2d3 | ||
|
7344c323ee | ||
|
3aa564cdec | ||
|
077a9cd675 | ||
|
d478bf5362 | ||
|
5630258d9a | ||
|
433434f4b7 | ||
|
890aaaabc9 | ||
|
9aa94a4d22 | ||
|
7df8f68621 | ||
|
0adbf9f215 | ||
|
8778d225ac | ||
|
4df91097fa | ||
|
48feef88ff | ||
|
33dbaddcd9 | ||
|
3145b6050e | ||
|
6be1ad1612 | ||
|
b01e383e43 | ||
|
93db1347cb | ||
|
ddc5b44557 | ||
|
9405297662 | ||
|
307256d96e | ||
|
99577938f6 | ||
|
cb2e97fdec | ||
|
9b76fd54c6 | ||
|
f114a70191 | ||
|
cca40f287c | ||
|
c661b0f473 | ||
|
b4394513ca | ||
|
fa849e55de | ||
|
9b72d7f3db | ||
|
c3a219e340 | ||
|
4e62413e11 | ||
|
d12aa8da21 | ||
|
372da249af | ||
|
17597cd2cc | ||
|
f572fdd39e | ||
|
3d4b710492 | ||
|
0886999055 | ||
|
882535b130 | ||
|
2f1a6af0ba | ||
|
1855f40f9d | ||
|
0a6e48a953 | ||
|
393292f872 | ||
|
e049dd6d45 | ||
|
721e576779 | ||
|
5197df18e1 | ||
|
3059dd1fb8 | ||
|
b770b89d73 | ||
|
2e1781a2eb | ||
|
5f0eb25f5c | ||
|
59abc641d6 | ||
|
98533c3ee8 | ||
|
1b7169edd4 | ||
|
78c4dff40b | ||
|
ab3e147bbf | ||
|
2ccce60189 | ||
|
8374d032b3 | ||
|
84fcedc203 | ||
|
225bff59b6 | ||
|
fbe1348e15 | ||
|
d7baf5492f | ||
|
c3b45a7915 | ||
|
8c3531e6d2 | ||
|
1adaca1ea1 | ||
|
84d5584150 | ||
|
de586e0024 | ||
|
4d4fac2a8f | ||
|
8cd2c59ca1 | ||
|
87352b8b42 | ||
|
699f9ff397 | ||
|
8409c3e7d8 | ||
|
b7a9c6254e | ||
|
8ae0fce366 | ||
|
ab9e9ae8d4 | ||
|
859b99fd60 | ||
|
8f702a2a55 | ||
|
0625fcc5ef | ||
|
73161151fe | ||
|
6f353b331f | ||
|
6c8ab2b31b | ||
|
3566d0f032 | ||
|
bcff66d14f | ||
|
815e4639a1 | ||
|
daffef71c8 | ||
|
0a9aa6a5e6 | ||
|
e07774c09b | ||
|
4c79f1f362 | ||
|
4bfbfc40f1 | ||
|
a963c0564f | ||
|
f721c08dc9 | ||
|
e62bb9c04e | ||
|
5f7df3accb | ||
|
2fc30acbc5 | ||
|
83c6e17970 | ||
|
cca50c3592 | ||
|
1b7074f693 | ||
|
1647aa3c73 | ||
|
234f22117f | ||
|
55995c797c | ||
|
43e9a093c4 | ||
|
eed50706d9 | ||
|
06476b9a61 | ||
|
083e19d631 | ||
|
57f3512b79 | ||
|
9dd88b10ef | ||
|
04fc73326b | ||
|
97e6d3eda8 | ||
|
b5a1d12f1c | ||
|
ac6f31fa22 | ||
|
0e1d652c5e | ||
|
c832b46e4f | ||
|
ba438faaa2 | ||
|
d711acb52d | ||
|
d9212737e5 | ||
|
807a591504 | ||
|
9dc1f14ccb | ||
|
a4d5cc1af6 | ||
|
2233636681 | ||
|
fe3b8a108e | ||
|
92e154fa64 | ||
|
f5a18b8d95 | ||
|
e08692fcd3 | ||
|
1e0a64d460 | ||
|
261a89cab0 | ||
|
29547b52e1 | ||
|
26a50993b9 | ||
|
b99752c4cd | ||
|
9c6de84752 | ||
|
a58845ed9e | ||
|
ced9816398 | ||
|
613cd6bae8 | ||
|
00131b052f | ||
|
d042e5cd33 | ||
|
c1b676bb91 | ||
|
45cbbea78c | ||
|
97b2a09145 | ||
|
1c7f57467f | ||
|
77d8044f52 | ||
|
8194e64593 | ||
|
c47aeece43 | ||
|
5c442f185b | ||
|
a94337342b | ||
|
b6e0123b4a | ||
|
4ed0244763 | ||
|
fabc48c7da | ||
|
061d01cbd5 | ||
|
4841d9336a | ||
|
a3814cdf71 | ||
|
947ccf7021 | ||
|
45a50edc41 | ||
|
3969db61b0 | ||
|
e76c31c9c6 | ||
|
5a7b774598 | ||
|
bd3e8de2d7 | ||
|
a8d59c1479 | ||
|
d6b3304c01 | ||
|
6567f99c74 | ||
|
4baac6eae2 | ||
|
90aea4ca93 | ||
|
6bfb3a3c9d | ||
|
3a41b52c1d | ||
|
e5024c4c19 | ||
|
855486073f | ||
|
3207ac75cd | ||
|
1d6b8a4c09 | ||
|
d1fdbd9f25 | ||
|
56abf95c5b | ||
|
8873735d7f | ||
|
79393c48d0 | ||
|
0bb9d6c196 | ||
|
3451efe132 | ||
|
c8a9c05d3e | ||
|
9d132bee3a | ||
|
29c4c5a833 | ||
|
9f38f64c3d | ||
|
422ce9dd3b | ||
|
08164f43f1 | ||
|
e4995314f0 | ||
|
6ac7642c33 | ||
|
fcb601e369 | ||
|
048848b2b5 | ||
|
d1382cbabf | ||
|
779bce7cc8 | ||
|
c624c36f31 | ||
|
f6c4d2b1d8 | ||
|
8dbb2f3a1b | ||
|
e5ac7d23a3 | ||
|
1d21f524f1 | ||
|
6d3966dd8a | ||
|
f24373d7f8 | ||
|
2032b27ad0 | ||
|
3ee38e6abe | ||
|
14b6a72105 | ||
|
643afe09e8 | ||
|
6c674537bb | ||
|
07ea4d2519 | ||
|
e4967e5045 | ||
|
6c6722ae88 | ||
|
dc8b39dc40 | ||
|
e1c2770a76 | ||
|
38c37296af | ||
|
6741560f1a | ||
|
263e326281 | ||
|
0c9152fff3 | ||
|
dc39cf8bac | ||
|
e8343cc0a1 | ||
|
ba948d99dd | ||
|
f6bc06b647 | ||
|
d3c769b748 | ||
|
620fece123 | ||
|
83d0a98979 | ||
|
30c42b8ea3 | ||
|
d05b07fee3 | ||
|
f7f963bbdc | ||
|
f9e907e3ce | ||
|
aa6df37801 | ||
|
0f333bd261 | ||
|
b4012039c2 | ||
|
d221c76e32 | ||
|
d3c830d69f | ||
|
594c5dad1c | ||
|
bb0fa69985 | ||
|
260aa7694b | ||
|
16098c0e96 | ||
|
6196bcd311 | ||
|
8f0ae3b36a | ||
|
c84ac43185 | ||
|
dc59594c76 | ||
|
b418212408 | ||
|
f2ec732bf0 | ||
|
41e27cc546 | ||
|
1503d81317 | ||
|
14b00f1b0a | ||
|
f05d3b0248 | ||
|
b31c4a024d | ||
|
ec3fa1002b | ||
|
b10ee7a98f | ||
|
a109798803 | ||
|
88e39fa991 | ||
|
41cb105b2a | ||
|
98bd74372f | ||
|
12d52dfd3c | ||
|
b08373a72f | ||
|
8cd71ce864 | ||
|
8d4cf1c96d | ||
|
f0ab95c987 | ||
|
fc83727408 | ||
|
20d2443468 | ||
|
77170a9a7b | ||
|
d7428be2ec | ||
|
afe0553935 | ||
|
689b3439f7 | ||
|
300f2c2457 | ||
|
f7cef44b06 | ||
|
6eb51a2d63 | ||
|
1715237529 | ||
|
fd3dcedb4a | ||
|
8b62d3319c | ||
|
61c550165d | ||
|
20ef52de57 | ||
|
c6597b27c9 | ||
|
34f46007bd | ||
|
f583a3eeae | ||
|
5b9d4ca814 | ||
|
43043d48e4 | ||
|
1485d4509e | ||
|
4f168dca46 | ||
|
72ae09461d | ||
|
720e6c3e77 | ||
|
0c056b3833 | ||
|
b2b19cd159 | ||
|
e16844294b | ||
|
1b47fcf2a9 | ||
|
9d00d50313 | ||
|
fbe1688b2a | ||
|
bac9eaaeae | ||
|
68ec5f7db5 | ||
|
ac16d67609 | ||
|
728a875eed | ||
|
3c83dde059 | ||
|
159e3674e5 | ||
|
fd487a9824 | ||
|
a34485225f | ||
|
f15533d256 | ||
|
f77fb660bf | ||
|
8bccf1d077 | ||
|
b467e5b324 | ||
|
04376dd3a1 | ||
|
af1fab30ed | ||
|
3b64697b4a | ||
|
11e2724afa | ||
|
4bdd9e1065 | ||
|
c7c8eacb0c | ||
|
319f917071 | ||
|
a89140435b | ||
|
1c158eade7 | ||
|
ee634c4b50 | ||
|
2b3d37a68a | ||
|
c87253a06b | ||
|
3a3f577a99 | ||
|
438ab94309 | ||
|
3ab90f64b7 | ||
|
2b4c9472e6 | ||
|
3e5ac1e267 | ||
|
18bcc3032a | ||
|
76e2eecaec | ||
|
b6e308351f | ||
|
4777da48e6 | ||
|
f905434b0b | ||
|
860a5d21d8 | ||
|
9a770329db | ||
|
792a7d7e6a | ||
|
63267cd225 | ||
|
cb58e31089 | ||
|
dd46f6d483 | ||
|
679f764cba | ||
|
113ffa2d80 | ||
|
13997d57a9 | ||
|
45965c4ae0 | ||
|
c62d99aab9 | ||
|
6d9eaceef7 | ||
|
4208221d15 | ||
|
80c525c042 | ||
|
76e87508bd | ||
|
445b0af4b5 | ||
|
e8d0fab463 | ||
|
dd7873fd41 | ||
|
03acf8f92c | ||
|
50901948e0 | ||
|
70989202d1 | ||
|
0f0c73de0f | ||
|
b978a3d468 | ||
|
1e7438da23 | ||
|
d920f73943 | ||
|
8b0383dd20 | ||
|
7c1ef85bb8 | ||
|
0b3307ce1f | ||
|
96bd34f07f | ||
|
55e94adb2b | ||
|
3ac70a3a3c | ||
|
cbab3f2825 | ||
|
ddc8c42746 | ||
|
4a50687e79 | ||
|
6d635a96d5 | ||
|
5d13d75ce7 | ||
|
c10d13c45e | ||
|
406ff39ef8 | ||
|
333d447c6b | ||
|
18729edd1e | ||
|
0e89de2066 | ||
|
4515ac95fb | ||
|
6b002e3d4c | ||
|
9beab1d2e7 | ||
|
858edb065b | ||
|
0dbfb5c44f | ||
|
82779b286e | ||
|
11d867eccf | ||
|
6b484d383c | ||
|
74497bebf1 | ||
|
33ac6d26cf | ||
|
cd045a34b8 | ||
|
0d2f02e3fb | ||
|
9eadd28df1 | ||
|
3ec81ba085 | ||
|
9bbf698b6a | ||
|
b7ed2960c1 | ||
|
796ed558f7 | ||
|
1431d44b52 | ||
|
6076e277c8 | ||
|
c80ad85214 | ||
|
ad6a14fa50 | ||
|
d871e271ef | ||
|
2c99f9857d | ||
|
369f303926 | ||
|
cc1c8d594a | ||
|
1fddf4270b | ||
|
9c2cd82562 | ||
|
f9c2bccc3a | ||
|
d6570cbc41 | ||
|
54b9d7ec5e | ||
|
109c4f84d5 | ||
|
1eec097b80 | ||
|
effed56169 | ||
|
f7a441566e | ||
|
f156fbceae | ||
|
a33512953d | ||
|
9466e4fa70 | ||
|
16eace63e7 | ||
|
871d5353a5 | ||
|
0bd82e7069 | ||
|
a6caea05f2 | ||
|
f7d6891457 | ||
|
c16d48d2fe | ||
|
4378ff7add | ||
|
faffbfea51 | ||
|
f456d64afb | ||
|
334e6f0b50 | ||
|
e2a526ef81 | ||
|
677e06807a | ||
|
72515b0734 | ||
|
deb071a269 | ||
|
0f7ff60a81 | ||
|
80f3c5c921 | ||
|
031f91dfc0 | ||
|
196e17bfd6 | ||
|
76dc60ca41 | ||
|
7798e710c1 | ||
|
0ffe0ecd4b | ||
|
78f115b181 | ||
|
04edc3a185 | ||
|
b9a87df343 | ||
|
76a997049b | ||
|
33e5f791c7 | ||
|
c073d18133 | ||
|
361a37332a | ||
|
ee1da31da0 | ||
|
dc1e4b4bc7 | ||
|
6432efcf34 | ||
|
12dd5d824b | ||
|
56ca7ab281 | ||
|
f48e77da6c | ||
|
ef09dd0f60 | ||
|
f1b1e96df3 | ||
|
9bc9f2d3d7 | ||
|
dc03d9ea00 | ||
|
fd62520355 | ||
|
932166b3da | ||
|
6e5d69affb | ||
|
8ed6561c41 | ||
|
c53dede0db | ||
|
e2be5dc17d | ||
|
fb6fdafc9e | ||
|
d86c323ca9 | ||
|
0ca49ad645 | ||
|
eb1ba5933f | ||
|
7b85bbdafd | ||
|
16cd2d0c0f | ||
|
e3c00a8092 | ||
|
8a4453b0f5 | ||
|
e5ce7b9fb2 | ||
|
b21ea0d28d | ||
|
3d2d608477 | ||
|
bdafa8dfbd | ||
|
5c4b84f826 | ||
|
5ec25e56d9 | ||
|
23de56b8e7 | ||
|
3b0ce8aa3b | ||
|
bbc676f55e | ||
|
d583c7bc00 | ||
|
96ed5072d8 | ||
|
c09f6a6793 | ||
|
7c14c2f5f0 | ||
|
6d3f5e9f37 | ||
|
9baa8de162 | ||
|
6966bc7f3a | ||
|
557cd260e6 | ||
|
6b6496d9ff | ||
|
bf8542b075 | ||
|
fd6d7f3a69 | ||
|
f06851c5f4 | ||
|
27b41a8518 | ||
|
62a5e42393 | ||
|
32099f9330 | ||
|
f1c85c993e | ||
|
79dd702d97 | ||
|
6954c1b3fd | ||
|
cde6349a8c | ||
|
de8cbef220 | ||
|
0bbf03cc95 | ||
|
ba4e114c8a | ||
|
ea3bbae872 | ||
|
1cd7811d7d | ||
|
a4636b2902 | ||
|
d500ee2899 | ||
|
20a8b5e9d9 | ||
|
15e0b59054 | ||
|
885891f6f5 | ||
|
c3bdc60c48 | ||
|
37ea945516 | ||
|
cb10bf684c | ||
|
8e8ce320d4 | ||
|
31e3afa4a4 | ||
|
22b173b4c5 | ||
|
ac2833bb7e | ||
|
910122838d | ||
|
3db9717b27 | ||
|
b59776d2fe | ||
|
d7f5ee36e8 | ||
|
87e2d812a7 | ||
|
fa8c6548a5 | ||
|
64ee7b4f3d | ||
|
237d561090 | ||
|
3771ef5b6a | ||
|
bec2d22cf8 | ||
|
f43083fec8 | ||
|
3ab19574f4 | ||
|
bcd90f80d0 | ||
|
4e00b81940 | ||
|
6e3d0d4515 | ||
|
c608d22b6f | ||
|
12b69590da | ||
|
ed09f9b9da | ||
|
c5f692263d | ||
|
0ff2daf2d4 | ||
|
0cd278f040 | ||
|
fc3925148d | ||
|
04b0e8ac53 | ||
|
4333d505c4 | ||
|
16f4c47f00 | ||
|
6b04789b89 | ||
|
9b2ea74a6f | ||
|
1f318f0137 | ||
|
3a7ac95ffe | ||
|
3cd5de59fe | ||
|
b5e49a9477 | ||
|
c0e5625ae1 | ||
|
da0e714f86 | ||
|
3b1c9b23c5 | ||
|
6aaa1bd7a4 | ||
|
5eae4bd086 | ||
|
927fed257c | ||
|
e8219c70ec | ||
|
b832954f05 | ||
|
4bb2597bff | ||
|
3c4cdefc56 | ||
|
24e4bc8705 | ||
|
a56a59b7e5 | ||
|
3f4901495a | ||
|
d35397f09e | ||
|
9f85daaa86 | ||
|
e77b0fead1 | ||
|
e3f36158bb | ||
|
bcab63bb30 | ||
|
de787c424a | ||
|
f32d7c8778 | ||
|
6044d3d6ae | ||
|
1c6d837a80 | ||
|
eb7c50be26 | ||
|
8420bbb0da | ||
|
15fb1b714c | ||
|
160c47defe | ||
|
b09d61619a | ||
|
66bd5d5927 | ||
|
99918c30e0 | ||
|
a21009e049 | ||
|
495f33eaa3 | ||
|
5b1325803a | ||
|
5cc7794cb0 | ||
|
2ff8f6f179 | ||
|
f8bc24ce6f | ||
|
57174245ad | ||
|
5045cbfd33 | ||
|
827f37385f | ||
|
6d331c3ebd | ||
|
d3e842f6db | ||
|
7925513367 | ||
|
b63a53e182 | ||
|
297246aea0 | ||
|
73deab78cf | ||
|
687c16810e | ||
|
cf092566e3 | ||
|
b13f57283e | ||
|
a0a8ff0734 | ||
|
eca6c5ae2f | ||
|
047e0cecc3 | ||
|
276720ab57 | ||
|
d72661455e | ||
|
3c7eab702c | ||
|
fc4c8867f4 | ||
|
70efa660e0 | ||
|
04590dc889 | ||
|
8f84217ccf | ||
|
ebbd6f4399 | ||
|
b6b50288bb | ||
|
e4856484d9 | ||
|
01aedfbcf7 | ||
|
30ed6b9026 | ||
|
209d741363 | ||
|
0f8e7b88b7 | ||
|
e0235d640a | ||
|
3b5c7805cb | ||
|
974c93254e | ||
|
daa6b877e6 | ||
|
d440dd805c | ||
|
17da7cfcab | ||
|
e54e8b5bc0 | ||
|
93d28e0fe7 | ||
|
ed2c4cb3ef | ||
|
e5f1d4ed0e | ||
|
6d14cbaee5 | ||
|
0049518769 | ||
|
3e101e4c55 | ||
|
ab05bf15c7 | ||
|
a20877c377 | ||
|
06af0795f6 | ||
|
6ca12a184b | ||
|
64736d64cc | ||
|
8788e73345 | ||
|
2c60b34084 | ||
|
b095073043 | ||
|
8686406ef1 | ||
|
06c8a2edcd | ||
|
09f65e0252 | ||
|
0ba767c387 | ||
|
39dcb5060d | ||
|
abbd364e7e | ||
|
ac421dd9b4 | ||
|
466616e420 | ||
|
602c2a2a7f | ||
|
fa2f3d5cdd | ||
|
deaf393a2f | ||
|
31b01e7704 | ||
|
a301d6bfd0 | ||
|
cbee0996b8 | ||
|
eb3f2343b3 | ||
|
4fc16555cb | ||
|
819b85e526 | ||
|
724b781f59 | ||
|
9504594e87 | ||
|
ecbb7f3966 | ||
|
dd772a7bdf | ||
|
65381ecdbb | ||
|
88600f05de | ||
|
7335de7968 | ||
|
840f89247a | ||
|
054c53831a | ||
|
31edb21a76 | ||
|
f6e9faed05 | ||
|
a7f9afdd7a | ||
|
f8b5f8fdfc | ||
|
2108d5b79f | ||
|
53b503bcfa | ||
|
893bca55e7 | ||
|
d437eac1df | ||
|
3c5737224e | ||
|
9b02fc5b27 | ||
|
24eb3afc59 | ||
|
5a62436d84 | ||
|
656e5d83ad | ||
|
3644109cec | ||
|
b533b7ab98 | ||
|
5189853c19 | ||
|
199f83777b | ||
|
18e21ad3e7 | ||
|
b898230823 | ||
|
4b1c5b802c | ||
|
23bf46ea02 | ||
|
3e626eaffc | ||
|
9b17d9a093 | ||
|
7286173438 | ||
|
42d1297557 | ||
|
3395daaab0 | ||
|
46946ecebc | ||
|
af0721e021 | ||
|
34b5b4c1b2 | ||
|
ead3eda2c3 | ||
|
4f7784215d | ||
|
04d8433d1c | ||
|
aff035122b | ||
|
22651a86b7 | ||
|
543791f723 | ||
|
dccfb991b1 | ||
|
0a21695ff2 | ||
|
dd5ab7bdc2 | ||
|
5be1ad5844 | ||
|
44e9ae75ae | ||
|
267f31785a | ||
|
447dfcfc4e | ||
|
396ea23458 | ||
|
617f2232cc | ||
|
c5a747463b | ||
|
7bf29ca6c4 | ||
|
b2b3d58afd | ||
|
cfd26ae2bd | ||
|
83ff3198aa | ||
|
08011100cd | ||
|
b0ebd7bf00 | ||
|
dd978e9f86 | ||
|
eeccb19b35 | ||
|
04f62b9f0d | ||
|
b69d7f28a3 | ||
|
5c2b42b7fe | ||
|
5c592ccadc | ||
|
08cb4742d2 | ||
|
090cd57c20 | ||
|
fee8717e4d | ||
|
2df8f4fdce | ||
|
4e82f3bdb3 | ||
|
ec94706b32 | ||
|
e0e1f2f378 | ||
|
7d8fc65ef0 | ||
|
3d901ae5f9 | ||
|
695cdd2d35 | ||
|
7af8b302e9 | ||
|
bf2fda1bc4 | ||
|
3ce4e51d63 | ||
|
b02660d5ff | ||
|
da4387359e | ||
|
578bb9d9f4 | ||
|
c8ec7565ad | ||
|
520b706ef3 | ||
|
434021a9a1 | ||
|
7fcfacaeae | ||
|
ed7ed04475 | ||
|
7b92f56cda | ||
|
4b77a0b144 | ||
|
7c939fdeaf | ||
|
a77bb2720d | ||
|
29be22a8d3 | ||
|
2916bd1998 | ||
|
9fef770143 | ||
|
2a1f531ffa | ||
|
3603e099fe | ||
|
77d59c9788 | ||
|
4eb3d6b24c | ||
|
8132296d4c | ||
|
445ffd8e9f | ||
|
4af08391fa | ||
|
480319a3f4 | ||
|
665c40d0d4 | ||
|
624862480d | ||
|
159d539f59 | ||
|
cfbfff00a9 | ||
|
51a71808d3 | ||
|
fc4e234b45 | ||
|
42032e0df0 | ||
|
33a099de61 | ||
|
4623060f08 | ||
|
d878cbf356 | ||
|
36141d1e9c | ||
|
9afb773ab3 | ||
|
8647673d9a | ||
|
c4e2faa25a | ||
|
e5f2c218e1 | ||
|
6ed35a1aba | ||
|
1ef2f10b8a | ||
|
90e5f50da6 | ||
|
5a311d24ec | ||
|
dc790b246b | ||
|
365bb3fa25 | ||
|
850f52e128 | ||
|
199065e93f | ||
|
d95113eaaf | ||
|
b7fd77bcf8 | ||
|
bff66c0b7e | ||
|
e1bb73a76d | ||
|
a05b0bf1e3 | ||
|
e6652c025d | ||
|
a8238d688e | ||
|
417e9489bb | ||
|
815a7806a3 | ||
|
88d91b6063 | ||
|
b9ba2946a5 | ||
|
9faa98dd51 | ||
|
656ba9234b | ||
|
f8a094134b | ||
|
1a85237d15 | ||
|
9d1659b97b | ||
|
8ae1e5a8f2 | ||
|
2ca9bf5b6f | ||
|
e9470aaf7f | ||
|
7d06bece80 | ||
|
633f389f4e | ||
|
2814ab5d55 | ||
|
43819ddfd2 | ||
|
9fb59918cf | ||
|
e2c82168fb | ||
|
9c2ae296d3 | ||
|
a6a92235f9 | ||
|
a1940ae8f2 | ||
|
e3c378427b | ||
|
34d4358326 | ||
|
5c88aafbec | ||
|
b14175ab0c | ||
|
677a6c52b0 | ||
|
95c5126776 | ||
|
e390c00a2b | ||
|
d13c77bd2f | ||
|
1a59c06d42 | ||
|
7393d220ef | ||
|
7cc196f4f5 | ||
|
74723f0de3 | ||
|
7410b45c05 | ||
|
8c6f0bd5fc | ||
|
68fb14c390 | ||
|
4b7262a98b | ||
|
eb6f2c5db7 | ||
|
1a8ffd94fc | ||
|
b128c4106c | ||
|
ceaa7a3511 | ||
|
e04ac679dd | ||
|
0c5e93e9d8 | ||
|
18285bca22 | ||
|
650af228d9 | ||
|
807a8bb7f3 | ||
|
dec0be87bb | ||
|
9f1133e360 | ||
|
f4169a0ede | ||
|
14508ee773 | ||
|
dabec46511 | ||
|
15032a3f44 | ||
|
f02f9c6211 | ||
|
25d9743e3b | ||
|
2a7bb37167 | ||
|
dbb71d10c9 | ||
|
cc7a066d43 | ||
|
1a7222ccfb | ||
|
12a70e1f22 | ||
|
a20db9185b | ||
|
2a4645bc08 | ||
|
82914fa3ae | ||
|
74c2c1759b | ||
|
01052bf8af | ||
|
0fa59b3272 | ||
|
292a4ed1be | ||
|
7c7b8941cb | ||
|
8d73fb774f | ||
|
5c4814585a | ||
|
5179847c5c | ||
|
070b1db425 | ||
|
db497de7d0 | ||
|
4c0de33956 | ||
|
2bedbad71a | ||
|
7e58feeec0 | ||
|
5028007b7a | ||
|
79d2786638 | ||
|
4646b6e185 | ||
|
50693655b8 | ||
|
54c707f5bb | ||
|
ec1a915edd | ||
|
0e44b766a0 | ||
|
59c625042b | ||
|
486425d389 | ||
|
6cdbb05998 | ||
|
c0a4b0fcd5 | ||
|
1d68121e45 | ||
|
cc29f3e099 | ||
|
3874a15a29 | ||
|
f7343df5ba | ||
|
9be1e31dae | ||
|
94a98074bd | ||
|
90646fa0a0 | ||
|
fa2be15d2e | ||
|
c2069bf1d6 | ||
|
3bc6235f7b | ||
|
de7e3c2134 | ||
|
8f37f19ba3 | ||
|
cc94964757 | ||
|
1b0fcc06f7 | ||
|
d49cc8daf8 | ||
|
b0eb7c63eb | ||
|
87a22c8194 | ||
|
c387a65cc1 | ||
|
f3e15bcd78 | ||
|
540d7f2403 | ||
|
b13c6c34dd | ||
|
6e881dfa98 | ||
|
15749d13c3 | ||
|
9e87bc8452 | ||
|
512cde4fc3 | ||
|
223ae3e11a | ||
|
e5c93970ac | ||
|
666912eaa5 | ||
|
064a78098b | ||
|
bb3497ef78 | ||
|
cc5110818f | ||
|
67746601a4 | ||
|
dd54c0a5db | ||
|
4eb6a5a2f7 | ||
|
55b9d92217 | ||
|
86133c80ff | ||
|
3fa5215449 | ||
|
15374927a0 | ||
|
8fd1677974 | ||
|
26dc8d92da | ||
|
edcc8ce016 | ||
|
ff14e64bf9 | ||
|
947ea4a504 | ||
|
07caa334a0 | ||
|
7fcc546414 | ||
|
92051c1090 | ||
|
b922f380ba | ||
|
e4ff789a50 | ||
|
cce45fa1bf | ||
|
892a88e3cc | ||
|
3552a4b101 | ||
|
0b475ff56d | ||
|
17d62acdd6 | ||
|
1b33935c01 | ||
|
a5a1f09e84 | ||
|
9d5e2ee666 | ||
|
e1bdc41ace | ||
|
222b29535a | ||
|
d66639eaef | ||
|
1103401fe0 | ||
|
ffbd99414e | ||
|
46213b90b0 | ||
|
ab68168951 | ||
|
584ee2cde0 | ||
|
3d4f12ffa6 | ||
|
b1d26b0296 | ||
|
ca7bde25c6 | ||
|
6299540216 | ||
|
36da011e0b | ||
|
0ba0172b7c | ||
|
0d18432343 | ||
|
ae26f948a4 | ||
|
6f503d8b53 | ||
|
82e489884b | ||
|
18b459032d | ||
|
9592104190 | ||
|
37adaf2cd0 | ||
|
a4c594beff | ||
|
06109bf82e | ||
|
347a406729 | ||
|
482033c57b | ||
|
2eb4ae8088 | ||
|
e207ef6687 | ||
|
b7625e34da | ||
|
2a42c56ab3 | ||
|
422a46e92c | ||
|
f92ec4ebda | ||
|
f0db12664d | ||
|
c2cff9d947 | ||
|
1de12470d3 | ||
|
cb65a66ee3 | ||
|
80b0634d2d | ||
|
aa497b46e4 | ||
|
e46929b505 | ||
|
271064dbdb | ||
|
3e13971012 | ||
|
bd1dd0a671 | ||
|
eef84597d0 | ||
|
cc0d220e30 | ||
|
ba13a592cc | ||
|
409545f4c3 | ||
|
07b2e6d07a | ||
|
d799fc1de0 | ||
|
26a28a0123 | ||
|
a943942bdd | ||
|
15d829c0b1 | ||
|
0b135fb231 | ||
|
c56a48234f | ||
|
8216a3f4ec | ||
|
8dfed88ed3 | ||
|
f2e0841970 | ||
|
ac4f7be5bb | ||
|
63dc8442ba | ||
|
125c203884 | ||
|
176593b81f | ||
|
96aed21bb5 | ||
|
0218f4beea | ||
|
72eec3e2af | ||
|
40e558b720 | ||
|
6e713e6857 | ||
|
1f538d4a77 | ||
|
49622dd4af | ||
|
df3d84b570 | ||
|
aac5025029 | ||
|
de2ded1984 | ||
|
21273774a5 | ||
|
d1de71318b | ||
|
4a7c61eabf | ||
|
f6599ae815 | ||
|
4b30be5c54 | ||
|
ebefe5df75 | ||
|
8c67fd0c3a | ||
|
c649246614 | ||
|
c52487c671 | ||
|
8998433d75 | ||
|
ead1f354d7 | ||
|
3e39f33345 | ||
|
a55c1cbb1d | ||
|
8e148e683b | ||
|
e5c60ec0c1 | ||
|
f3dd4cc67d | ||
|
35f915d42e | ||
|
57734e837f | ||
|
c7d8b5caf4 | ||
|
de86082034 | ||
|
b33753bc73 | ||
|
42ddc46a21 | ||
|
6d893e4a3f | ||
|
8082430c30 | ||
|
bfe795a977 | ||
|
8a18554201 | ||
|
5d57765669 | ||
|
5e44aae1c5 | ||
|
898865d417 | ||
|
6f8a60c9ac | ||
|
8823c0602e | ||
|
11cc6d6f43 | ||
|
8bda81adcb | ||
|
20a540236a | ||
|
4a85188a22 | ||
|
57bcb79310 | ||
|
c44d58d51b | ||
|
9800b23e4d | ||
|
1b87d57af4 | ||
|
227fc3d775 | ||
|
33b6a42aa0 | ||
|
51e736c79b | ||
|
88f0859955 | ||
|
29d4653524 | ||
|
1d6b4e6468 | ||
|
ad6a4b5228 | ||
|
287bfcb568 | ||
|
67eefdcf05 | ||
|
c6fe7ebe36 | ||
|
cff02c86fb | ||
|
2784672604 | ||
|
ddd8b53fdf | ||
|
90b922c432 | ||
|
ea389e1a13 | ||
|
00c4d3b9b2 | ||
|
3ba6c135a8 | ||
|
5259102b18 | ||
|
cfa3f9cfd3 | ||
|
6c6de51a45 | ||
|
e037bd92e7 | ||
|
42cb0a93bb | ||
|
d36a6b2d10 | ||
|
16f146b0da | ||
|
4c37739914 | ||
|
8b1f0d9a8f | ||
|
9e10c66184 | ||
|
03c280bb82 | ||
|
3193cf068c | ||
|
5b31c77b18 | ||
|
874e5d1c12 | ||
|
589fb6298c | ||
|
5271c03268 | ||
|
cc584e0b6b | ||
|
14caf445bd | ||
|
d431da3e3a | ||
|
4cd38dc8c6 | ||
|
a45e3a5e32 | ||
|
490ca1cb5a | ||
|
9c3c27cb71 | ||
|
3ce99eeaa7 | ||
|
0db3d151ee | ||
|
1efbb52738 | ||
|
9f672549f2 | ||
|
f3e8f0e64d | ||
|
dc77f304bf | ||
|
56d7a74879 | ||
|
896797a6d6 | ||
|
835d2f2a42 | ||
|
6bb4abac56 | ||
|
3d981a4eab | ||
|
e87d2c1c72 | ||
|
8a1f75b256 | ||
|
acb5df1601 | ||
|
a3c8def120 | ||
|
3cc2720a35 | ||
|
2120b0e215 | ||
|
68a6ea1aa0 | ||
|
806ce22970 | ||
|
ad1ca08de3 | ||
|
85aeeba7a2 | ||
|
7a2d6b907b | ||
|
f63c4688bc | ||
|
6c01069f67 | ||
|
695ea7b969 | ||
|
33fbb910e5 | ||
|
409adb0c05 | ||
|
d748a341bd | ||
|
ee3f47dae1 | ||
|
5ff4bed6b7 | ||
|
8e29570d07 | ||
|
897d61d1db | ||
|
457da91008 | ||
|
c0af41a53b | ||
|
a561a58680 | ||
|
f6caa4db8f | ||
|
8fe0e9e59a | ||
|
c7785ce672 | ||
|
5cbe0ba2b7 | ||
|
47d07a95be | ||
|
0886f16f43 | ||
|
f3e4c2c52c | ||
|
ee85f21572 | ||
|
7156edc857 | ||
|
fddf4c4763 | ||
|
f8490191ac | ||
|
90fe706fba | ||
|
2209888a5d | ||
|
1b136946e9 | ||
|
ccfccda089 | ||
|
d5d6c10c44 | ||
|
4937de79a7 | ||
|
f97a701697 | ||
|
105ac35306 | ||
|
3394c9cecc | ||
|
bffaee8ab9 | ||
|
b52e7a17d0 | ||
|
bbd545b97a | ||
|
f4e8fbd6c2 | ||
|
5ff1e85274 | ||
|
78fa4c2c9b | ||
|
e250fa211a | ||
|
5f0e2b3f11 | ||
|
3efce777b5 | ||
|
7180501272 | ||
|
70ca6d03e0 | ||
|
b37221b55b | ||
|
36e4d5baf0 | ||
|
95383b81c0 | ||
|
373a7f28ef | ||
|
af361d3c18 | ||
|
2121a77e29 | ||
|
bade88ecd6 | ||
|
d15fd5692d | ||
|
9dc2a67d70 | ||
|
29772f8144 | ||
|
32a2cf699b | ||
|
49cb572069 | ||
|
f0e94780b8 | ||
|
0c95173889 | ||
|
857ffb15d4 | ||
|
8b0c4d7308 | ||
|
631963dfdf | ||
|
7cecb1d1af | ||
|
298bec2465 | ||
|
c3c15d49ad | ||
|
2faf80959d | ||
|
355a2eed03 | ||
|
82db0a34b9 | ||
|
2056236c42 | ||
|
1bbeefca7c | ||
|
223b20ddc9 | ||
|
8530280a98 | ||
|
3a63ea0d90 | ||
|
34859daa63 | ||
|
c166829191 | ||
|
9fc2b9d91e | ||
|
0712351508 | ||
|
f4afe925f8 | ||
|
50de4f73a3 | ||
|
96773ab447 | ||
|
659f9675eb | ||
|
26190c0f5c | ||
|
8ff2167a75 | ||
|
303347ac00 | ||
|
9819c6a3e1 | ||
|
6fc73851aa | ||
|
419e10a5b2 | ||
|
a76e8ad35a | ||
|
e449c47212 | ||
|
d194b85a74 | ||
|
f9bcc0979f | ||
|
b63f34e48e | ||
|
2f851ecf7d | ||
|
a801f43615 | ||
|
a07adb6d3a | ||
|
7f12ef1cee | ||
|
6e443c66d1 | ||
|
37d49ae328 | ||
|
6325f4dd02 | ||
|
4ea015c6ef | ||
|
815a479ca5 | ||
|
ff2c91fe8d | ||
|
6106c3196a | ||
|
8d1b6a5c6a | ||
|
bc8ed88d93 | ||
|
6230d787f7 | ||
|
e072e0a32a | ||
|
154eee337c | ||
|
f41bfa93aa | ||
|
581798a15f | ||
|
ba8d245eca | ||
|
a596568fbc | ||
|
882621a6af | ||
|
3dfb5995b6 | ||
|
40bc21a04b | ||
|
f1ff34af6d | ||
|
597f1b04cf | ||
|
b6cd2e0fa1 | ||
|
6abe731ae5 | ||
|
3292bc580b | ||
|
93514a6787 | ||
|
f8ac55da6f | ||
|
6a961e09b8 | ||
|
75ebf08ae7 | ||
|
05772a5ff2 | ||
|
597f2ebdb9 | ||
|
6d7aa1b401 | ||
|
bbe430028c | ||
|
0b6362e611 | ||
|
75451fb25f | ||
|
32d398f07d | ||
|
78b09cc4b4 | ||
|
7aad037cf4 | ||
|
80133ece4b | ||
|
5462e26d95 | ||
|
0d92cb636f | ||
|
c94e3edd88 | ||
|
8325b894ff | ||
|
d8e7a4fb91 | ||
|
a8185d0d51 | ||
|
233e5930e0 | ||
|
c1ddac7f4e | ||
|
aeaa6432d6 | ||
|
53fe3e0045 | ||
|
6a01fae624 | ||
|
89e9fc5563 | ||
|
9735c97795 | ||
|
03a0c5d2f2 | ||
|
73651d2b87 | ||
|
d9f7f7d4a0 | ||
|
9c78fd57ed | ||
|
e00ed695fb | ||
|
07ca2900a1 | ||
|
edbb996b57 | ||
|
868ecf7323 | ||
|
d5416e1121 | ||
|
a6117b47cb | ||
|
e9954a7af7 | ||
|
a06de39da2 | ||
|
671baf587d | ||
|
3ba3f3351b | ||
|
785b43b3ba | ||
|
59a76f8f04 | ||
|
5b07efc5c3 | ||
|
434b4830dc | ||
|
11e71a638f | ||
|
cd17379733 | ||
|
487cbc8db5 | ||
|
760ff5630e | ||
|
e8c9587f5a | ||
|
cd92bdae46 | ||
|
47af4c7815 | ||
|
c9721043f8 | ||
|
e4e3089a82 | ||
|
5eac756946 | ||
|
40ac95af59 | ||
|
5c8b18a0ac | ||
|
607a72e5e9 | ||
|
22eac80306 | ||
|
2e54ae8dde | ||
|
81db069626 | ||
|
122609866a | ||
|
ebcdd4d47b | ||
|
5ddad7e39c | ||
|
844182f704 | ||
|
e0bb18b283 | ||
|
d10d349e9a | ||
|
b412587249 | ||
|
a15ed37adc | ||
|
06c00b727b | ||
|
11955a9641 | ||
|
21cff18275 | ||
|
93e3af0ecd | ||
|
23d40b138d | ||
|
e30d1596dc | ||
|
bce1278dfc | ||
|
25d1ddeed6 | ||
|
ef2286152a | ||
|
2c9f135389 | ||
|
e4225086e1 | ||
|
e3c5b0243c | ||
|
e58e1df283 | ||
|
d83dab1937 | ||
|
24b669b157 | ||
|
184b723de0 | ||
|
4e4a937ccd | ||
|
21ae039589 | ||
|
fa0c18c52e | ||
|
a08005dca7 | ||
|
a00a3d5915 | ||
|
cbec3c40d2 | ||
|
e0251930be | ||
|
eb0442b130 | ||
|
d3e0aca3d7 | ||
|
7e6a8f35af | ||
|
3c93fe4d6f | ||
|
1a533234d4 | ||
|
3d07bfe704 | ||
|
b4836bf304 | ||
|
f8b1f407f7 | ||
|
68ca768502 | ||
|
0fa61f8626 | ||
|
35894bc4fc | ||
|
a66bb13703 | ||
|
c5c283b2e3 | ||
|
3a0540c266 | ||
|
4b022dfd84 | ||
|
bf9647c5bb | ||
|
76ee50ec96 | ||
|
1786d65809 | ||
|
2f0db78955 | ||
|
fbcb6c3836 | ||
|
7914110a77 | ||
|
23d1ab83c7 | ||
|
5f4bd25ddc | ||
|
61fe3cc6ee | ||
|
8ef78878fd | ||
|
de56289ca6 | ||
|
cf63968ca3 | ||
|
b0c874254a | ||
|
966f5319a0 | ||
|
313852a698 | ||
|
25c4b965eb | ||
|
c75788e31c | ||
|
1d45ef7f2c | ||
|
1bc99e6729 | ||
|
43af89cd2e | ||
|
aedddfe0d7 | ||
|
d0454a05ad | ||
|
bcdadd3d43 | ||
|
fdef2a3d7a | ||
|
8f9d494437 | ||
|
0b9f7d232e | ||
|
5d265ed284 | ||
|
b1f9312175 | ||
|
057ccbc9c1 | ||
|
aea38439ef | ||
|
5ba9122aaa | ||
|
7f384e9ff1 | ||
|
5a3f27ea73 | ||
|
929fbd2572 | ||
|
1779aa73a5 | ||
|
28b586ab4f | ||
|
2eaa3afafa | ||
|
f930eb3fee | ||
|
a06c47a861 | ||
|
b5adc68118 | ||
|
23c60010b3 | ||
|
b72087db64 | ||
|
b6c4f6c8e8 | ||
|
10f09a346f | ||
|
35177d32ba | ||
|
c557a846f0 | ||
|
e054a963f6 | ||
|
7b02c1fa72 | ||
|
8726456168 | ||
|
7ca6a859ef | ||
|
794aaf1a88 | ||
|
f9b9329182 | ||
|
59472b1b89 | ||
|
253b3cddc4 | ||
|
1a0a801a11 | ||
|
d47fe50a24 | ||
|
f90134bba2 | ||
|
9b9ccfb7eb | ||
|
bb34935b1e | ||
|
e7eb3278e2 | ||
|
ac29197364 | ||
|
a4ce7b1236 | ||
|
d49a77edc6 | ||
|
c131fb4c17 | ||
|
06c264c358 | ||
|
0afcd47aa4 | ||
|
0c2186255a | ||
|
e25a67b325 | ||
|
9d38e6a806 | ||
|
cd555f6b13 | ||
|
9d9adf3803 | ||
|
10b894546c | ||
|
4c72ae67ee | ||
|
46da9b91e7 | ||
|
a126b9c8c2 | ||
|
b98f2f1a02 | ||
|
b5ffdb47ec | ||
|
10c680a31a | ||
|
ad98ec6d6d | ||
|
dc85b41256 | ||
|
0287abf9ac | ||
|
5bbf52e3b6 | ||
|
314475050f | ||
|
cdf925c31a | ||
|
794d298b45 | ||
|
e1395b845f | ||
|
214c590b18 | ||
|
093080cb49 | ||
|
ccff8108f8 | ||
|
669fe09ea4 | ||
|
1d4211a1e1 | ||
|
01e80c7109 | ||
|
7c5bb27902 | ||
|
bebaf13c81 | ||
|
d0e5bd5692 | ||
|
75ab458377 | ||
|
493559c13f | ||
|
05a00b02c2 | ||
|
741c14a583 | ||
|
84dc254cb0 | ||
|
8489f49999 | ||
|
bc07a78559 | ||
|
185115561a | ||
|
237c246ee6 | ||
|
da6a388fc3 | ||
|
7e3e830d00 | ||
|
40008ea799 | ||
|
193813feba | ||
|
d25b8cb4d9 | ||
|
b29bbf4f11 | ||
|
ea578fcd5f | ||
|
f0ab44a9fe | ||
|
ef25e83794 | ||
|
b025048771 | ||
|
d264a888bc | ||
|
05f466491f | ||
|
457347836c | ||
|
3ecb5d2f49 | ||
|
8b200b3aec | ||
|
2121da9bcd | ||
|
d8e13795d9 | ||
|
dbc3ff4950 | ||
|
ab8648c3e5 | ||
|
f31dcd3660 | ||
|
1f60b72f30 | ||
|
30741359f0 | ||
|
2d93085d35 | ||
|
7c1eba1fe7 | ||
|
5be23d9b33 | ||
|
84d2f519d1 | ||
|
c4a5ec4300 | ||
|
58870076b1 | ||
|
ce944f92bb | ||
|
8240be30d0 | ||
|
68605b9377 | ||
|
ac3197f7f6 | ||
|
73914b9c08 | ||
|
b3d736cb61 | ||
|
ff17a0f7ad | ||
|
0a4ee3a18b | ||
|
8238ae524c | ||
|
8b90d25a63 | ||
|
04d2398c77 | ||
|
d517669c9f | ||
|
578d5a981a | ||
|
5c5ff6c5bb | ||
|
71fe3165e6 | ||
|
ea04aa1fac | ||
|
5f79533ae7 | ||
|
1599476881 | ||
|
2b6fa0c4df | ||
|
dd7354fc84 | ||
|
a479911a63 | ||
|
dbfe48776c | ||
|
7712d9f4be | ||
|
a8e3687bdd | ||
|
54816ec10f | ||
|
1c90cb114f | ||
|
cdf38cb498 | ||
|
40e408dd98 | ||
|
6880f54178 | ||
|
915b40ab7d | ||
|
0be6cb9651 | ||
|
94a374096f | ||
|
5b8f7056dc | ||
|
78c10a5425 | ||
|
4d45afa27b | ||
|
ee2bddcd80 | ||
|
cf69881767 | ||
|
d66d11ea02 | ||
|
c7ad786348 | ||
|
976ae2a6bb | ||
|
80c343080f | ||
|
76f591ddac | ||
|
33b8017181 | ||
|
cee0f80164 | ||
|
b9194672f6 | ||
|
485ea29270 | ||
|
3fa1be1cd6 | ||
|
0eece20f0b | ||
|
c4f0d9125d | ||
|
3e15a54db9 | ||
|
4752700682 | ||
|
0ff78301d6 | ||
|
1256f44bbb | ||
|
2beb36c351 | ||
|
f681326240 | ||
|
c26cb40a80 | ||
|
e78606f233 | ||
|
c81888e716 | ||
|
ad1db22661 | ||
|
4c5d2dd16f | ||
|
d1558413d4 | ||
|
11bdecf8b7 | ||
|
8009c6a427 | ||
|
1d77571fae | ||
|
78c496df87 | ||
|
2ad8ded664 | ||
|
edb2c1ce4d | ||
|
0b067ace70 | ||
|
fe2d01f42f | ||
|
7d8cce9fb1 | ||
|
40bc7a7d51 | ||
|
5b83249fcf | ||
|
12cda4a833 | ||
|
f9afd96280 | ||
|
b71244c229 | ||
|
83e6f60cb7 | ||
|
3404aeebe0 | ||
|
44f6762cb1 | ||
|
ddb6dadc30 | ||
|
009f51c20c | ||
|
7938069841 | ||
|
e399450cef | ||
|
b641e963a9 | ||
|
80aa640ac4 | ||
|
8be24381a8 | ||
|
ef406edc61 | ||
|
bfc0dba6ad | ||
|
57f46e50e6 | ||
|
485e33b84b | ||
|
48c9880a92 | ||
|
f59faabf1d | ||
|
fb23c98d9f | ||
|
d50e0f0fac | ||
|
452ad764d9 | ||
|
9182c5509c | ||
|
9dcea9c97a | ||
|
4b4e2514f7 | ||
|
cd6cfd1406 | ||
|
f2001d4027 | ||
|
595a7eafcd | ||
|
40d196c9cd | ||
|
61f38ceda6 | ||
|
26fbd78156 | ||
|
611d953141 | ||
|
c775744db5 | ||
|
259d3838b5 | ||
|
b93763cef8 | ||
|
2c64ff0b3e | ||
|
680fa1de87 | ||
|
df429064c6 | ||
|
b04661171a | ||
|
82274ed1c9 | ||
|
2cd2082499 | ||
|
89f3330606 | ||
|
33b99c0ae7 | ||
|
9defff1cf4 | ||
|
c1f75a696a | ||
|
7fcdd5e89c | ||
|
d7ee29aeee | ||
|
e4e9b5c5c1 | ||
|
2215b11c21 | ||
|
0608b6cb22 | ||
|
10dd214b17 | ||
|
76f905fe9d | ||
|
5a49768614 | ||
|
6985322ca0 | ||
|
1c8931c63b | ||
|
aaa2225e6c | ||
|
20d9e919c3 | ||
|
df81ce2a07 | ||
|
3ea96f716d | ||
|
9531b09335 | ||
|
f634617dcb | ||
|
82d5b45cdd | ||
|
5858971762 | ||
|
1746d5b034 | ||
|
d2bb1b02b5 | ||
|
f5e3b717ff | ||
|
99b0c04ef2 | ||
|
9cb564a15f | ||
|
5b041e6899 | ||
|
d124e68275 | ||
|
6d347f9a52 | ||
|
63c3fc57f0 | ||
|
e2f07044b4 | ||
|
f3e3beb0ce | ||
|
3f9d176793 | ||
|
6286595898 | ||
|
b878e87cae | ||
|
916072f7fd | ||
|
165b9865cf | ||
|
97efe3a516 | ||
|
a00f1be009 | ||
|
993dc633a9 | ||
|
7dd80f6098 | ||
|
56097d5629 | ||
|
1fddad190f | ||
|
c1da509053 | ||
|
62c7e99465 | ||
|
b5f875cce7 | ||
|
f6f85d1c11 | ||
|
e4757a06ae | ||
|
10e0aaf1ab | ||
|
d4d6dbd79b | ||
|
47cc1bdc33 | ||
|
752e8ccf66 | ||
|
c70433585a | ||
|
2104ccb91a | ||
|
748348f407 | ||
|
da69d3d768 | ||
|
8f3489cd4a | ||
|
f36b08c10a | ||
|
0a255e8b49 | ||
|
6f1ae104f3 | ||
|
2f6dc2cc05 | ||
|
964dc00fab | ||
|
7898dc24c8 | ||
|
490cb14acd | ||
|
b38dbb82ab | ||
|
b9e9b7fe39 | ||
|
d53517a34a | ||
|
0967a53152 | ||
|
ce3ec131a6 | ||
|
20bb9fe42f | ||
|
87fe8948b8 | ||
|
f989b8060b | ||
|
93b458197a | ||
|
9b66c2cd03 | ||
|
c0cfcfa117 | ||
|
1152637120 | ||
|
02c3703392 | ||
|
ff21343751 | ||
|
fe35742519 | ||
|
493269e061 | ||
|
2ded7be76b | ||
|
b52f290020 | ||
|
0e9ed7d833 | ||
|
ab7f990d13 | ||
|
afbc50d1ee | ||
|
d18dbd7def | ||
|
e02557af3a | ||
|
3db99c7d21 | ||
|
1b32ed53d6 | ||
|
809051165b | ||
|
c2ed6c6e02 | ||
|
4a5a39c2bc | ||
|
81a67c0121 | ||
|
a6d3336212 | ||
|
d81d1b0a10 | ||
|
24a7d0ac95 | ||
|
6e33e4c882 | ||
|
76d23e33f9 | ||
|
be635e773c | ||
|
a280c9df89 | ||
|
40a1b46dfc | ||
|
4940255cc6 | ||
|
acd58ce557 | ||
|
38ac3f904c | ||
|
374192ebe1 | ||
|
f9b5a8f126 | ||
|
913ce3b5c0 | ||
|
de8bdef908 | ||
|
13aa0864d0 | ||
|
cdf1406aba | ||
|
463b1978d0 | ||
|
470d6ac707 | ||
|
f5e3b0dd31 | ||
|
202804c294 | ||
|
42ecbde838 | ||
|
a741f003e0 | ||
|
679051b219 | ||
|
6866cfb266 | ||
|
2435e0e639 | ||
|
d811f49cfc | ||
|
c0f2e45e13 | ||
|
b7b477dcdb | ||
|
9436a56e71 | ||
|
475fc347d2 | ||
|
445ba5c36c | ||
|
3f9b422f5f | ||
|
1008f83cc4 | ||
|
fc2375ab18 | ||
|
ce93faa277 | ||
|
93e1fff5d5 | ||
|
1a23316abd | ||
|
5ef015ee88 | ||
|
8d80fc9add | ||
|
6045f0a505 | ||
|
d247f3fb90 | ||
|
8796b5d359 | ||
|
a179ef05e0 | ||
|
eab0ea9f11 | ||
|
be24aa2a20 | ||
|
b54289098e | ||
|
f73dcd4e99 | ||
|
57f42f2019 | ||
|
1e93189a65 | ||
|
f9dee64cdd | ||
|
2ccddf3f0a | ||
|
29775f0374 | ||
|
86a3796321 | ||
|
c07a41fc61 | ||
|
10c795edf4 | ||
|
732d88a65d | ||
|
7b4717e9f0 | ||
|
b9f9aaa51d | ||
|
bb97cd4b87 |
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
github: RaspAP
|
||||||
|
|
59
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve RaspAP
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- These comments will NOT appear in your issue, so it's OK to ignore them -->
|
||||||
|
<!--
|
||||||
|
Thanks for reporting a bug for RaspAP.
|
||||||
|
|
||||||
|
Important: If you are NOT using a clean installation of a compatible OS, start with a fresh SD card, install RaspAP and replicate your bug BEFORE reporting an issue.
|
||||||
|
|
||||||
|
All submitters MUST read the issue policy and reporting guidelines:
|
||||||
|
https://docs.raspap.com/issues/
|
||||||
|
|
||||||
|
Refer to the frequently asked questions (FAQ) and official documentation:
|
||||||
|
https://docs.raspap.com/faq/
|
||||||
|
|
||||||
|
Do you have a question or want to suggest a new feature? Start a Discussion here:
|
||||||
|
https://github.com/RaspAP/raspap-webgui/discussions
|
||||||
|
|
||||||
|
Be sure there are no issues similar to yours that are already open. You can check this by searching the issues in this repository. If there is a duplicate issue, please close this one and add a comment to the existing issue instead.
|
||||||
|
-->
|
||||||
|
<!-- Provide a general summary of the issue in the Title above -->
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
<!-- IMPORTANT! Fill in the boxes that apply by marking them like so: [x] -->
|
||||||
|
- [ ] This is a bug report
|
||||||
|
- [ ] I observed this bug on a clean install of the OS
|
||||||
|
- [ ] I have followed the project prerequisites
|
||||||
|
- [ ] I have searched this repository for existing issues
|
||||||
|
- [ ] I checked the FAQ and official documentation before creating this issue
|
||||||
|
- [ ] I have read and understand the issue reporting guidelines
|
||||||
|
|
||||||
|
## Bug description
|
||||||
|
<!-- Provide a detailed description of the issue -->
|
||||||
|
|
||||||
|
## Your environment
|
||||||
|
1. Operating System: **ENTER HERE** <!-- RPi OS 32-bit Lite, Armbian, Debian, etc. -->
|
||||||
|
2. Hardware and version: <!-- RPi Zero/3B+/4, OrangePi 3, etc. -->
|
||||||
|
3. RaspAP version: <!-- reported by the Quick Installer or About page -->
|
||||||
|
4. Clean install of a compatible operating system? <!-- Yes/No -->
|
||||||
|
5. RaspAP Quick Install or Manual setup? <!-- Quick Install/Manual -->
|
||||||
|
6. Using default configuration? <!-- Yes/No -->
|
||||||
|
7. Simultaneous AP and managed mode? <!-- Yes/No -->
|
||||||
|
8. Onboard wireless chipset or external adapter? <!-- Onboard/External -->
|
||||||
|
9. Other software or services running with RaspAP?
|
||||||
|
|
||||||
|
## Steps to reproduce
|
||||||
|
<!-- Tell us how to reproduce this issue. Provide as much detailed information as possible -->
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
<!-- If applicable, add screenshots to help explain your problem -->
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
<!-- Add any other context about the problem here -->
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
blank_issues_enabled: false
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Is your feature request related to a problem?
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
## Describe the solution you'd like
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
## Describe alternatives you've considered
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
## Additional context
|
||||||
|
Add any other context or screenshots about the feature request here.
|
18
.github/stale.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 60
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 7
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- pinned
|
||||||
|
- enhancement
|
||||||
|
- feature request
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: stale
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
67
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '17 9 * * 1'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'javascript', 'python' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
# Learn more:
|
||||||
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
16
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto_close_issues:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Automatically close issues that don't follow the issue template
|
||||||
|
uses: lucasbento/auto-close-issues@v1.0.2
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template.\nPlease review this project's issue policy https://docs.raspap.com/issues" # optional property
|
||||||
|
closed-issues-label: "invalid" # optional property
|
6
.gitignore
vendored
@ -1 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
yarn-error.log
|
||||||
|
*.swp
|
||||||
|
includes/config.php
|
||||||
|
rootCA.pem
|
||||||
|
vendor
|
||||||
|
23
.travis.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
sudo: false
|
||||||
|
language: php
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
|
include:
|
||||||
|
- php: '7.0'
|
||||||
|
- php: '7.1'
|
||||||
|
- php: '7.2'
|
||||||
|
- php: '7.3'
|
||||||
|
- php: '7.4'
|
||||||
|
- php: 'nightly'
|
||||||
|
|
||||||
|
allow_failures:
|
||||||
|
- php: nightly
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- composer install --prefer-source --quiet --no-interaction
|
||||||
|
|
||||||
|
# Run test script commands.
|
||||||
|
script:
|
||||||
|
- composer test
|
52
BACKERS.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<img width="465" alt="Insiders logo" src="https://user-images.githubusercontent.com/229399/115766971-e19e1900-a3a8-11eb-8c6f-379deb4313d2.png">
|
||||||
|
|
||||||
|
Development of RaspAP is made possible thanks to a sponsorware release model. This means that new features are first exclusively released to sponsors as part of **Insiders**. Read on to learn how sponsorship works, and how easy it is to get access to Insiders.
|
||||||
|
|
||||||
|
## How sponsorship works
|
||||||
|
New features first land in **Insiders**, which means that *sponsors will have access to them immediately*. Every feature is tied to a funding goal in monthly subscriptions. When a funding goal is hit, the features that are tied to it are merged back into the [public RaspAP repository](https://github.com/RaspAP/raspap-webgui) and released for general availability. Bugfixes and minor enhancements are always released simultaneously in both editions.
|
||||||
|
|
||||||
|
Don't want to sponsor? No problem, RaspAP already has tons of features available, so chances are that most of your requirements are already satisfied. See the list of **exclusive features** to learn which features are currently only available to sponsors.
|
||||||
|
|
||||||
|
## How to become a sponsor
|
||||||
|
You can become a sponsor using your individual or organization's GitHub account. Just pick any tier from $10/month and complete the checkout. Then, after a few hours, you will be added as a team member to the super-secret private GitHub repository containing the Insiders edition, which has all exclusive features. In addition, you get access to Insiders-only team discussions and content.
|
||||||
|
|
||||||
|
**Important**: If you're sponsoring [RaspAP](https://github.com/RaspAP/sponsors) through a GitHub organization, please send a short email to [sponsors@raspap.com](mailto:sponsors@raspap.com) with the name of your organization and the account that should be added as a collaborator.
|
||||||
|
|
||||||
|
## Exclusive features
|
||||||
|
The following features are currently available exclusively to sponsors. A tangible side benefit of sponsorship is that Insiders are able to help steer future development of RaspAP. This is done through Insiders' access to discussions, feature requests, issues and pull requests in the private GitHub repository.
|
||||||
|
|
||||||
|
✅ [Network device management](https://docs.raspap.com/net-devices/)
|
||||||
|
✅ [Firewall settings](https://docs.raspap.com/firewall/)
|
||||||
|
✅ [WPA3-Personal AP security](https://docs.raspap.com/ap-basics/#wpa3-personal)
|
||||||
|
✅ [802.11w Protected Management Frames](https://docs.raspap.com/ap-basics/#80211w)
|
||||||
|
✅ [Printable Wi-Fi signs](https://docs.raspap.com/ap-basics/#printable-signs)
|
||||||
|
✅ [Drag & drop dashboard widgets](https://docs.raspap.com/ap-basics/#drag-drop-widgets)
|
||||||
|
✅ [MAC address cloning](https://docs.raspap.com/net-devices/#changing-the-mac-address)
|
||||||
|
✅ [Network diagnostics](https://docs.raspap.com/net-devices/#diagnostics)
|
||||||
|
✅ [WireGuard VPN kill switch](https://docs.raspap.com/wireguard/#kill-switch)
|
||||||
|
✅ [Dynamic DNS](https://docs.raspap.com/dynamicdns/)
|
||||||
|
✅ [Multiple WireGuard configs](https://docs.raspap.com/wireguard/#multiple-configs)
|
||||||
|
|
||||||
|
Look for the list above to grow as we add more exclusive features. Be sure to visit this page from time to time to learn about what's new, check the [Insiders docs page](https://docs.raspap.com/insiders/) and follow [@RaspAP on Twitter](https://twitter.com/rasp_ap) to stay updated.
|
||||||
|
|
||||||
|
## Funding targets
|
||||||
|
Below is a list of funding targets. When a funding target is reached, the features that are tied to it are merged back into RaspAP and released to the public for general availability.
|
||||||
|
|
||||||
|
### $1000
|
||||||
|
The second **Insiders Edition** includes the features listed above.
|
||||||
|
|
||||||
|
### $500
|
||||||
|
The [first Insiders Edition goal](https://docs.raspap.com/insiders/#500-1st-insiders-edition) was reached in December 2021. Thank you sponsors!
|
||||||
|
|
||||||
|
## Quarterly giving
|
||||||
|
Beginning in 2022, each quarter 15% of all proceeds from Insiders will be donated directly to the [Raspberry Pi Foundation](https://www.raspberrypi.org/). The Raspberry Pi Foundation is a UK-based charity that works to put the power of computing and digital making into the hands of people all over the world.
|
||||||
|
|
||||||
|
[![Get involved with the Raspberry Pi Foundation](https://img.youtube.com/vi/dEzg92g1LHw/0.jpg)](https://www.youtube.com/watch?v=dEzg92g1LHw)
|
||||||
|
|
||||||
|
When you become an Insider, not only do you support development of RaspAP but you also help inspire young people by harnessing the power of computing to solve problems and express themselves creatively.
|
||||||
|
|
||||||
|
## Frequently asked questions
|
||||||
|
We've covered all you need to know [here](https://docs.raspap.com/insiders/#frequently-asked-questions).
|
||||||
|
|
||||||
|
### Terms
|
||||||
|
See our [official project documentation](https://docs.raspap.com/insiders/#terms).
|
@ -1,10 +1,13 @@
|
|||||||
## How to contribute
|
## How to contribute
|
||||||
|
|
||||||
1. File an issue in the repository, using the bug tracker, describing the
|
1. Fork the project in your account and create a new branch: `your-great-feature`.
|
||||||
contribution you'd like to make. This will help us to get you started on the
|
2. Open an issue in the repository describing the feature contribution you'd like to make. This will help us get you started on the right foot.
|
||||||
right foot.
|
3. Commit changes in your feature branch.
|
||||||
2. Fork the project in your account and create a new branch:
|
4. Open a pull request and reference the initial issue in the pull request message.
|
||||||
`your-great-feature`.
|
|
||||||
3. Commit your changes in that branch.
|
### Coding standards
|
||||||
4. Open a pull request, and reference the initial issue in the pull request
|
This project follows the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style guidelines. There are many ways to check your code for PSR-2. An excellent tool is [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). The command line tool phpcs can be run against any single file. [Phing](https://www.phing.info/), a PHP build tool, integrates nicely with `phpcs` to automate PSR-2 checks across all source files in a project.
|
||||||
message.
|
|
||||||
|
### Development process
|
||||||
|
Development processes used by contributors to the project are described [on this page](https://docs.raspap.com/developers/). It does not endorse one over the other; rather it is meant to share two different approaches.
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
### Before submitting an issue
|
|
||||||
|
|
||||||
RaspAP is a project currently led by one developer (@billz) in his limited spare time. As a result, I'm not able to respond to every troubleshooting request in a timely manner. If your issue is of a general nature (for example, "Is it possible to do 'x' with my RPi?") and not directly related to a defect with this project, try searching the official Raspberry Pi forums (https://www.raspberrypi.org/forums/) or Raspberry Pi on Stack Exchange (https://raspberrypi.stackexchange.com/). Chances are your question has been discussed and answered before.
|
|
||||||
|
|
||||||
In most cases, RaspAP functions very well "out of the box" on fresh installs of the latest Raspbian distribution (currently Stretch; the Lite version is recommended) on recent hardware like the RPi 3 Model B. Alternate hardware platforms such as the Banana Pi and operating systems other than Raspbian are not supported. If you have installed other software packages on top of RaspAP, particularly those related to networking such as TOR or OpenVPN, please test RaspAP first on a fresh install before reporting an issue.
|
|
||||||
|
|
||||||
The FAQs have answers to many common issues. Kindly check this before creating a new issue https://github.com/billz/raspap-webgui/wiki/FAQs
|
|
||||||
|
|
||||||
If, after searching these community forums and consulting the FAQ, your issue still persists please provide as much detailed information as possible. Incomplete issue reports will not be considered.
|
|
||||||
|
|
||||||
### Subject of the issue
|
|
||||||
Describe your issue here.
|
|
||||||
|
|
||||||
### Your environment
|
|
||||||
* Raspberry Pi hardware (examples: Pi 3 Model B, Pi 2 Model B, Pi 1 Model B+, Pi Zero)
|
|
||||||
* Raspbian version (examples: Stretch Lite, Jessie)
|
|
||||||
* RaspAP Quick Install or Manual setup?
|
|
||||||
* Other software or services running with RaspAP?
|
|
||||||
|
|
||||||
### Steps to reproduce
|
|
||||||
Tell us how to reproduce this issue.
|
|
||||||
|
|
||||||
### Expected behavior
|
|
||||||
Tell us what should happen.
|
|
||||||
|
|
||||||
### Actual behavior
|
|
||||||
Tell us what happens instead.
|
|
254
README.md
@ -1,195 +1,177 @@
|
|||||||
![](http://i.imgur.com/xeKD93p.png)
|
![](https://i.imgur.com/xeKD93p.png)
|
||||||
# `$ raspap-webgui` [![Release 1.4.1](https://img.shields.io/badge/Release-1.4.1-green.svg)](https://github.com/billz/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi)
|
[![Release 2.9.6](https://img.shields.io/badge/release-v2.9.6-green)](https://github.com/raspap/raspap-webgui/releases) [![Awesome](https://awesome.re/badge.svg)](https://github.com/thibmaek/awesome-raspberry-pi) [![Join Insiders](https://img.shields.io/static/v1?label=Join%20Insiders&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/RaspAP) [![Build Status](https://app.travis-ci.com/RaspAP/raspap-webgui.svg?branch=master)](https://app.travis-ci.com/RaspAP/raspap-webgui) [![Crowdin](https://badges.crowdin.net/raspap/localized.svg)](https://crowdin.com/project/raspap) [![Twitter URL](https://img.shields.io/twitter/url?label=%40RaspAP&logoColor=%23d8224c&url=https%3A%2F%2Ftwitter.com%2Frasp_ap)](https://twitter.com/rasp_ap) [![Subreddit subscribers](https://img.shields.io/reddit/subreddit-subscribers/RaspAP?style=social)](https://www.reddit.com/r/RaspAP/) [![Join the chat at https://app.gitter.im/#/room/#RaspAP:gitter.im](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://app.gitter.im/#/room/#RaspAP:gitter.im)
|
||||||
|
|
||||||
A simple, responsive web interface to control wifi, hostapd and related services on the Raspberry Pi.
|
RaspAP is feature-rich wireless router software that _just works_ on many popular [Debian-based devices](#supported-operating-systems), including the Raspberry Pi. Our popular [Quick installer](#quick-installer) creates a known-good default configuration for all current Raspberry Pis with onboard wireless. A fully responsive, mobile-ready interface gives you control over the relevant services and networking options. Advanced DHCP settings, WireGuard and OpenVPN support, [SSL certificates](https://docs.raspap.com/ssl-quick/), security audits, [captive portal integration](https://docs.raspap.com/captive/), themes and [multilingual options](https://docs.raspap.com/translations/) are included.
|
||||||
|
|
||||||
This project was inspired by a [**blog post**](http://sirlagz.net/2013/02/06/script-web-configuration-page-for-raspberry-pi/) by SirLagz about using a web page rather than ssh to configure wifi and hostapd settings on the Raspberry Pi. I began by prettifying the UI by wrapping it in [**SB Admin 2**](https://github.com/BlackrockDigital/startbootstrap-sb-admin-2), a Bootstrap based admin theme. Since then, the project has evolved to include greater control over many aspects of a networked RPi, better security, authentication, a Quick Installer, support for themes and more. RaspAP has been featured on sites such as [Instructables](http://www.instructables.com/id/Raspberry-Pi-As-Completely-Wireless-Router/), [Adafruit](https://blog.adafruit.com/2016/06/24/raspap-wifi-configuration-portal-piday-raspberrypi-raspberry_pi/), [Raspberry Pi Weekly](https://www.raspberrypi.org/weekly/commander/) and [Awesome Raspberry Pi](https://project-awesome.org/thibmaek/awesome-raspberry-pi) and implemented in countless projects.
|
RaspAP has been featured on sites such as [Instructables](http://www.instructables.com/id/Raspberry-Pi-As-Completely-Wireless-Router/), [Adafruit](https://blog.adafruit.com/2016/06/24/raspap-wifi-configuration-portal-piday-raspberrypi-raspberry_pi/), [Raspberry Pi Weekly](https://www.raspberrypi.org/weekly/commander/) and [Awesome Raspberry Pi](https://project-awesome.org/thibmaek/awesome-raspberry-pi) and implemented in countless projects.
|
||||||
|
|
||||||
We'd be curious to hear about how you use this with your own RPi-powered projects. Until then, here are some screenshots:
|
We hope you enjoy using RaspAP as much as we do creating it. Tell us how you use this with [your own projects](https://github.com/raspap/raspap-awesome).
|
||||||
|
|
||||||
![](https://i.imgur.com/lQ57jVg.png)
|
![](https://i.imgur.com/uhBFoOB.png)
|
||||||
![](https://i.imgur.com/jFDMEy6.png)
|
![](https://i.imgur.com/EiIpdOS.gif)
|
||||||
![](https://i.imgur.com/ck0XS8P.png)
|
![](https://i.imgur.com/eCjUS1H.gif)
|
||||||
![](https://i.imgur.com/Vaej8Xv.png)
|
![](https://i.imgur.com/5FT2BcS.gif)
|
||||||
![](https://i.imgur.com/iNuMMip.png)
|
![](https://i.imgur.com/RKaBFrZ.gif)
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
- [Prerequisites](#prerequisites)
|
- [Prerequisites](#prerequisites)
|
||||||
- [Quick installer](#quick-installer)
|
- [Quick installer](#quick-installer)
|
||||||
|
- [Join Insiders](#join-insiders)
|
||||||
|
- [WireGuard support](#wireguard-support)
|
||||||
|
- [OpenVPN support](#openvpn-support)
|
||||||
|
- [Ad Blocking](#ad-blocking)
|
||||||
|
- [Bridged AP](#bridged-ap)
|
||||||
- [Simultaneous AP and Wifi client](#simultaneous-ap-and-wifi-client)
|
- [Simultaneous AP and Wifi client](#simultaneous-ap-and-wifi-client)
|
||||||
- [Support us](#support-us)
|
|
||||||
- [Manual installation](#manual-installation)
|
- [Manual installation](#manual-installation)
|
||||||
|
- [802.11ac 5GHz support](#80211ac-5ghz-support)
|
||||||
|
- [Supported operating systems](#supported-operating-systems)
|
||||||
- [Multilingual support](#multilingual-support)
|
- [Multilingual support](#multilingual-support)
|
||||||
- [Optional services](#optional-services)
|
- [HTTPS support](#https-support)
|
||||||
- [How to contribute](#how-to-contribute)
|
- [How to contribute](#how-to-contribute)
|
||||||
|
- [Reporting issues](#reporting-issues)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
Start with a clean install of the [latest release of Raspbian](https://www.raspberrypi.org/downloads/raspbian/) (currently Stretch). Raspbian Stretch Lite is recommended.
|
Start with a clean install of the [latest release of Raspberry Pi OS Lite](https://www.raspberrypi.com/software/operating-systems/). Both the 32- and 64-bit Lite versions are supported. The Raspberry Pi OS desktop distro is [unsupported](https://docs.raspap.com/faq/#distros).
|
||||||
|
|
||||||
1. Update Raspbian, including the kernel and firmware, followed by a reboot:
|
1. Update Raspbian, including the kernel and firmware, followed by a reboot:
|
||||||
```
|
```
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get dist-upgrade
|
sudo apt-get full-upgrade
|
||||||
sudo reboot
|
sudo reboot
|
||||||
```
|
```
|
||||||
2. Set the WiFi country in raspi-config's **Localisation Options**: `sudo raspi-config`
|
2. Set the "WLAN country" option in `raspi-config`'s **Localisation Options**: `sudo raspi-config`
|
||||||
|
|
||||||
3. If you have an older Raspberry Pi without an onboard WiFi chipset, the [**Edimax Wireless 802.11b/g/n nano USB adapter**](https://www.edimax.com/edimax/merchandise/merchandise_detail/data/edimax/global/wireless_adapters_n150/ew-7811un) is an excellent option – it's small, cheap and has good driver support.
|
3. If you have a device without an onboard wireless chipset, the [**Edimax Wireless 802.11b/g/n nano USB adapter**](https://www.edimax.com/edimax/merchandise/merchandise_detail/data/edimax/global/wireless_adapters_n150/ew-7811un) is an excellent option – it's small, cheap and has good driver support.
|
||||||
|
|
||||||
With the prerequisites done, you can proceed with either the Quick installer or Manual installation steps below.
|
With the prerequisites done, you can proceed with either the Quick installer or Manual installation steps below.
|
||||||
|
|
||||||
## Quick installer
|
## Quick installer
|
||||||
Install RaspAP from your RaspberryPi's shell prompt:
|
Install RaspAP from your device's shell prompt:
|
||||||
```sh
|
```sh
|
||||||
wget -q https://git.io/voEUQ -O /tmp/raspap && bash /tmp/raspap
|
curl -sL https://install.raspap.com | bash
|
||||||
```
|
```
|
||||||
The installer will complete the steps in the manual installation (below) for you.
|
The [installer](https://docs.raspap.com/quick/) will complete the steps in the manual installation (below) for you.
|
||||||
|
|
||||||
After the reboot at the end of the installation the wireless network will be
|
After the reboot at the end of the installation the wireless network will be
|
||||||
configured as an access point as follows:
|
configured as an access point as follows:
|
||||||
* IP address: 10.3.141.1
|
* IP address: 10.3.141.1
|
||||||
* Username: admin
|
* Username: admin
|
||||||
* Password: secret
|
* Password: secret
|
||||||
* DHCP range: 10.3.141.50 to 10.3.141.255
|
* DHCP range: 10.3.141.50 — 10.3.141.254
|
||||||
* SSID: `raspi-webgui`
|
* SSID: `raspi-webgui`
|
||||||
* Password: ChangeMe
|
* Password: ChangeMe
|
||||||
|
|
||||||
|
**Note:** As the name suggests, the Quick Installer is a great way to quickly setup a new AP. However, it does not automagically detect the unique configuration of your system. Best results are obtained by connecting to ethernet (`eth0`) or as a WiFi client, also known as managed mode, with `wlan0`. For the latter, refer to [this FAQ](https://docs.raspap.com/faq/#headless). Special instructions for the Pi Zero W are [available here](https://docs.raspap.com/ap-sta/).
|
||||||
|
|
||||||
|
Please [read this](https://docs.raspap.com/issues/) before reporting an issue.
|
||||||
|
|
||||||
|
## Join Insiders
|
||||||
|
[![](https://i.imgur.com/eml7k0b.png)](https://github.com/sponsors/RaspAP/)
|
||||||
|
|
||||||
|
RaspAP is free software, but powered by _your_ support. If you find RaspAP useful for your personal or commercial projects, [become an Insider](https://github.com/sponsors/RaspAP/) and get early access to [exclusive features](https://docs.raspap.com/insiders/#exclusive-features) in the [Insiders Edition](https://docs.raspap.com/insiders/).
|
||||||
|
|
||||||
|
A tangible side benefit of sponsorship is that **Insiders** are able to help _steer future development of RaspAP_. This is done through Insiders' team access to discussions, feature requests, issues and more in the private GitHub repository.
|
||||||
|
|
||||||
|
## WireGuard support
|
||||||
|
|
||||||
|
![](https://i.imgur.com/5YDv37e.png)
|
||||||
|
|
||||||
|
WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be considerably more performant than OpenVPN, and is generally regarded as the most secure, easiest to use, and simplest VPN solution for modern Linux distributions.
|
||||||
|
|
||||||
|
WireGuard may be optionally installed by the [Quick Installer](https://docs.raspap.com/quick/). Once this is done, you can manage local (server) settings, create a peer configuration and control the `wg-quick` service with RaspAP.
|
||||||
|
|
||||||
|
Details are [provided here](https://docs.raspap.com/wireguard/).
|
||||||
|
|
||||||
|
## OpenVPN support
|
||||||
|
|
||||||
|
![](https://i.imgur.com/ta7tCon.png)
|
||||||
|
|
||||||
|
OpenVPN may be optionally installed by the Quick Installer. Once this is done, you can [manage client configurations](https://docs.raspap.com/openvpn/) and the `openvpn-client` service with RaspAP.
|
||||||
|
|
||||||
|
To configure an OpenVPN client, upload a valid .ovpn file and, optionally, specify your login credentials. RaspAP will store your client configuration and add firewall rules to forward traffic from OpenVPN's `tun0` interface to your configured wireless interface.
|
||||||
|
|
||||||
|
See our [OpenVPN documentation](https://docs.raspap.com/openvpn/) for more information.
|
||||||
|
|
||||||
|
|
||||||
|
## Ad Blocking
|
||||||
|
This feature uses DNS blacklisting to block requests for ads, trackers and other undesirable hosts. To enable ad blocking, simply respond to the prompt during the installation. As a beta release, we encourage testing and feedback from users of RaspAP.
|
||||||
|
|
||||||
|
Details are [provided here](https://docs.raspap.com/adblock/).
|
||||||
|
|
||||||
|
## Bridged AP
|
||||||
|
By default RaspAP configures a routed AP for your clients to connect to. A bridged AP configuration is also possible. Slide the **Bridged AP mode** toggle under the **Advanced** tab of **Configure hotspot**, then save and restart the hotspot.
|
||||||
|
|
||||||
|
**Note:** In bridged mode, all routing capabilities are handled by your upstream router. Because your router assigns IP addresses to your device's hotspot and its clients, you might not be able to reach the RaspAP web interface from the default `10.3.141.1` address. Instead use your RPi's hostname followed by `.local` to access the RaspAP web interface. With Raspbian default settings, this should look like `raspberrypi.local`. Alternate methods are [discussed here](https://www.raspberrypi.org/documentation/remote-access/ip-address.md).
|
||||||
|
|
||||||
|
More information on Bridged AP mode is provided [in our documentation](https://docs.raspap.com/bridged/).
|
||||||
|
|
||||||
## Simultaneous AP and Wifi client
|
## Simultaneous AP and Wifi client
|
||||||
RaspAP lets you easily create an AP with a Wifi client configuration (also known as managed mode). When configured as a WiFi client, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart.
|
RaspAP lets you create an AP with a Wifi client configuration, often called [AP-STA mode](https://docs.raspap.com/ap-sta/). With your system configured in managed mode, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart.
|
||||||
|
|
||||||
![](https://i.imgur.com/4JkK2a5.png)
|
**Note:** This option is disabled until you configure your system as a wireless client. For a device operating in [managed mode](https://docs.raspap.com/faq/#headless) without an `eth0` connection, this configuration must be enabled [_before_ a reboot](https://docs.raspap.com/ap-sta/).
|
||||||
|
|
||||||
## Support us
|
|
||||||
|
|
||||||
RaspAP is free software, but powered by your support. If you find RaspAP useful for your personal projects, please consider making a small donation. We believe strongly about creating high quality, intuitive software for the Raspberry Pi, as well as the importance of keeping it maintained.
|
|
||||||
|
|
||||||
[![Beerpay](https://beerpay.io/billz/raspap-webgui/badge.svg?style=flat)](https://beerpay.io/billz/raspap-webgui)
|
|
||||||
|
|
||||||
## Manual installation
|
## Manual installation
|
||||||
These steps apply to the latest release of Raspbian (currently [Stretch](https://www.raspberrypi.org/downloads/raspbian/)). Notes for previously released versions are provided, where applicable. Start off by installing git, lighttpd, php7, hostapd and dnsmasq.
|
Detailed manual setup instructions are provided [on our documentation site](https://docs.raspap.com/manual/).
|
||||||
```sh
|
|
||||||
sudo apt-get install git lighttpd php7.0-cgi hostapd dnsmasq vnstat
|
|
||||||
```
|
|
||||||
**Note:** for Raspbian Jessie and Wheezy, replace `php7.0-cgi` with `php5-cgi`. After that, enable PHP for lighttpd and restart it for the settings to take effect.
|
|
||||||
```sh
|
|
||||||
sudo lighttpd-enable-mod fastcgi-php
|
|
||||||
sudo service lighttpd restart
|
|
||||||
```
|
|
||||||
Now comes the fun part. For security reasons, the `www-data` user which lighttpd runs under is not allowed to start or stop daemons, or run commands like ifdown and ifup, all of which we want our page to do.
|
|
||||||
So what I have done is added the `www-data` user to the sudoers file, but with restrictions on what commands the user can run. Add the following to the end of `/etc/sudoers`:
|
|
||||||
|
|
||||||
```sh
|
## 802.11ac 5GHz support
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/ifdown
|
RaspAP provides an 802.11ac wireless mode option for supported hardware (currently the RPi 3B+/4 and compatible Orange Pi models) and wireless regulatory domains. See [this FAQ](https://docs.raspap.com/faq/#80211ac) for more information.
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/ifup
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cat /etc/wpa_supplicant/wpa_supplicant.conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cat /etc/wpa_supplicant/wpa_supplicant-wlan[0-9].conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant.conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant-wlan[0-9].conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] scan_results
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] scan
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] reconfigure
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/init.d/hostapd start
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/init.d/hostapd stop
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/init.d/dnsmasq start
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/init.d/dnsmasq stop
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/dhcpddata /etc/dnsmasq.conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/shutdown -h now
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/reboot
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/ip link set wlan[0-9] down
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/ip link set wlan[0-9] up
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/sbin/ip -s a f label wlan[0-9]
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/bin/cp /etc/raspap/networking/dhcpcd.conf /etc/dhcpcd.conf
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/raspap/hostapd/enablelog.sh
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/raspap/hostapd/disablelog.sh
|
|
||||||
www-data ALL=(ALL) NOPASSWD:/etc/raspap/hostapd/servicestart.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Once those modifications are done, git clone the files to `/var/www/html`.
|
## Supported operating systems
|
||||||
**Note:** for older versions of Raspbian (before Jessie, May 2016) use
|
RaspAP was originally made for Raspbian, but now also installs on the following Debian-based distros.
|
||||||
`/var/www` instead.
|
|
||||||
```sh
|
|
||||||
sudo rm -rf /var/www/html
|
|
||||||
sudo git clone https://github.com/billz/raspap-webgui /var/www/html
|
|
||||||
```
|
|
||||||
Set the files ownership to `www-data` user.
|
|
||||||
```sh
|
|
||||||
sudo chown -R www-data:www-data /var/www/html
|
|
||||||
```
|
|
||||||
Move the RaspAP configuration file to the correct location
|
|
||||||
```sh
|
|
||||||
sudo mkdir /etc/raspap
|
|
||||||
sudo mv /var/www/html/raspap.php /etc/raspap/
|
|
||||||
sudo chown -R www-data:www-data /etc/raspap
|
|
||||||
```
|
|
||||||
Move the HostAPD logging scripts to the correct location
|
|
||||||
```sh
|
|
||||||
sudo mkdir /etc/raspap/hostapd
|
|
||||||
sudo mv /var/www/html/installers/*log.sh /etc/raspap/hostapd
|
|
||||||
```
|
|
||||||
Add the following lines to `/etc/rc.local` before `exit 0`.
|
|
||||||
```sh
|
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward #RASPAP
|
|
||||||
iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP
|
|
||||||
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE #RASPAP
|
|
||||||
```
|
|
||||||
Force a reload of new settings in `/etc/rc.local`.
|
|
||||||
```sh
|
|
||||||
sudo systemctl restart rc-local.service
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
```
|
|
||||||
Unmask and enable the hostapd service.
|
|
||||||
```sh
|
|
||||||
sudo systemctl unmask hostapd.service
|
|
||||||
sudo systemctl enable hostapd.service
|
|
||||||
```
|
|
||||||
Reboot and it should be up and running!
|
|
||||||
```sh
|
|
||||||
sudo reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
The default username is 'admin' and the default password is 'secret'.
|
| Distribution | Release | Architecture | Support |
|
||||||
|
|---|:---:|:---:|:---:|
|
||||||
|
| Raspberry Pi OS | (32-bit) Lite Bullseye | ARM | Official |
|
||||||
|
| Raspberry Pi OS | (64-bit) Lite Bullseye | ARM | Official |
|
||||||
|
| Armbian | Bullseye | [ARM](https://docs.armbian.com/#supported-socs) | Official |
|
||||||
|
| Debian | Bullseye | ARM / x86_64 | Beta |
|
||||||
|
| Ubuntu | 18.04 LTS / 19.10 | ARM / x86_64 | Beta |
|
||||||
|
|
||||||
|
![](https://i.imgur.com/luiyYNw.png)
|
||||||
|
|
||||||
|
We find Armbian particularly well-suited for this project. Please note that "supported" is not a guarantee. If you are able to improve support for your preferred distro, we encourage you to [actively contribute](#how-to-contribute) to the project.
|
||||||
|
|
||||||
## Multilingual support
|
## Multilingual support
|
||||||
RaspAP uses [GNU Gettext](https://www.gnu.org/software/gettext/) to manage multilingual messages. In order to use RaspAP with one of our supported translations, you must configure a corresponding language package on your RPi. To list languages currently installed on your system, use `locale -a` at the shell prompt. To generate new locales, run `sudo dpkg-reconfigure locales` and select any other desired locales. Details are provided on our [wiki](https://github.com/billz/raspap-webgui/wiki/Translations#raspap-in-your-language).
|
RaspAP uses [GNU Gettext](https://www.gnu.org/software/gettext/) to manage multilingual messages. In order to use RaspAP with one of our supported translations, you must configure a corresponding language package on your RPi. To list languages currently installed on your system, use `locale -a` at the shell prompt. To generate new locales, run `sudo dpkg-reconfigure locales` and select any other desired locales. Details are provided on our [documentation site](https://docs.raspap.com/translations/).
|
||||||
|
|
||||||
The following translations are currently maintained by the project:
|
See this list of [supported languages](https://docs.raspap.com/translations/#supported-languages) that are actively maintained by volunteer translators. If your language is not supported, why not [contribute a translation](https://docs.raspap.com/translations/#contributing-to-a-translation)? Contributors will receive credit as the original translators.
|
||||||
|
|
||||||
- Deutsch
|
## HTTPS support
|
||||||
- Français
|
The Quick Installer may be used to [generate SSL certificates](https://docs.raspap.com/ssl-quick/) with `mkcert`. The installer automates the manual steps [described here](https://docs.raspap.com/ssl-manual/), including configuring lighttpd with SSL support.
|
||||||
- Italiano
|
|
||||||
- Português
|
|
||||||
- Svenska
|
|
||||||
- Nederlands
|
|
||||||
- 简体中文 (Chinese Simplified)
|
|
||||||
- Čeština
|
|
||||||
- Русский
|
|
||||||
- Español
|
|
||||||
- Finnish
|
|
||||||
- Sinhala
|
|
||||||
|
|
||||||
If your language is not in the list above, why not [contribute a translation](https://github.com/billz/raspap-webgui/wiki/Translations#contributing-a-translation)? Contributors will receive credit as the original translators.
|
Simply append the `-c` or `--cert` option to the Quick Installer, like so:
|
||||||
|
|
||||||
## Optional services
|
|
||||||
OpenVPN and TOR are two additional services that run perfectly well on the RPi, and are a nice way to extend the usefulness of your WiFi router. I've started on interfaces to administer these services. Not everyone will need them, so for the moment they are disabled by default. You can enable them by changing these options in `/var/www/html/includes/config.php`:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Optional services, set to true to enable.
|
curl -sL https://install.raspap.com | bash -s -- --cert
|
||||||
define('RASPI_OPENVPN_ENABLED', false );
|
|
||||||
define('RASPI_TORPROXY_ENABLED', false );
|
|
||||||
```
|
```
|
||||||
Please note that these are only UI's for now. If there's enough interest I'll complete the funtionality for these optional admin screens.
|
|
||||||
|
**Note**: this only installs mkcert and generates an SSL certificate with the input you provide. It does *not* (re)install RaspAP.
|
||||||
|
|
||||||
|
More information on SSL certificates and HTTPS support is available [in our documentation](https://docs.raspap.com/ssl-quick/).
|
||||||
|
|
||||||
## How to contribute
|
## How to contribute
|
||||||
|
1. Fork the project in your account and create a new branch: `your-great-feature`.
|
||||||
|
2. Open an issue in the repository describing the feature contribution you'd like to make.
|
||||||
|
3. Commit changes in your feature branch.
|
||||||
|
4. Open a pull request and reference the initial issue in the pull request message.
|
||||||
|
|
||||||
1. File an issue in the repository describing the contribution you'd like to make. This will help us get you started on the
|
Find out more about our [coding style guidelines and recommended tools](CONTRIBUTING.md).
|
||||||
right foot.
|
|
||||||
2. Fork the project in your account and create a new branch: `your-great-feature`.
|
|
||||||
3. Commit your changes in that branch.
|
|
||||||
4. Open a pull request, and reference the initial issue in the pull request message.
|
|
||||||
|
|
||||||
This project follows the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style guidelines. There are many ways to check your code for PSR-2. An excellent tool is [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). The command line tool `phpcs` can be run against any single file. [Phing](https://www.phing.info/), a PHP build tool, integrates nicely with `phpcs` to automate PSR-2 checks across all source files in a project.
|
## Reporting issues
|
||||||
|
Please [read this](https://docs.raspap.com/issues/) before reporting a bug.
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
### Code Contributors
|
||||||
|
This project exists thanks to all the awesome people who [contribute](CONTRIBUTING.md) their time and expertise.
|
||||||
|
|
||||||
|
<a href="https://github.com/raspap/raspap-webgui/graphs/contributors"><img src="https://opencollective.com/raspap/contributors.svg?width=890&button=false" /></a>
|
||||||
|
|
||||||
|
### Financial Contributors
|
||||||
|
Development of RaspAP is made possible thanks to a sponsorware release model. This means that new features are first exclusively released to sponsors as part of [**Insiders**](https://github.com/sponsors/RaspAP).
|
||||||
|
|
||||||
|
Learn more about [how sponsorship works](https://docs.raspap.com/insiders/#how-sponsorship-works), and how easy it is to get access to Insiders.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
See the [LICENSE](./LICENSE) file.
|
See the [LICENSE](./LICENSE) file.
|
||||||
|
27
SECURITY.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
The RaspAP team and community take all security vulnerabilities seriously. This document outlines security procedures and general policies for the RaspAP open source projects as found on https://github.com/RaspAP/.
|
||||||
|
If you believe you have found a security vulnerability in any RaspAP-owned repository, please report it to us as described below.
|
||||||
|
|
||||||
|
## Reporting a vulnerability in RaspAP
|
||||||
|
|
||||||
|
Thank you for improving the security of our open source software.
|
||||||
|
We appreciate your efforts and responsible disclosure, and will make every effort to acknowledge your contributions.
|
||||||
|
|
||||||
|
Please report (suspected) security vulnerabilities to [security@raspap.com](mailto:security@raspap.com). The requested information listed below will help us better understand the nature and scope of the possible issue:
|
||||||
|
|
||||||
|
1. Type of issue (eg. shell exploit, cross-site scripting, etc.)
|
||||||
|
2. Full paths of source file(s) related to the manifestation of the issue
|
||||||
|
3. The location of the affected source code (tag/branch/commit or direct URL)
|
||||||
|
4. Any special configuration required to reproduce the issue
|
||||||
|
5. Step-by-step instructions to reproduce the issue
|
||||||
|
6. Proof-of-concept or exploit code (if possible)
|
||||||
|
7. Impact of the issue, including how an attacker might exploit the issue
|
||||||
|
|
||||||
|
This information will help us triage your report more quickly.
|
||||||
|
|
||||||
|
You will receive a response from us within 48 hours. Developers may ask for additional information or clarity on your report.
|
||||||
|
If the issue is confirmed, we will release a patch as soon as possible depending on complexity, but historically within a few days.
|
||||||
|
|
||||||
|
## Third-party modules
|
||||||
|
Report security vulnerabilities in third-party modules to the person or team maintaining the module.
|
74
_layouts/default.html
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ site.lang | default: "en-US" }}">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<meta name="msapplication-config" content="/app/icons/browserconfig.xml">
|
||||||
|
<meta name="msapplication-TileColor" content="#b91d47">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/app/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/app/icons/favicon-16x16.png">
|
||||||
|
<link rel="icon" type="image/png" href="/app/icons/favicon.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/app/icons/apple-touch-icon.png">
|
||||||
|
<link rel="mask-icon" href="/app/icons/safari-pinned-tab.svg" color="#b91d47">
|
||||||
|
<link rel="manifest" href="/app/icons/site.webmanifest">
|
||||||
|
|
||||||
|
{% seo %}
|
||||||
|
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<header>
|
||||||
|
<h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>
|
||||||
|
|
||||||
|
{% if site.logo %}
|
||||||
|
<img src="{{site.logo | relative_url}}" alt="Logo" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<p>{{ site.description | default: site.github.project_tagline }}</p>
|
||||||
|
|
||||||
|
{% if site.github.is_project_page %}
|
||||||
|
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ site.github.repository_nwo }}</small></a></p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.github.is_user_page %}
|
||||||
|
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.show_downloads %}
|
||||||
|
<ul class="downloads">
|
||||||
|
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
|
||||||
|
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
|
||||||
|
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</header>
|
||||||
|
<section>
|
||||||
|
|
||||||
|
{{ content }}
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<footer>
|
||||||
|
{% if site.github.is_project_page %}
|
||||||
|
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
|
||||||
|
{% endif %}
|
||||||
|
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
|
||||||
|
{% if site.google_analytics %}
|
||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
ga('create', '{{ site.google_analytics }}', 'auto');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
</body>
|
||||||
|
</html>
|
53
ajax/adblock/update_blocklist.php
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
|
||||||
|
if (isset($_POST['blocklist_id'])) {
|
||||||
|
$blocklist_id = escapeshellcmd($_POST['blocklist_id']);
|
||||||
|
|
||||||
|
switch ($blocklist_id) {
|
||||||
|
case "StevenBlack/hosts \(default\)":
|
||||||
|
$list_url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
|
||||||
|
$dest_file = "hostnames.txt";
|
||||||
|
break;
|
||||||
|
case "badmojr/1Hosts \(Mini\)":
|
||||||
|
$list_url = "https://badmojr.github.io/1Hosts/mini/hosts.txt";
|
||||||
|
$dest_file = "hostnames.txt";
|
||||||
|
break;
|
||||||
|
case "badmojr/1Hosts \(Lite\)":
|
||||||
|
$list_url = "https://badmojr.github.io/1Hosts/Lite/hosts.txt";
|
||||||
|
$dest_file = "hostnames.txt";
|
||||||
|
break;
|
||||||
|
case "badmojr/1Hosts \(Pro\)":
|
||||||
|
$list_url = "https://badmojr.github.io/1Hosts/Pro/hosts.txt";
|
||||||
|
$dest_file = "hostnames.txt";
|
||||||
|
break;
|
||||||
|
case "badmojr/1Hosts \(Xtra\)":
|
||||||
|
$list_url = "https://badmojr.github.io/1Hosts/Xtra/hosts.txt";
|
||||||
|
$dest_file = "hostnames.txt";
|
||||||
|
break;
|
||||||
|
case "oisd/big \(default\)":
|
||||||
|
$list_url = "https://big.oisd.nl/dnsmasq";
|
||||||
|
$dest_file = "domains.txt";
|
||||||
|
break;
|
||||||
|
case "oisd/small":
|
||||||
|
$list_url = "https://small.oisd.nl/dnsmasq";
|
||||||
|
$dest_file = "domains.txt";
|
||||||
|
break;
|
||||||
|
case "oisd/nsfw":
|
||||||
|
$list_url = "https://nsfw.oisd.nl/dnsmasq";
|
||||||
|
$dest_file = "domains.txt";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$blocklist = $list_url . $dest_file;
|
||||||
|
$dest = substr($dest_file, 0, strrpos($dest_file, "."));
|
||||||
|
|
||||||
|
exec("sudo /etc/raspap/adblock/update_blocklist.sh $list_url $dest_file " .RASPI_ADBLOCK_LISTPATH, $return);
|
||||||
|
$jsonData = ['return'=>$return,'list'=>$dest];
|
||||||
|
echo json_encode($jsonData);
|
||||||
|
} else {
|
||||||
|
$jsonData = ['return'=>2,'output'=>['Error getting data']];
|
||||||
|
echo json_encode($jsonData);
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
|
||||||
require_once '../../includes/config.php';
|
require_once '../../includes/config.php';
|
||||||
require_once RASPI_CONFIG.'/raspap.php';
|
|
||||||
|
|
||||||
session_start();
|
|
||||||
header('X-Frame-Options: DENY');
|
|
||||||
header("Content-Security-Policy: default-src 'none'; connect-src 'self'");
|
|
||||||
require_once '../../includes/authenticate.php';
|
|
||||||
|
|
||||||
|
|
||||||
$interface = filter_input(INPUT_GET, 'inet', FILTER_SANITIZE_SPECIAL_CHARS);
|
$interface = filter_input(INPUT_GET, 'inet', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
if (empty($interface)) {
|
if (empty($interface)) {
|
||||||
@ -28,8 +24,10 @@ if (strlen($interface) > IFNAMSIZ) {
|
|||||||
|
|
||||||
require_once './get_bandwidth_hourly.php';
|
require_once './get_bandwidth_hourly.php';
|
||||||
|
|
||||||
exec(sprintf('vnstat -i %s --json ', escapeshellarg($interface)), $jsonstdoutvnstat,
|
exec(
|
||||||
$exitcodedaily);
|
sprintf('vnstat -i %s --json ', escapeshellarg($interface)), $jsonstdoutvnstat,
|
||||||
|
$exitcodedaily
|
||||||
|
);
|
||||||
if ($exitcodedaily !== 0) {
|
if ($exitcodedaily !== 0) {
|
||||||
exit('vnstat error');
|
exit('vnstat error');
|
||||||
}
|
}
|
||||||
@ -38,25 +36,30 @@ $jsonobj = json_decode($jsonstdoutvnstat[0], true);
|
|||||||
$timeunits = filter_input(INPUT_GET, 'tu');
|
$timeunits = filter_input(INPUT_GET, 'tu');
|
||||||
if ($timeunits === 'm') {
|
if ($timeunits === 'm') {
|
||||||
// months
|
// months
|
||||||
$jsonData = $jsonobj['interfaces'][0]['traffic']['months'];
|
$jsonData = $jsonobj['interfaces'][0]['traffic']['month'];
|
||||||
} else {
|
} else {
|
||||||
// default: days
|
// default: days
|
||||||
$jsonData = $jsonobj['interfaces'][0]['traffic']['days'];
|
$jsonData = $jsonobj['interfaces'][0]['traffic']['day'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$datasizeunits = filter_input(INPUT_GET, 'dsu');
|
$datasizeunits = filter_input(INPUT_GET, 'dsu');
|
||||||
|
$dsu_factor = $datasizeunits == "mb" ? 1024 * 1024 : 1024;
|
||||||
header('X-Content-Type-Options: nosniff');
|
header('X-Content-Type-Options: nosniff');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo '[ ';
|
echo '[ ';
|
||||||
$firstelm = true;
|
$firstelm = true;
|
||||||
for ($i = count($jsonData) - 1; $i >= 0; --$i) {
|
for ($i = count($jsonData) - 1; $i >= 0; --$i) {
|
||||||
if ($timeunits === 'm') {
|
if ($timeunits === 'm') {
|
||||||
$dt = DateTime::createFromFormat('Y n', $jsonData[$i]['date']['year'].' '.
|
$dt = DateTime::createFromFormat(
|
||||||
$jsonData[$i]['date']['month']);
|
'Y n', $jsonData[$i]['date']['year'].' '.
|
||||||
|
$jsonData[$i]['date']['month']
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$dt = DateTime::createFromFormat('Y n j', $jsonData[$i]['date']['year'].' '.
|
$dt = DateTime::createFromFormat(
|
||||||
|
'Y n j', $jsonData[$i]['date']['year'].' '.
|
||||||
$jsonData[$i]['date']['month'].' '.
|
$jsonData[$i]['date']['month'].' '.
|
||||||
$jsonData[$i]['date']['day']);
|
$jsonData[$i]['date']['day']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($firstelm) {
|
if ($firstelm) {
|
||||||
@ -65,13 +68,8 @@ for ($i = count($jsonData) - 1; $i >= 0; --$i) {
|
|||||||
echo ',';
|
echo ',';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($datasizeunits == 'mb') {
|
$datasend = round($jsonData[$i]['tx'] / $dsu_factor, 0);
|
||||||
$datasend = round($jsonData[$i]['tx'] / 1024, 0);
|
$datareceived = round($jsonData[$i]['rx'] / $dsu_factor, 0);
|
||||||
$datareceived = round($jsonData[$i]['rx'] / 1024, 0);
|
|
||||||
} else {
|
|
||||||
$datasend = $jsonData[$i]['rx'];
|
|
||||||
$datareceived = $jsonData[$i]['rx'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($timeunits === 'm') {
|
if ($timeunits === 'm') {
|
||||||
echo '{ "date": "' , $dt->format('Y-m') , '", "rx": "' , $datareceived ,
|
echo '{ "date": "' , $dt->format('Y-m') , '", "rx": "' , $datareceived ,
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
|
||||||
if (filter_input(INPUT_GET, 'tu') == 'h') {
|
if (filter_input(INPUT_GET, 'tu') == 'h') {
|
||||||
|
|
||||||
header('X-Content-Type-Options: nosniff');
|
header('X-Content-Type-Options: nosniff');
|
||||||
@ -31,19 +34,19 @@ if (filter_input(INPUT_GET, 'tu') == 'h') {
|
|||||||
23 => array('date' => '23:00', 'rx' => 0, 'tx' => 0)
|
23 => array('date' => '23:00', 'rx' => 0, 'tx' => 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exec(sprintf('vnstat -i %s --json h', escapeshellarg($interface)), $jsonstdoutvnstat, $exitcodedaily);
|
exec(sprintf('vnstat -i %s --json h', escapeshellarg($interface)), $jsonstdoutvnstat, $exitcodedaily);
|
||||||
if ($exitcodedaily !== 0) {
|
if ($exitcodedaily !== 0) {
|
||||||
exit('vnstat error');
|
exit('vnstat error');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$datasizeunits = filter_input(INPUT_GET, 'dsu');
|
||||||
|
$dsu_factor = $datasizeunits == "mb" ? 1024 * 1024 : 1024;
|
||||||
|
|
||||||
$jsonobj = json_decode($jsonstdoutvnstat[0], true)['interfaces'][0];
|
$jsonobj = json_decode($jsonstdoutvnstat[0], true)['interfaces'][0];
|
||||||
$jsonData = $jsonobj['traffic']['hours'];
|
$jsonData = $jsonobj['traffic']['hour'];
|
||||||
for ($i = count($jsonData) - 1; $i >= 0; --$i) {
|
for ($i = count($jsonData) - 1; $i >= 0 && $i >= count($jsonData)-25; --$i) {
|
||||||
$data_template[$jsonData[$i]['id']]['rx'] = round($jsonData[$i]['rx'] / 1024, 0);
|
$data_template[$jsonData[$i]['time']['hour']]['rx'] = round($jsonData[$i]['rx'] / $dsu_factor, 0);
|
||||||
$data_template[$jsonData[$i]['id']]['tx'] = round($jsonData[$i]['tx'] / 1024, 0);
|
$data_template[$jsonData[$i]['time']['hour']]['tx'] = round($jsonData[$i]['tx'] / $dsu_factor, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
13
ajax/logging/clearlog.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['logfile'])) {
|
||||||
|
$logfile = escapeshellcmd($_POST['logfile']);
|
||||||
|
|
||||||
|
// truncate requested log file
|
||||||
|
exec("sudo truncate -s 0 $logfile", $return);
|
||||||
|
echo json_encode($return);
|
||||||
|
}
|
35
ajax/networking/do_sys_reset.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/session.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['csrf_token'])) {
|
||||||
|
if (csrfValidateRequest() && !CSRFValidate()) {
|
||||||
|
handleInvalidCSRFToken();
|
||||||
|
}
|
||||||
|
$return = 0;
|
||||||
|
$path = "../../config";
|
||||||
|
$configs = array(
|
||||||
|
array("src" => $path .'/hostapd.conf', "tmp" => "/tmp/hostapddata", "dest" => RASPI_HOSTAPD_CONFIG),
|
||||||
|
array("src" => $path .'/dhcpcd.conf', "tmp" => "/tmp/dhcpddata", "dest" => RASPI_DHCPCD_CONFIG),
|
||||||
|
array("src" => $path .'/090_wlan0.conf', "tmp" => "/tmp/dnsmasqdata", "dest" => RASPI_DNSMASQ_PREFIX.'wlan0.conf'),
|
||||||
|
array("src" => $path .'/090_raspap.conf', "tmp" => "/tmp/dnsmasqdata", "dest" => RASPI_DNSMASQ_PREFIX.'raspap.conf'),
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($configs as $config) {
|
||||||
|
try {
|
||||||
|
$tmp = file_get_contents($config["src"]);
|
||||||
|
file_put_contents($config["tmp"], $tmp);
|
||||||
|
system("sudo cp ".$config["tmp"]. " ".$config["dest"]);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$return = $e->getCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$jsonData = ['return'=>$return];
|
||||||
|
echo json_encode($jsonData);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
handleInvalidCSRFToken();
|
||||||
|
}
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
include_once('../../includes/config.php');
|
|
||||||
include_once('../../includes/functions.php');
|
|
||||||
|
|
||||||
if(isset($_POST['generate']) && isset($_POST['csrf_token']) && CSRFValidate()) {
|
|
||||||
$cnfNetworking = array_diff(scandir(RASPI_CONFIG_NETWORKING, 1),array('..','.'));
|
|
||||||
$cnfNetworking = array_combine($cnfNetworking,$cnfNetworking);
|
|
||||||
$strConfFile = "";
|
|
||||||
foreach($cnfNetworking as $index=>$file) {
|
|
||||||
if($index != "defaults") {
|
|
||||||
$cnfFile = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.$file);
|
|
||||||
if($cnfFile['static'] === 'true') {
|
|
||||||
$strConfFile .= "interface ".$cnfFile['interface']."\n";
|
|
||||||
$strConfFile .= "static ip_address=".$cnfFile['ip_address']."\n";
|
|
||||||
$strConfFile .= "static routers=".$cnfFile['routers']."\n";
|
|
||||||
$strConfFile .= "static domain_name_servers=".$cnfFile['domain_name_server']."\n";
|
|
||||||
} elseif($cnfFile['static'] === 'false' && $cnfFile['failover'] === 'true') {
|
|
||||||
$strConfFile .= "profile static_".$cnfFile['interface']."\n";
|
|
||||||
$strConfFile .= "static ip_address=".$cnfFile['ip_address']."\n";
|
|
||||||
$strConfFile .= "static routers=".$cnfFile['routers']."\n";
|
|
||||||
$strConfFile .= "static domain_name_servers=".$cnfFile['domain_name_server']."\n\n";
|
|
||||||
$strConfFile .= "interface ".$cnfFile['interface']."\n";
|
|
||||||
$strConfFile .= "fallback static_".$cnfFile['interface']."\n\n";
|
|
||||||
} else {
|
|
||||||
$strConfFile .= "#DHCP configured for ".$cnfFile['interface']."\n\n";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$strConfFile .= file_get_contents(RASPI_CONFIG_NETWORKING.'/'.$index)."\n\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(file_put_contents(RASPI_CONFIG_NETWORKING.'/dhcpcd.conf',$strConfFile)) {
|
|
||||||
exec('sudo /bin/cp /etc/raspap/networking/dhcpcd.conf /etc/dhcpcd.conf');
|
|
||||||
$output = ['return'=>0,'output'=>'Settings successfully applied'];
|
|
||||||
} else {
|
|
||||||
$output = ['return'=>2,'output'=>'Unable to write to apply settings'];
|
|
||||||
}
|
|
||||||
echo json_encode($output);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
|
||||||
exec("ls /sys/class/net | grep -v lo", $interfaces);
|
exec("ls /sys/class/net | grep -v lo", $interfaces);
|
||||||
echo json_encode($interfaces);
|
echo json_encode($interfaces);
|
||||||
?>
|
|
||||||
|
17
ajax/networking/get_channel.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
|
||||||
|
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
|
||||||
|
$arrConfig = array();
|
||||||
|
|
||||||
|
foreach ($hostapdconfig as $hostapdconfigline) {
|
||||||
|
if (strlen($hostapdconfigline) === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$arrLine = explode("=", $hostapdconfigline);
|
||||||
|
$arrConfig[$arrLine[0]]=$arrLine[1];
|
||||||
|
};
|
||||||
|
$channel = intval($arrConfig['channel']);
|
||||||
|
echo json_encode($channel);
|
43
ajax/networking/get_frequencies.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/locale.php';
|
||||||
|
|
||||||
|
if (isset($_POST['interface'])) {
|
||||||
|
|
||||||
|
define( 'NL80211_BAND_24GHZ', 0x1 );
|
||||||
|
define( 'NL80211_BAND_5GHZ', 0x2 );
|
||||||
|
$iface = escapeshellcmd($_POST['interface']);
|
||||||
|
$flags = 0;
|
||||||
|
|
||||||
|
// get physical device for selected interface
|
||||||
|
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);
|
||||||
|
$phy = $return[0];
|
||||||
|
|
||||||
|
// get frequencies supported by device
|
||||||
|
exec('iw '.$phy.' info | sed -rn "s/^.*\*\s([0-9]{4})\sMHz.*/\1/p"', $frequencies);
|
||||||
|
|
||||||
|
if (count(preg_grep('/^24[0-9]{2}/i', $frequencies)) >0) {
|
||||||
|
$flags += NL80211_BAND_24GHZ;
|
||||||
|
}
|
||||||
|
if (count(preg_grep('/^5[0-9]{3}/i', $frequencies)) >0) {
|
||||||
|
$flags += NL80211_BAND_5GHZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($flags) {
|
||||||
|
case NL80211_BAND_24GHZ:
|
||||||
|
$msg = sprintf(_("The selected interface (%s) has support for the 2.4 GHz wireless band only."), $iface);
|
||||||
|
break;
|
||||||
|
case NL80211_BAND_5GHZ:
|
||||||
|
$msg = sprintf(_("The selected interface (%s) has support for the 5 GHz wireless band only."), $iface);
|
||||||
|
break;
|
||||||
|
case NL80211_BAND_24GHZ | NL80211_BAND_5GHZ:
|
||||||
|
$msg = sprintf(_("The selected interface (%s) has support for both the 2.4 and 5 GHz wireless bands."), $iface);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$msg = sprintf(_("The selected interface (%s) does not support wireless mode operation."), $iface);
|
||||||
|
}
|
||||||
|
echo json_encode($msg);
|
||||||
|
}
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
include_once('../../includes/config.php');
|
|
||||||
include_once('../../includes/functions.php');
|
|
||||||
|
|
||||||
|
|
||||||
if(isset($_POST['interface']) && isset($_POST['csrf_token']) && CSRFValidate()) {
|
|
||||||
$int = preg_replace('/[^a-z0-9]/', '', $_POST['interface']);
|
|
||||||
if(!file_exists(RASPI_CONFIG_NETWORKING.'/'.$int.'.ini')) {
|
|
||||||
touch(RASPI_CONFIG_NETWORKING.'/'.$int.'.ini');
|
|
||||||
}
|
|
||||||
|
|
||||||
$intConfig = parse_ini_file(RASPI_CONFIG_NETWORKING.'/'.$int.'.ini');
|
|
||||||
$jsonData = ['return'=>1,'output'=>['intConfig'=>$intConfig]];
|
|
||||||
echo json_encode($jsonData);
|
|
||||||
|
|
||||||
// Todo - get dhcp lease information from `dhcpcd -U eth0` ? maybe ?
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$jsonData = ['return'=>2,'output'=>['Error getting data']];
|
|
||||||
echo json_encode($jsonData);
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
include_once('../../includes/functions.php');
|
|
||||||
|
|
||||||
if(isset($_POST['interface']) && isset($_POST['csrf_token']) && CSRFValidate()) {
|
require '../../includes/csrf.php';
|
||||||
|
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['interface'])) {
|
||||||
$int = preg_replace('/[^a-z0-9]/', '', $_POST['interface']);
|
$int = preg_replace('/[^a-z0-9]/', '', $_POST['interface']);
|
||||||
exec('ip a s '.$int, $intOutput, $intResult);
|
exec('ip a s '.$int, $intOutput, $intResult);
|
||||||
|
$intOutput = array_map('htmlentities', $intOutput);
|
||||||
$jsonData = ['return'=>$intResult,'output'=>$intOutput];
|
$jsonData = ['return'=>$intResult,'output'=>$intOutput];
|
||||||
echo json_encode($jsonData);
|
echo json_encode($jsonData);
|
||||||
} else {
|
} else {
|
||||||
$jsonData = ['return'=>2,'output'=>['Error getting data']];
|
$jsonData = ['return'=>2,'output'=>['Error getting data']];
|
||||||
echo json_encode($jsonData);
|
echo json_encode($jsonData);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
60
ajax/networking/get_netcfg.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
|
||||||
|
$interface = $_GET['iface'];
|
||||||
|
|
||||||
|
if (isset($interface)) {
|
||||||
|
// fetch dnsmasq.conf settings for interface
|
||||||
|
exec('cat '. escapeshellarg(RASPI_DNSMASQ_PREFIX.$interface.'.conf'), $return);
|
||||||
|
$conf = ParseConfig($return);
|
||||||
|
|
||||||
|
$dhcpdata['DHCPEnabled'] = empty($conf) ? false : true;
|
||||||
|
$arrRange = explode(",", $conf['dhcp-range']);
|
||||||
|
$dhcpdata['RangeStart'] = $arrRange[0];
|
||||||
|
$dhcpdata['RangeEnd'] = $arrRange[1];
|
||||||
|
$dhcpdata['RangeMask'] = $arrRange[2];
|
||||||
|
$dhcpdata['leaseTime'] = $arrRange[3];
|
||||||
|
$dhcpHost = $conf["dhcp-host"];
|
||||||
|
$dhcpHost = empty($dhcpHost) ? [] : $dhcpHost;
|
||||||
|
$dhcpdata['dhcpHost'] = is_array($dhcpHost) ? $dhcpHost : [ $dhcpHost ];
|
||||||
|
$upstreamServers = is_array($conf['server']) ? $conf['server'] : [ $conf['server'] ];
|
||||||
|
$dhcpdata['upstreamServersEnabled'] = empty($conf['server']) ? false: true;
|
||||||
|
$dhcpdata['upstreamServers'] = array_filter($upstreamServers);
|
||||||
|
preg_match('/([0-9]*)([a-z])/i', $dhcpdata['leaseTime'], $arrRangeLeaseTime);
|
||||||
|
$dhcpdata['leaseTime'] = $arrRangeLeaseTime[1];
|
||||||
|
$dhcpdata['leaseTimeInterval'] = $arrRangeLeaseTime[2];
|
||||||
|
if (isset($conf['dhcp-option'])) {
|
||||||
|
$arrDns = explode(",", $conf['dhcp-option']);
|
||||||
|
if ($arrDns[0] == '6') {
|
||||||
|
if (count($arrDns) > 1) {
|
||||||
|
$dhcpdata['DNS1'] = $arrDns[1];
|
||||||
|
}
|
||||||
|
if (count($arrDns) > 2) {
|
||||||
|
$dhcpdata['DNS2'] = $arrDns[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fetch dhcpcd.conf settings for interface
|
||||||
|
$conf = file_get_contents(RASPI_DHCPCD_CONFIG);
|
||||||
|
preg_match('/^#\sRaspAP\s'.$interface.'\s.*?(?=\s*+$)/ms', $conf, $matched);
|
||||||
|
preg_match('/metric\s(\d*)/', $matched[0], $metric);
|
||||||
|
preg_match('/static\sip_address=(.*)/', $matched[0], $static_ip);
|
||||||
|
preg_match('/static\srouters=(.*)/', $matched[0], $static_routers);
|
||||||
|
preg_match('/static\sdomain_name_server=(.*)/', $matched[0], $static_dns);
|
||||||
|
preg_match('/fallback\sstatic_'.$interface.'/', $matched[0], $fallback);
|
||||||
|
preg_match('/(?:no)?gateway/', $matched[0], $gateway);
|
||||||
|
preg_match('/nohook\swpa_supplicant/', $matched[0], $nohook_wpa_supplicant);
|
||||||
|
$dhcpdata['Metric'] = $metric[1];
|
||||||
|
$dhcpdata['StaticIP'] = strpos($static_ip[1],'/') ? substr($static_ip[1], 0, strpos($static_ip[1],'/')) : $static_ip[1];
|
||||||
|
$dhcpdata['SubnetMask'] = cidr2mask($static_ip[1]);
|
||||||
|
$dhcpdata['StaticRouters'] = $static_routers[1];
|
||||||
|
$dhcpdata['StaticDNS'] = $static_dns[1];
|
||||||
|
$dhcpdata['FallbackEnabled'] = empty($fallback) ? false: true;
|
||||||
|
$dhcpdata['DefaultRoute'] = $gateway[0] == "gateway";
|
||||||
|
$dhcpdata['NoHookWPASupplicant'] = $nohook_wpa_supplicant[0] == "nohook wpa_supplicant";
|
||||||
|
|
||||||
|
echo json_encode($dhcpdata);
|
||||||
|
}
|
9
ajax/networking/get_wgcfg.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
|
||||||
|
// fetch wg client.conf
|
||||||
|
exec('sudo cat '. RASPI_WIREGUARD_PATH.'client.conf', $return);
|
||||||
|
echo implode(PHP_EOL,$return);
|
||||||
|
|
22
ajax/networking/get_wgkey.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
|
||||||
|
$entity = escapeshellcmd($_POST['entity']);
|
||||||
|
|
||||||
|
if (isset($entity)) {
|
||||||
|
|
||||||
|
// generate public/private key pairs for entity
|
||||||
|
$pubkey = RASPI_WIREGUARD_PATH.$entity.'-public.key';
|
||||||
|
$privkey = RASPI_WIREGUARD_PATH.$entity.'-private.key';
|
||||||
|
$pubkey_tmp = '/tmp/'.$entity.'-public.key';
|
||||||
|
$privkey_tmp = '/tmp/'.$entity.'-private.key';
|
||||||
|
|
||||||
|
exec("sudo wg genkey | tee $privkey_tmp | wg pubkey > $pubkey_tmp", $return);
|
||||||
|
$wgdata['pubkey'] = str_replace("\n",'',file_get_contents($pubkey_tmp));
|
||||||
|
exec("sudo mv $privkey_tmp $privkey", $return);
|
||||||
|
exec("sudo mv $pubkey_tmp $pubkey", $return);
|
||||||
|
|
||||||
|
echo json_encode($wgdata);
|
||||||
|
}
|
@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
include_once('../../includes/config.php');
|
|
||||||
include_once('../../includes/functions.php');
|
|
||||||
if(isset($_POST['interface']) && isset($_POST['csrf_token']) && CSRFValidate()) {
|
|
||||||
$int = $_POST['interface'];
|
|
||||||
$cfg = [];
|
|
||||||
$file = $int.".ini";
|
|
||||||
$ip = $_POST[$int.'-ipaddress'];
|
|
||||||
$netmask = mask2cidr($_POST[$int.'-netmask']);
|
|
||||||
$dns1 = $_POST[$int.'-dnssvr'];
|
|
||||||
$dns2 = $_POST[$int.'-dnssvralt'];
|
|
||||||
|
|
||||||
|
|
||||||
$cfg['interface'] = $int;
|
|
||||||
$cfg['routers'] = $_POST[$int.'-gateway'];
|
|
||||||
$cfg['ip_address'] = $ip."/".$netmask;
|
|
||||||
$cfg['domain_name_server'] = $dns1." ".$dns2;
|
|
||||||
$cfg['static'] = $_POST[$int.'-static'];
|
|
||||||
$cfg['failover'] = $_POST[$int.'-failover'];
|
|
||||||
|
|
||||||
if(write_php_ini($cfg,RASPI_CONFIG_NETWORKING.'/'.$file)) {
|
|
||||||
$jsonData = ['return'=>0,'output'=>['Successfully Updated Network Configuration']];
|
|
||||||
} else {
|
|
||||||
$jsonData = ['return'=>1,'output'=>['Error saving network configuration to file']];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$jsonData = ['return'=>2,'output'=>'Unable to detect interface'];
|
|
||||||
}
|
|
||||||
echo json_encode($jsonData);
|
|
||||||
?>
|
|
93
ajax/networking/save_net_dev_config.php
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
Save settings of network devices (type, name, PW, APN ...)
|
||||||
|
|
||||||
|
Called by js saveNetDeviceSettings (App/js/custom.js)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['interface'])) {
|
||||||
|
$int = $_POST['interface'];
|
||||||
|
$cfg = [];
|
||||||
|
$file = $RASPI_MOBILEDATA_CONFIG;
|
||||||
|
$cfgfile="/etc/wvdial.conf";
|
||||||
|
if ( $int == "mobiledata") {
|
||||||
|
$cfg['pin'] = $_POST["pin-mobile"];
|
||||||
|
$cfg['apn'] = $_POST["apn-mobile"];
|
||||||
|
$cfg['apn_user'] = $_POST["apn-user-mobile"];
|
||||||
|
$cfg['apn_pw'] = $_POST["apn-pw-mobile"];
|
||||||
|
$cfg['router_user'] = $cfg['apn_user'] ;
|
||||||
|
$cfg['router_pw'] = $cfg['apn_pw'] ;
|
||||||
|
if (file_exists($cfgfile)) {
|
||||||
|
if($cfg["pin"] !== "") exec('sudo /bin/sed -i "s/CPIN=\".*\"/CPIN=\"'.$cfg["pin"].'\"/gi" '.$cfgfile);
|
||||||
|
if($cfg["apn"] !== "") exec('sudo /bin/sed -i "s/\"IP\"\,\".*\"/\"IP\"\,\"'.$cfg["apn"].'\"/gi" '.$cfgfile);
|
||||||
|
if($cfg["apn_user"] !== "") exec('sudo /bin/sed -i "s/^username = .*$/Username = '.$cfg["apn_user"].'/gi" '.$cfgfile);
|
||||||
|
if($cfg["apn_pw"] !== "") exec('sudo /bin/sed -i "s/^password = .*$/Password = '.$cfg["apn_pw"].'/gi" '.$cfgfile);
|
||||||
|
}
|
||||||
|
if (write_php_ini($cfg, RASPI_MOBILEDATA_CONFIG)) {
|
||||||
|
$jsonData = ['return'=>0,'output'=>['Successfully saved mobile data settings']];
|
||||||
|
} else {
|
||||||
|
$jsonData = ['return'=>1,'output'=>['Error saving mobile data settings']];
|
||||||
|
}
|
||||||
|
} else if ( preg_match("/netdevices/",$int)) {
|
||||||
|
if(!isset($_POST['opts']) ) {
|
||||||
|
$jsonData = ['return'=>0,'output'=>['No valid data to add/delete udev rule ']];
|
||||||
|
echo json_encode($jsonData);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
$opts=explode(" ",$_POST['opts'] );
|
||||||
|
$dev=$opts[0];
|
||||||
|
$vid=$_POST["int-vid-".$dev];
|
||||||
|
$pid=$_POST["int-pid-".$dev];
|
||||||
|
$mac=$_POST["int-mac-".$dev];
|
||||||
|
$name=trim($_POST["int-name-".$dev]);
|
||||||
|
// limit device name to letters and numbers. Total length max 20
|
||||||
|
$name=preg_replace("/[^a-z0-9]/", "", strtolower($name));
|
||||||
|
$name=substr($name, 0, min(strlen($name),20));
|
||||||
|
$type=$_POST["int-type-".$dev];
|
||||||
|
$newtype=$_POST["int-new-type-".$dev];
|
||||||
|
$udevfile=$_SESSION["udevrules"]["udev_rules_file"]; // default file /etc/udev/rules.d/80-net-devices.rules";
|
||||||
|
|
||||||
|
// find the rule prototype and prefix
|
||||||
|
$rule = "";
|
||||||
|
foreach($_SESSION["udevrules"]["network_devices"] as $devt) {
|
||||||
|
if($devt["type"]==$newtype) {
|
||||||
|
$rulenew = $devt["udev_rule"];
|
||||||
|
$prefix = $devt["name_prefix"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for an existing rule and delete lines with same MAC or same VID/PID
|
||||||
|
if (!empty($vid) && !empty($pid)) {
|
||||||
|
$rule = '^.*ATTRS{idVendor}==\"' . $vid . '\".*ATTRS{idProduct}==\"' . $pid . '\".*$';
|
||||||
|
exec('sudo sed -i "/'.$rule.'/Id" '.$udevfile); // clear all entries with this VID/PID
|
||||||
|
$rule = '^.*ATTRS{idProduct}==\"' . $pid . '\".*ATTRS{idVendor}==\"' . $vid . '\".*$';
|
||||||
|
exec('sudo sed -i "/'.$rule.'/Id" '.$udevfile); // clear all entries with this VID/PID
|
||||||
|
}
|
||||||
|
if (!empty($mac)) {
|
||||||
|
exec('sudo sed -i "/^.*'.$mac.'.*$/d" '.$udevfile); // clear all entries with same MAC
|
||||||
|
}
|
||||||
|
// create new entry
|
||||||
|
if ( ($type != $newtype) || !empty($name) ) { // new device type or new name
|
||||||
|
if (empty($name)) $name = $prefix."%n";
|
||||||
|
if (!empty($mac)) $rule = preg_replace("/\\\$MAC\\\$/i", $mac, $rulenew);
|
||||||
|
if (!empty($vid)) $rule = preg_replace("/\\\$IDVENDOR\\\$/i", $vid, $rule);
|
||||||
|
if (!empty($pid)) $rule = preg_replace("/\\\$IDPRODUCT\\\$/i", $pid, $rule);
|
||||||
|
if (!empty($name)) $rule = preg_replace("/\\\$DEVNAME\\\$/i",$name,$rule);
|
||||||
|
if (!empty($rule)) exec('echo \''.$rule.'\' | sudo /usr/bin/tee -a '.$udevfile);
|
||||||
|
}
|
||||||
|
$jsonData = ['return'=>0,'output'=>['Settings changed for device '.$dev. '<br>Changes will only be in effect after reconnecting the device' ] ];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$jsonData = ['return'=>1,'output'=>['Unknown network configuration']];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$jsonData = ['return'=>2,'output'=>'Unable to detect interface'];
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($jsonData);
|
23
ajax/networking/wifi_stations.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/defaults.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
require_once '../../includes/wifi_functions.php';
|
||||||
|
|
||||||
|
$networks = [];
|
||||||
|
$network = null;
|
||||||
|
$ssid = null;
|
||||||
|
|
||||||
|
knownWifiStations($networks);
|
||||||
|
nearbyWifiStations($networks, !isset($_REQUEST["refresh"]));
|
||||||
|
connectedWifiStations($networks);
|
||||||
|
sortNetworksByRSSI($networks);
|
||||||
|
foreach ($networks as $ssid => $network) $networks[$ssid]["ssidutf8"] = ssid2utf8( $ssid );
|
||||||
|
|
||||||
|
$connected = array_filter($networks, function($n) { return $n['connected']; } );
|
||||||
|
$known = array_filter($networks, function($n) { return !$n['connected'] && $n['configured']; } );
|
||||||
|
$nearby = array_filter($networks, function($n) { return !$n['configured']; } );
|
||||||
|
|
||||||
|
echo renderTemplate('wifi_stations', compact('networks', 'connected', 'known', 'nearby'), true);
|
27
ajax/openvpn/activate_ovpncfg.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['cfg_id'])) {
|
||||||
|
$ovpncfg_id = escapeshellcmd($_POST['cfg_id']);
|
||||||
|
$ovpncfg_client = RASPI_OPENVPN_CLIENT_PATH.$ovpncfg_id.'_client.conf';
|
||||||
|
$ovpncfg_login = RASPI_OPENVPN_CLIENT_PATH.$ovpncfg_id.'_login.conf';
|
||||||
|
|
||||||
|
// remove existing client config +login and symbolically link the selected one
|
||||||
|
system("sudo rm ".RASPI_OPENVPN_CLIENT_CONFIG, $return);
|
||||||
|
system("sudo ln -s $ovpncfg_client ".RASPI_OPENVPN_CLIENT_CONFIG, $return);
|
||||||
|
system("sudo rm ".RASPI_OPENVPN_CLIENT_LOGIN, $return);
|
||||||
|
system("sudo ln -s $ovpncfg_login ".RASPI_OPENVPN_CLIENT_LOGIN, $return);
|
||||||
|
|
||||||
|
// restart service
|
||||||
|
exec("sudo /bin/systemctl stop openvpn-client@client", $return);
|
||||||
|
sleep(1);
|
||||||
|
exec("sudo /bin/systemctl enable openvpn-client@client", $return);
|
||||||
|
sleep(1);
|
||||||
|
exec("sudo /bin/systemctl start openvpn-client@client", $return);
|
||||||
|
|
||||||
|
echo json_encode($return);
|
||||||
|
}
|
||||||
|
|
14
ajax/openvpn/del_ovpncfg.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['cfg_id'])) {
|
||||||
|
$ovpncfg_id = escapeshellcmd($_POST['cfg_id']);
|
||||||
|
$ovpncfg_files = pathinfo(RASPI_OPENVPN_CLIENT_LOGIN, PATHINFO_DIRNAME).'/'.$ovpncfg_id.'_*.conf';
|
||||||
|
exec("sudo rm $ovpncfg_files", $return);
|
||||||
|
$jsonData = ['return'=>$return];
|
||||||
|
echo json_encode($jsonData);
|
||||||
|
}
|
||||||
|
|
21
ajax/system/sys_actions.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require '../../includes/csrf.php';
|
||||||
|
|
||||||
|
$action = escapeshellcmd($_POST['a']);
|
||||||
|
|
||||||
|
if (isset($action)) {
|
||||||
|
|
||||||
|
switch($action) {
|
||||||
|
case "reboot":
|
||||||
|
$response = shell_exec("sudo /sbin/reboot");
|
||||||
|
break;
|
||||||
|
case "shutdown":
|
||||||
|
$response = shell_exec("sudo /sbin/shutdown -h now");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$response = 'Unknown action: '.$action;
|
||||||
|
}
|
||||||
|
echo json_encode($response);
|
||||||
|
}
|
||||||
|
|
235
app/css/all.css
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
/*
|
||||||
|
Name: all.css
|
||||||
|
Author: @billz
|
||||||
|
Author URI: https://github.com/billz
|
||||||
|
Description: Classes shared by all themes
|
||||||
|
License: GNU General Public License v3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Small devices (portrait phones, up to 576px) */
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.container-fluid, .card-body, .col-md-6 { padding-left: 0.5rem; padding-right: 0.5rem; }
|
||||||
|
.card .card-header { padding: .75rem .5rem; font-size: 1.0rem; }
|
||||||
|
.row { margin-left: 0rem; margin-right: 0rem; }
|
||||||
|
.col-lg-12 { padding-right: 0.25rem; padding-left: 0.25rem; }
|
||||||
|
.form-group.col-md-6 { margin-left: -0.5rem; }
|
||||||
|
h4.mt-3 { margin-left: 0.5rem; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-brand-text {
|
||||||
|
text-transform: none;
|
||||||
|
color: #212529;
|
||||||
|
font-size: 2.0rem;
|
||||||
|
font-weight: 500;
|
||||||
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-underlined {
|
||||||
|
border-bottom: 1px solid #e3e6f0;
|
||||||
|
padding-bottom: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-logo {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
font-size: 26pt;
|
||||||
|
margin: 20px 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 0.7em;
|
||||||
|
color: #858796;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
margin-left: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item-xs {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
margin-left: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item-wifi {
|
||||||
|
width: 6rem;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-status {
|
||||||
|
border-width: 0;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-status-up {
|
||||||
|
color: #a1ec38 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-status-warn {
|
||||||
|
color: #f6f044 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-status-down {
|
||||||
|
color: #f80107 !important;
|
||||||
|
animation: flash 1s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes flash {
|
||||||
|
50% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoutput {
|
||||||
|
width:100%;
|
||||||
|
height: 20rem;
|
||||||
|
border: 1px solid #d1d3e2;
|
||||||
|
border-radius: .35rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dhcp-static-leases {
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dhcp-static-lease-row {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-spinner {
|
||||||
|
background: url("../../app/img/loading-spinner.gif") no-repeat scroll center center transparent;
|
||||||
|
min-height: 450px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
.card-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) 50%;
|
||||||
|
grid-gap: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-off.btn {
|
||||||
|
padding-left: 1.2rem;
|
||||||
|
font-size: 0.9rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-on.btn {
|
||||||
|
font-size: 0.9rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas#divDBChartBandwidthhourly {
|
||||||
|
height: 350px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-container {
|
||||||
|
height: 150px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dbChart {
|
||||||
|
display: flex;
|
||||||
|
height: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-bottom: 0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-hidden {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-progress {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-check {
|
||||||
|
color: #90ee90;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-times {
|
||||||
|
color: #ff4500;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-light.js-toggle-password {
|
||||||
|
border: 1px solid lightgrey;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon {
|
||||||
|
margin-top: 2px;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
width: 4px;
|
||||||
|
border-radius: 1px;
|
||||||
|
opacity: 30%;
|
||||||
|
background: <?php echo $color; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar:nth-child(1) { height: 40%; }
|
||||||
|
.signal-icon .signal-bar:nth-child(2) { height: 70%; }
|
||||||
|
.signal-icon .signal-bar:nth-child(3) { height: 100%; }
|
||||||
|
|
||||||
|
.signal-icon.weak .signal-bar:nth-child(1),
|
||||||
|
.signal-icon.medium .signal-bar:nth-child(1),
|
||||||
|
.signal-icon.medium .signal-bar:nth-child(2),
|
||||||
|
.signal-icon.strong .signal-bar:nth-child(1),
|
||||||
|
.signal-icon.strong .signal-bar:nth-child(2),
|
||||||
|
.signal-icon.strong .signal-bar:nth-child(3)
|
||||||
|
{ opacity: 100%; }.signal-icon {
|
||||||
|
margin-top: 2px;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
width: 4px;
|
||||||
|
border-radius: 1px;
|
||||||
|
opacity: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar:nth-child(1) { height: 40%; }
|
||||||
|
.signal-icon .signal-bar:nth-child(2) { height: 70%; }
|
||||||
|
.signal-icon .signal-bar:nth-child(3) { height: 100%; }
|
||||||
|
|
||||||
|
.signal-icon.weak .signal-bar:nth-child(1),
|
||||||
|
.signal-icon.medium .signal-bar:nth-child(1),
|
||||||
|
.signal-icon.medium .signal-bar:nth-child(2),
|
||||||
|
.signal-icon.strong .signal-bar:nth-child(1),
|
||||||
|
.signal-icon.strong .signal-bar:nth-child(2),
|
||||||
|
.signal-icon.strong .signal-bar:nth-child(3)
|
||||||
|
{ opacity: 100%; }
|
||||||
|
|
||||||
|
.gs-edit {
|
||||||
|
border: 1px dashed #ccc;
|
||||||
|
background-color: #f1faee;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
figcaption.figure-caption a {
|
||||||
|
color: #858796;
|
||||||
|
}
|
||||||
|
|
||||||
|
button > i.fas {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
115
app/css/custom.php
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<?php header("Content-Type: text/css; charset=utf-8"); ?>
|
||||||
|
<?php
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
$color = getColorOpt();
|
||||||
|
?>
|
||||||
|
|
||||||
|
/*
|
||||||
|
Theme Name: RaspAP default
|
||||||
|
Author: @billz
|
||||||
|
Author URI: https://github.com/billz
|
||||||
|
Description: Default theme for RaspAP
|
||||||
|
License: GNU General Public License v3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import url('all.css');
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
background-color: #f8f9fc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .card-header, .modal-header {
|
||||||
|
border-color: <?php echo $color; ?>;
|
||||||
|
color: #fff;
|
||||||
|
background-color: <?php echo $color; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
color: <?php echo $color; ?>;
|
||||||
|
border-color: <?php echo $color; ?>;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer, .modal-footer {
|
||||||
|
background-color: #f2f1f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link.active,
|
||||||
|
.nav-tabs .nav-link {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs a.nav-link {
|
||||||
|
color: #6e707e;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.nav-link.active {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link {
|
||||||
|
padding: 0.6rem 0.6rem 0.6rem 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-success {
|
||||||
|
background-color: #d4edda;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: <?php echo $color; ?>;
|
||||||
|
border-color: <?php echo $color; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.fa.fa-bars {
|
||||||
|
color: #d1d3e2;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.fa.fa-bars:hover{
|
||||||
|
color: #6e707e;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.unstyled {
|
||||||
|
border-width: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link span {
|
||||||
|
display: none;
|
||||||
|
} .sidebar .nav-item .nav-link i,
|
||||||
|
.sidebar .nav-item .nav-link span {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: <?php echo $color; ?>;
|
||||||
|
}
|
||||||
|
|
160
app/css/hackernews.css
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
/*
|
||||||
|
Theme Name: HackerNews
|
||||||
|
Author: @billz
|
||||||
|
Author URI: https://github.com/billz
|
||||||
|
Description: A theme inspired by HackerNews for RaspAP
|
||||||
|
License: GNU General Public License v3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import url('all.css');
|
||||||
|
|
||||||
|
html * {
|
||||||
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
|
color: #828282;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus, a:hover {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5.card-title {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card, .modal-dialog {
|
||||||
|
border-radius: 3px;
|
||||||
|
border-color: #ff6600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header, .modal-header {
|
||||||
|
border-color: #ff6600;
|
||||||
|
background-color: #ff6600;
|
||||||
|
color: #000;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header .col {
|
||||||
|
color: #212529;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header [class^="fa"], .modal-header [class^="fa"] {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-title {
|
||||||
|
color: #000;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light hr.sidebar-divider {
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.nav-tabs, .nav-tabs .nav-link {
|
||||||
|
background-color: #f6f6ef;
|
||||||
|
border-bottom: 1px solid #dddfeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link {
|
||||||
|
padding: 0.6rem;
|
||||||
|
margin-left: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item.active .nav-link {
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper,#page-wrapper,
|
||||||
|
#wrapper #content-wrapper,
|
||||||
|
.nav>li>a,.nav {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
background-color: #f6f6ef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-success {
|
||||||
|
background-color: #d4edda;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary, .btn-primary:hover {
|
||||||
|
color: #828282;
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #828282;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fas.fa-circle {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoutput {
|
||||||
|
width:100%;
|
||||||
|
height:300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre.unstyled {
|
||||||
|
border-width: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link {
|
||||||
|
text-align: center;
|
||||||
|
padding: .6rem 1rem;
|
||||||
|
width: 6.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link span {
|
||||||
|
display: none;
|
||||||
|
} .sidebar .nav-item .nav-link i,
|
||||||
|
.sidebar .nav-item .nav-link span {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: #ff6600;
|
||||||
|
}
|
||||||
|
|
360
app/css/lightsout.css
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
/*
|
||||||
|
Theme Name: Lights Out
|
||||||
|
Author: @billz
|
||||||
|
Author URI: https://github.com/billz
|
||||||
|
Description: A dark mode theme for RaspAP
|
||||||
|
License: GNU General Public License v3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import url('all.css');
|
||||||
|
|
||||||
|
html * {
|
||||||
|
font-family: Helvetica,Arial,sans-serif;
|
||||||
|
color: #afafaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5.card-title {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
border-left: .01rem solid #d2d2d2;
|
||||||
|
border-bottom: .01rem solid #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item.active .nav-link i {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper #content-wrapper #content {
|
||||||
|
background-color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar {
|
||||||
|
background-color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs {
|
||||||
|
border-bottom: 1px solid #404040;
|
||||||
|
}
|
||||||
|
.nav-tabs .nav-link.active,
|
||||||
|
.nav-tabs .nav-link {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link:hover {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-brand:hover {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle {
|
||||||
|
border-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle .icon-bar {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle:focus,
|
||||||
|
.navbar-default .navbar-toggle:hover {
|
||||||
|
background-color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content, .navbar, .sidebar, .footer, .sticky-footer {
|
||||||
|
background-attachment: scroll;
|
||||||
|
background-repeat: repeat;
|
||||||
|
background-size: auto;
|
||||||
|
background-position: 0 0;
|
||||||
|
background-origin: padding-box;
|
||||||
|
background-clip: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky-footer {
|
||||||
|
background-position: 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
background-position: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link.active {
|
||||||
|
color: #d2d2d2;
|
||||||
|
background-color: #141414;
|
||||||
|
border-color: #404040 #404040 #141414;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus, a:hover {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header, .modal-content, .modal-header {
|
||||||
|
border-color: #404040;
|
||||||
|
background-color: #202020;
|
||||||
|
color: #afafaf;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
background-color: #141414;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header .fa {
|
||||||
|
color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header [class^="fa"] {
|
||||||
|
color: #afafaf;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col {
|
||||||
|
color: #afafaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card, .card-body {
|
||||||
|
border-color: #343434;
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: #141414;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: .01rem solid #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-brand-text {
|
||||||
|
color: #2b8080 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-raspap:before {
|
||||||
|
color: #ac1b3d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle {
|
||||||
|
background-color: #202020;
|
||||||
|
border: 1px solid #afafaf !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle::after {
|
||||||
|
color: #afafaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item .nav-link:hover i {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle:hover {
|
||||||
|
background-color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link {
|
||||||
|
text-align: center;
|
||||||
|
padding: .6rem 1rem;
|
||||||
|
width: 6.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer, .modal-footer {
|
||||||
|
background-color: #202020;
|
||||||
|
border-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-footer {
|
||||||
|
border-radius: 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header::before, .navbar-default::before {
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-size: 100% 2px, 3px 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light, .sticky-footer {
|
||||||
|
background-color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item .nav-link i {
|
||||||
|
color: rgba(230, 230, 230, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link {
|
||||||
|
padding: 0.6rem;
|
||||||
|
padding-left: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light hr.sidebar-divider {
|
||||||
|
border-top: 1px solid #404040;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link span {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar .topbar-divider {
|
||||||
|
border-right: 1px solid #404040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-warning {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.label.label-warning {
|
||||||
|
color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table>tbody>tr>td,
|
||||||
|
.table>tbody>tr>th,
|
||||||
|
.table>tfoot>tr>td,
|
||||||
|
.table>tfoot>tr>th,
|
||||||
|
.table>thead>tr>td,
|
||||||
|
.table>thead>tr>th {
|
||||||
|
background-color: #202020;
|
||||||
|
border-top: .01rem solid #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table>thead>tr>th {
|
||||||
|
vertical-align: bottom;
|
||||||
|
border-bottom: .01rem solid #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"], [class*="btn"]:focus, [class*="btn"]:disabled {
|
||||||
|
background-color: #202020;
|
||||||
|
border-color: #404040;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"]:hover {
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #d2d2d2;
|
||||||
|
background-color: #202020;
|
||||||
|
border-color: #afafaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"]:hover .disabled {
|
||||||
|
background-color:red;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="alert"] {
|
||||||
|
border-radius: .35rem;
|
||||||
|
color: #d2d2d2;
|
||||||
|
background-color: #202020;
|
||||||
|
border: 1px solid #404040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: 400;
|
||||||
|
text-shadow: none;
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control,
|
||||||
|
.form-control:focus,
|
||||||
|
.custom-select {
|
||||||
|
color: #d2d2d2;
|
||||||
|
background-color: #202020;
|
||||||
|
border: 1px solid #404040;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:disabled,
|
||||||
|
.form-control[readonly] {
|
||||||
|
background-color: #202020;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control::-webkit-input-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control:-moz-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control::-moz-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control:-ms-input-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control::-ms-input-placeholder { color: #d2d2d2; }
|
||||||
|
|
||||||
|
input[type="text"]{
|
||||||
|
color: #d2d2d2 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
background-color: #202020;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar.progress-bar-info.progress-bar-striped.active {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure-img {
|
||||||
|
filter: opacity(0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-wireguard:before {
|
||||||
|
color: #404040 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-wireguard:hover:before {
|
||||||
|
color: #d1d3e2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link span.ra-wireguard:before {
|
||||||
|
color: #d2d2d2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoutput {
|
||||||
|
background-color: #202020;
|
||||||
|
border-color: #404040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-muted {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fas.fa-circle {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: #202020;
|
||||||
|
border: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-light.js-toggle-password {
|
||||||
|
border: 1px solid #343434;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: #2b8080;
|
||||||
|
}
|
||||||
|
|
627
app/css/material-dark.php
Normal file
@ -0,0 +1,627 @@
|
|||||||
|
<?php header("Content-Type: text/css; charset=utf-8"); ?>
|
||||||
|
<?php
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
$color = getColorOpt();
|
||||||
|
?>
|
||||||
|
|
||||||
|
/*
|
||||||
|
Theme Name: Material Dark
|
||||||
|
Author: @marek-guran
|
||||||
|
Author URI: https://github.com/marek-guran
|
||||||
|
Description: Inspired by Google's Material You Design
|
||||||
|
License: GNU General Public License v3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Base color
|
||||||
|
$baseColor = $color;
|
||||||
|
|
||||||
|
// Function to darken a color by a percentage
|
||||||
|
function darkenColor($color, $percent)
|
||||||
|
{
|
||||||
|
$percent /= 100;
|
||||||
|
$r = hexdec(substr($color, 1, 2));
|
||||||
|
$g = hexdec(substr($color, 3, 2));
|
||||||
|
$b = hexdec(substr($color, 5, 2));
|
||||||
|
|
||||||
|
$r = round($r * (1 - $percent));
|
||||||
|
$g = round($g * (1 - $percent));
|
||||||
|
$b = round($b * (1 - $percent));
|
||||||
|
|
||||||
|
return sprintf("#%02x%02x%02x", $r, $g, $b);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to lighten a color by a percentage
|
||||||
|
function lightenColor($color, $percent)
|
||||||
|
{
|
||||||
|
$percent /= 100;
|
||||||
|
$r = hexdec(substr($color, 1, 2));
|
||||||
|
$g = hexdec(substr($color, 3, 2));
|
||||||
|
$b = hexdec(substr($color, 5, 2));
|
||||||
|
|
||||||
|
$r = round($r + (255 - $r) * $percent);
|
||||||
|
$g = round($g + (255 - $g) * $percent);
|
||||||
|
$b = round($b + (255 - $b) * $percent);
|
||||||
|
|
||||||
|
return sprintf("#%02x%02x%02x", $r, $g, $b);
|
||||||
|
}
|
||||||
|
|
||||||
|
$textColor = lightenColor($baseColor, 95);
|
||||||
|
// Create other color variables
|
||||||
|
$cardsColor = darkenColor($baseColor, 60);
|
||||||
|
$secondaryColor = lightenColor($baseColor, 30);
|
||||||
|
$primaryColor = $baseColor;
|
||||||
|
$backgroundColor = darkenColor($baseColor, 90);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
@import url('all.css');
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
html * {
|
||||||
|
font-family: Helvetica,Arial,sans-serif;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item.active .nav-link {
|
||||||
|
position: relative;
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
|
||||||
|
border-top-right-radius: 18px;
|
||||||
|
border-bottom-right-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5.card-title {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
border-left: .01rem solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-bottom: .01rem solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item.active .nav-link i {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link span:hover {
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper #content-wrapper #content {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header .col i.fa-tachometer-alt,
|
||||||
|
.card-header .col i.fa-dot-circle,
|
||||||
|
.card-header .col i.fa-wifi,
|
||||||
|
.card-header .col i.fa-exchange-alt,
|
||||||
|
.card-header .col i.fa-hand-paper,
|
||||||
|
.card-header .col i.fa-network-wired,
|
||||||
|
.card-header .col i.fa-key,
|
||||||
|
.card-header .ra-wireguard,
|
||||||
|
.card-header .ra-wireguard:before,
|
||||||
|
.card-header .col i.fa-user-lock,
|
||||||
|
.card-header .col i.fa-chart-bar,
|
||||||
|
.card-header .col i.fa-cube,
|
||||||
|
.card-header .col i.fa-info-circle,
|
||||||
|
.card-header .col i.fa-globe,
|
||||||
|
.card-header .col i.fa-shield-alt {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.fa-bars {
|
||||||
|
color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs {
|
||||||
|
border-bottom: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
.nav-tabs .nav-link.active,
|
||||||
|
.nav-tabs .nav-link {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
border-top-left-radius: 18px;
|
||||||
|
border-top-right-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link:hover {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-brand:hover {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle .icon-bar {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle:focus,
|
||||||
|
.navbar-default .navbar-toggle:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content, .navbar, .sidebar, .footer, .sticky-footer {
|
||||||
|
background-attachment: scroll;
|
||||||
|
background-repeat: repeat;
|
||||||
|
background-size: auto;
|
||||||
|
background-position: 0 0;
|
||||||
|
background-origin: padding-box;
|
||||||
|
background-clip: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky-footer {
|
||||||
|
background-position: 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
background-position: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link.active {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus, a:hover {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header, .modal-content, .modal-header {
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
border-radius: 18px;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
border-bottom-left-radius: 0px!important;
|
||||||
|
border-bottom-right-radius: 0px!important;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: -18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header .fa {
|
||||||
|
color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header [class^="fa"] {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card, .card-body {
|
||||||
|
border-color: transparent;
|
||||||
|
border-radius: 18px;
|
||||||
|
background-color: <?php echo $cardsColor; ?>;
|
||||||
|
box-shadow: 0px -5px 5px rgba(0, 0, 0, 0.1),
|
||||||
|
0px 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding-top: 36px; /* 18px to move down + 18px space at the top */
|
||||||
|
padding-bottom: 36px; /* 18px space at the bottom */
|
||||||
|
}
|
||||||
|
|
||||||
|
.unstyled {
|
||||||
|
background-color: <?php echo $cardsColor; ?>;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: .01rem solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-brand-text {
|
||||||
|
color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-raspap:before {
|
||||||
|
color: #ac1b3d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>; !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle::after {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item .nav-link:hover i {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle:hover {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link {
|
||||||
|
text-align: center;
|
||||||
|
padding: .6rem 1rem;
|
||||||
|
width: 6.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer, .modal-footer {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
border-top: 0px;
|
||||||
|
border-bottom-right-radius: 18px!important;
|
||||||
|
border-bottom-left-radius: 18px!important;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-footer {
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header::before, .navbar-default::before {
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-size: 100% 2px, 3px 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light, .sticky-footer {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item .nav-link i {
|
||||||
|
color: rgba(230, 230, 230, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link {
|
||||||
|
padding: 0.6rem;
|
||||||
|
padding-left: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light hr.sidebar-divider {
|
||||||
|
border-top: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link span {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar .topbar-divider {
|
||||||
|
border-right: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-warning {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.label.label-warning {
|
||||||
|
color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table>tbody>tr>td,
|
||||||
|
.table>tbody>tr>th,
|
||||||
|
.table>tfoot>tr>td,
|
||||||
|
.table>tfoot>tr>th,
|
||||||
|
.table>thead>tr>td,
|
||||||
|
.table>thead>tr>th {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border-top: .01rem solid <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table{
|
||||||
|
border-radius: 18px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table>thead>tr>th {
|
||||||
|
vertical-align: bottom;
|
||||||
|
border-bottom: 0 solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"], [class*="btn"]:focus, [class*="btn"]:disabled {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
border-radius: 18px;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"]:hover {
|
||||||
|
border-radius: 18px;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"]:hover .disabled {
|
||||||
|
background-color:red;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="alert"] {
|
||||||
|
border-radius: 18px;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: 1px solid #404040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: 400;
|
||||||
|
text-shadow: none;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control,
|
||||||
|
.form-control:focus,
|
||||||
|
.custom-select {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:disabled,
|
||||||
|
.form-control[readonly] {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control::-webkit-input-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control:-moz-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control::-moz-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control:-ms-input-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control::-ms-input-placeholder { color: #d2d2d2; }
|
||||||
|
|
||||||
|
.form-control option {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]{
|
||||||
|
color: <?php echo $textColor; ?>; !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#progressBar {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar.bg-success {
|
||||||
|
background-color: <?php echo $primaryColor; ?>!important;
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress .progress-bar {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar.progress-bar-info.progress-bar-striped.active {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure-img {
|
||||||
|
filter: opacity(0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-wireguard:before {
|
||||||
|
color: #404040 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-wireguard:hover:before {
|
||||||
|
color: #d1d3e2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link span.ra-wireguard:before {
|
||||||
|
color: #d2d2d2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-control-input:checked ~ .custom-control-label::before {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-control-input:checked ~ .custom-control-label::before {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wg-keygen {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid yellow <?php echo $secondaryColor; ?>;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
border-bottom-right-radius: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-secondary.js-add-dhcp-upstream-server {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
border-bottom-right-radius: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-success.js-add-dhcp-static-lease {
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-success.js-add-dhcp-static-lease:hover {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-muted {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fas.fa-circle {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-light.js-toggle-password {
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.service-status {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-success {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-success:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure-img {
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoutput {
|
||||||
|
border-radius: 18px!important;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: 1px solid <?php echo $primaryColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm {
|
||||||
|
border-top-right-radius: 18px!important;
|
||||||
|
border-bottom-right-radius: 18px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-warning {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-warning:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-danger {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-danger:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group label.active {
|
||||||
|
background-color: <?php echo $primaryColor; ?>!important;
|
||||||
|
border-color:transparent!important;
|
||||||
|
color: <?php echo $textColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group {
|
||||||
|
background-color: <?php echo $cardsColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group:hover {
|
||||||
|
background-color: <?php echo $cardsColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-secondary#gen_wpa_passphrase {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
border-bottom-right-radius: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.scroll-to-top.rounded {
|
||||||
|
display: inline;
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-radius: 18px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.scroll-to-top.rounded i.fas.fa-angle-up {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-sm.btn-outline-secondary.rounded-right {
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item.col-xs-3 {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-muted {
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-stack-item-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
633
app/css/material-light.php
Normal file
@ -0,0 +1,633 @@
|
|||||||
|
<?php header("Content-Type: text/css; charset=utf-8"); ?>
|
||||||
|
<?php
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
$color = getColorOpt();
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Theme Name: Material Light
|
||||||
|
Author: @marek-guran
|
||||||
|
Author URI: https://github.com/marek-guran
|
||||||
|
Description: Inspired by Google's Material You Design
|
||||||
|
License: GNU General Public License v3.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Base color
|
||||||
|
$baseColor = $color;
|
||||||
|
|
||||||
|
// Function to darken a color by a percentage
|
||||||
|
function darkenColor($color, $percent)
|
||||||
|
{
|
||||||
|
$percent /= 100;
|
||||||
|
$r = hexdec(substr($color, 1, 2));
|
||||||
|
$g = hexdec(substr($color, 3, 2));
|
||||||
|
$b = hexdec(substr($color, 5, 2));
|
||||||
|
|
||||||
|
$r = round($r * (1 - $percent));
|
||||||
|
$g = round($g * (1 - $percent));
|
||||||
|
$b = round($b * (1 - $percent));
|
||||||
|
|
||||||
|
return sprintf("#%02x%02x%02x", $r, $g, $b);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to lighten a color by a percentage
|
||||||
|
function lightenColor($color, $percent)
|
||||||
|
{
|
||||||
|
$percent /= 100;
|
||||||
|
$r = hexdec(substr($color, 1, 2));
|
||||||
|
$g = hexdec(substr($color, 3, 2));
|
||||||
|
$b = hexdec(substr($color, 5, 2));
|
||||||
|
|
||||||
|
$r = round($r + (255 - $r) * $percent);
|
||||||
|
$g = round($g + (255 - $g) * $percent);
|
||||||
|
$b = round($b + (255 - $b) * $percent);
|
||||||
|
|
||||||
|
return sprintf("#%02x%02x%02x", $r, $g, $b);
|
||||||
|
}
|
||||||
|
|
||||||
|
$textColor = lightenColor($baseColor, 95);
|
||||||
|
// Create other color variables
|
||||||
|
$cardsColor = lightenColor($baseColor, 50);
|
||||||
|
$secondaryColor = lightenColor($baseColor, 30);
|
||||||
|
$primaryColor = $baseColor;
|
||||||
|
$backgroundColor = lightenColor($baseColor, 60);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
@import url('all.css');
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
html * {
|
||||||
|
font-family: Helvetica,Arial,sans-serif;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item.active .nav-link {
|
||||||
|
position: relative;
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
|
||||||
|
border-top-right-radius: 18px;
|
||||||
|
border-bottom-right-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5.card-title {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
border-left: .01rem solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-bottom: .01rem solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item.active .nav-link i {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link {
|
||||||
|
font-weight: 400;
|
||||||
|
color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper #content-wrapper #content {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header .col i.fa-tachometer-alt,
|
||||||
|
.card-header .col i.fa-dot-circle,
|
||||||
|
.card-header .col i.fa-wifi,
|
||||||
|
.card-header .col i.fa-exchange-alt,
|
||||||
|
.card-header .col i.fa-hand-paper,
|
||||||
|
.card-header .col i.fa-network-wired,
|
||||||
|
.card-header .col i.fa-key,
|
||||||
|
.card-header .ra-wireguard,
|
||||||
|
.card-header .ra-wireguard:before,
|
||||||
|
.card-header .col i.fa-user-lock,
|
||||||
|
.card-header .col i.fa-chart-bar,
|
||||||
|
.card-header .col i.fa-cube,
|
||||||
|
.card-header .col i.fa-info-circle,
|
||||||
|
.card-header .col i.fa-globe,
|
||||||
|
.card-header .col i.fa-shield-alt {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.fa-bars {
|
||||||
|
color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs {
|
||||||
|
border-bottom: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
.nav-tabs .nav-link.active,
|
||||||
|
.nav-tabs .nav-link {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
border-top-left-radius: 18px;
|
||||||
|
border-top-right-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link:hover {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-brand:hover {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle .icon-bar {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-toggle:focus,
|
||||||
|
.navbar-default .navbar-toggle:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content, .navbar, .sidebar, .footer, .sticky-footer {
|
||||||
|
background-attachment: scroll;
|
||||||
|
background-repeat: repeat;
|
||||||
|
background-size: auto;
|
||||||
|
background-position: 0 0;
|
||||||
|
background-origin: padding-box;
|
||||||
|
background-clip: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sticky-footer {
|
||||||
|
background-position: 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
background-position: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tabs .nav-link.active {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus, a:hover {
|
||||||
|
color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header, .modal-content, .modal-header {
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
border-radius: 18px;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
border-bottom-left-radius: 0px!important;
|
||||||
|
border-bottom-right-radius: 0px!important;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: -18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header .fa {
|
||||||
|
color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header [class^="fa"] {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card, .card-body {
|
||||||
|
border-color: transparent;
|
||||||
|
border-radius: 18px;
|
||||||
|
background-color: <?php echo $cardsColor; ?>;
|
||||||
|
box-shadow: 0px -5px 5px rgba(0, 0, 0, 0.1),
|
||||||
|
0px 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding-top: 36px; /* 18px to move down + 18px space at the top */
|
||||||
|
padding-bottom: 36px; /* 18px space at the bottom */
|
||||||
|
}
|
||||||
|
|
||||||
|
.unstyled {
|
||||||
|
background-color: <?php echo $cardsColor; ?>;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: .01rem solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-brand-text {
|
||||||
|
color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-raspap:before {
|
||||||
|
color: #ac1b3d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>; !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle::after {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item .nav-link:hover i {
|
||||||
|
color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light #sidebarToggle:hover {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.toggled .nav-item .nav-link {
|
||||||
|
text-align: center;
|
||||||
|
padding: .6rem 1rem;
|
||||||
|
width: 6.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer, .modal-footer {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
border-top: 0px;
|
||||||
|
border-bottom-right-radius: 18px!important;
|
||||||
|
border-bottom-left-radius: 18px!important;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-footer {
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card>.card-header::before, .navbar-default::before {
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-size: 100% 2px, 3px 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light, .sticky-footer {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light .nav-item .nav-link i {
|
||||||
|
color: <?php echo $textColor; ?>;;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link {
|
||||||
|
padding: 0.6rem;
|
||||||
|
padding-left: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-light hr.sidebar-divider {
|
||||||
|
border-top: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link span {
|
||||||
|
font-size: 1.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item .nav-link span:hover {
|
||||||
|
color: <?php echo $primaryColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar .topbar-divider {
|
||||||
|
border-right: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label-warning {
|
||||||
|
background-color: #d2d2d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.label.label-warning {
|
||||||
|
color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table>tbody>tr>td,
|
||||||
|
.table>tbody>tr>th,
|
||||||
|
.table>tfoot>tr>td,
|
||||||
|
.table>tfoot>tr>th,
|
||||||
|
.table>thead>tr>td,
|
||||||
|
.table>thead>tr>th {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border-top: .01rem solid <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table{
|
||||||
|
border-radius: 18px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table>thead>tr>th {
|
||||||
|
vertical-align: bottom;
|
||||||
|
border-bottom: 0 solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"], [class*="btn"]:focus, [class*="btn"]:disabled {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
border-radius: 18px;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"]:hover {
|
||||||
|
border-radius: 18px;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="btn"]:hover .disabled {
|
||||||
|
background-color:red;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="alert"] {
|
||||||
|
border-radius: 18px;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: 1px solid #404040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: 400;
|
||||||
|
text-shadow: none;
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control,
|
||||||
|
.form-control:focus,
|
||||||
|
.custom-select {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:disabled,
|
||||||
|
.form-control[readonly] {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control::-webkit-input-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control:-moz-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control::-moz-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control:-ms-input-placeholder { color: #d2d2d2; }
|
||||||
|
.form-control::-ms-input-placeholder { color: #d2d2d2; }
|
||||||
|
|
||||||
|
.form-control option {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control::placeholder {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]{
|
||||||
|
color: <?php echo $textColor; ?>; !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
color: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#progressBar {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar.bg-success {
|
||||||
|
background-color: <?php echo $primaryColor; ?>!important;
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress .progress-bar {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar.progress-bar-info.progress-bar-striped.active {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure-img {
|
||||||
|
filter: opacity(0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-wireguard:before {
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ra-wireguard:hover:before {
|
||||||
|
color: <?php echo $primaryColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-item.active .nav-link span.ra-wireguard:before {
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-control-input:checked ~ .custom-control-label::before {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-control-input:checked ~ .custom-control-label::before {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wg-keygen {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid yellow <?php echo $secondaryColor; ?>;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
border-bottom-right-radius: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-secondary.js-add-dhcp-upstream-server {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
border-bottom-right-radius: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-success.js-add-dhcp-static-lease {
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-success.js-add-dhcp-static-lease:hover {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-muted {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fas.fa-circle {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: <?php echo $backgroundColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-light.js-toggle-password {
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.service-status {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-success {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-success:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.figure-img {
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoutput {
|
||||||
|
border-radius: 18px!important;
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;
|
||||||
|
border: 1px solid <?php echo $primaryColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-sm {
|
||||||
|
border-top-right-radius: 18px!important;
|
||||||
|
border-bottom-right-radius: 18px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signal-icon .signal-bar {
|
||||||
|
background: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-warning {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.btn.btn-warning:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-danger {
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btn.btn-danger:hover {
|
||||||
|
background-color: <?php echo $backgroundColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group label.active {
|
||||||
|
background-color: <?php echo $primaryColor; ?>!important;
|
||||||
|
border-color:transparent!important;
|
||||||
|
color: <?php echo $textColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group {
|
||||||
|
background-color: <?php echo $cardsColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group:hover {
|
||||||
|
background-color: <?php echo $cardsColor; ?>;!important
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-outline-secondary#gen_wpa_passphrase {
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
border-top-right-radius: 18px !important;
|
||||||
|
border-bottom-right-radius: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.scroll-to-top.rounded {
|
||||||
|
display: inline;
|
||||||
|
background-color: <?php echo $secondaryColor; ?>;
|
||||||
|
border-radius: 18px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.scroll-to-top.rounded i.fas.fa-angle-up {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-sm.btn-outline-secondary.rounded-right {
|
||||||
|
border: 1px solid <?php echo $secondaryColor; ?>;
|
||||||
|
background-color: <?php echo $primaryColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item.col-xs-3 {
|
||||||
|
color: <?php echo $textColor; ?>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-muted {
|
||||||
|
color: <?php echo $textColor; ?>!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-stack-item-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
BIN
app/icons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
app/icons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 13 KiB |
9
app/icons/browserconfig.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/dist/icons/mstile-150x150.png"/>
|
||||||
|
<TileColor>#b91d47</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
BIN
app/icons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/icons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
app/icons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
48
app/icons/safari-pinned-tab.svg
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="240.000000pt" height="240.000000pt" viewBox="0 0 240.000000 240.000000"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0.000000,240.000000) scale(0.100000,-0.100000)"
|
||||||
|
fill="#000000" stroke="none">
|
||||||
|
<path d="M867 2334 c-3 -3 -3 -20 -1 -37 2 -18 6 -54 8 -82 2 -27 5 -53 5 -56
|
||||||
|
1 -4 31 -6 69 -6 63 0 162 -9 207 -19 11 -2 31 -6 45 -8 14 -2 59 -14 100 -27
|
||||||
|
41 -13 80 -23 85 -24 6 0 12 -2 15 -5 3 -3 37 -20 75 -38 161 -78 335 -219
|
||||||
|
436 -357 55 -74 121 -175 115 -175 -3 0 10 -30 28 -67 18 -38 37 -81 41 -98 5
|
||||||
|
-16 9 -34 11 -40 27 -94 44 -173 48 -237 2 -15 19 -20 99 -23 95 -5 101 -1 86
|
||||||
|
60 -4 17 -10 48 -13 70 -27 197 -131 443 -258 613 -52 69 -252 272 -269 272
|
||||||
|
-5 0 -18 8 -28 18 -37 32 -50 42 -61 42 -5 0 -10 4 -10 8 0 4 -15 15 -32 23
|
||||||
|
-18 9 -53 27 -78 41 -95 52 -303 123 -390 133 -19 2 -46 7 -60 10 -34 8 -266
|
||||||
|
15 -273 9z"/>
|
||||||
|
<path d="M895 1867 c3 -50 6 -92 8 -93 1 -1 40 -4 87 -8 114 -8 139 -12 212
|
||||||
|
-37 272 -91 470 -300 547 -578 11 -39 17 -71 13 -71 -3 0 -2 -4 4 -10 5 -5 50
|
||||||
|
-12 100 -15 l91 -6 -3 26 c-15 141 -91 333 -182 460 -47 65 -152 170 -222 222
|
||||||
|
-164 122 -367 191 -582 198 l-79 2 6 -90z"/>
|
||||||
|
<path d="M747 1604 c-1 -2 -14 -5 -27 -7 -245 -47 -453 -199 -562 -412 -47
|
||||||
|
-91 -81 -232 -81 -340 -1 -88 19 -215 34 -215 5 0 6 -7 3 -15 -4 -8 -2 -21 3
|
||||||
|
-28 5 -6 20 -38 33 -70 12 -31 26 -57 31 -57 5 0 9 -6 9 -13 0 -7 9 -23 20
|
||||||
|
-35 11 -12 20 -25 20 -29 0 -12 80 -93 91 -93 6 0 8 -4 5 -8 -11 -18 215 -159
|
||||||
|
235 -147 5 4 9 2 9 -4 0 -20 189 -58 280 -56 87 2 213 25 245 44 6 3 12 6 15
|
||||||
|
6 21 3 50 18 50 26 0 6 5 7 10 4 13 -8 128 67 193 125 67 60 164 196 159 223
|
||||||
|
-1 4 1 7 6 7 8 0 31 47 36 76 3 11 9 32 15 47 24 62 33 251 17 344 -21 123
|
||||||
|
-93 271 -181 371 -49 54 -156 142 -174 142 -6 0 -11 4 -11 9 0 18 -180 85
|
||||||
|
-260 97 -43 7 -218 13 -223 8z m243 -199 c30 -9 62 -17 70 -18 8 -1 20 -5 25
|
||||||
|
-10 6 -4 37 -25 70 -46 71 -45 165 -135 174 -166 1 -5 15 -33 31 -61 78 -136
|
||||||
|
85 -368 15 -504 -8 -16 -15 -33 -14 -36 0 -4 -3 -10 -8 -13 -5 -3 -23 -26 -40
|
||||||
|
-51 -25 -37 -102 -113 -148 -148 -15 -12 -117 -59 -145 -68 -97 -31 -220 -35
|
||||||
|
-310 -11 -8 2 -28 7 -45 12 -16 4 -51 19 -77 32 -27 13 -51 24 -55 26 -4 1
|
||||||
|
-18 12 -31 24 -14 13 -30 20 -36 16 -6 -3 -8 -3 -4 1 9 10 -34 55 -46 48 -5
|
||||||
|
-3 -6 0 -2 6 3 6 -2 17 -12 24 -10 7 -27 28 -37 46 -11 17 -24 32 -29 32 -5 0
|
||||||
|
-6 3 -3 7 4 3 -2 20 -12 37 -27 43 -49 111 -56 176 -8 60 -7 158 0 170 3 4 7
|
||||||
|
25 10 46 5 45 56 152 97 205 15 20 28 42 28 48 0 6 4 10 8 8 4 -1 26 16 48 38
|
||||||
|
22 22 49 45 60 51 55 32 123 65 140 69 10 2 42 10 69 18 63 17 193 13 265 -8z"/>
|
||||||
|
<path d="M717 1231 c-299 -97 -383 -476 -154 -691 23 -22 48 -40 54 -40 7 0
|
||||||
|
13 -4 13 -9 0 -17 116 -53 185 -57 130 -8 228 29 320 121 49 49 66 75 89 135
|
||||||
|
33 89 38 197 11 270 -9 25 -17 50 -19 57 -6 30 -85 124 -133 157 -104 73 -248
|
||||||
|
95 -366 57z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
14
app/icons/site.webmanifest
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "RaspAP",
|
||||||
|
"short_name": "RaspAP",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/app/icons/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
BIN
app/img/insiders.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
app/img/loading-spinner.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
app/img/no-trace-200x200.png
Normal file
After Width: | Height: | Size: 32 KiB |
51
app/img/raspAP-logo.php
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?php header("Content-Type: image/svg+xml; charset=utf-8"); ?>
|
||||||
|
<?php
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
$color = getColorOpt();
|
||||||
|
?>
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 490.66666 487.11066"
|
||||||
|
height="487.11066"
|
||||||
|
width="490.66666"
|
||||||
|
xml:space="preserve"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"><metadata
|
||||||
|
id="metadata8"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs6"><clipPath
|
||||||
|
id="clipPath18"
|
||||||
|
clipPathUnits="userSpaceOnUse"><path
|
||||||
|
id="path16"
|
||||||
|
d="M 0,365.333 H 368 V 0 H 0 Z" /></clipPath></defs><g
|
||||||
|
transform="matrix(1.3333333,0,0,-1.3333333,0,487.11067)"
|
||||||
|
id="g10"><g
|
||||||
|
id="g12"><g
|
||||||
|
clip-path="url(#clipPath18)"
|
||||||
|
id="g14"><g
|
||||||
|
transform="translate(192.6768,123.4365)"
|
||||||
|
id="g20"><path
|
||||||
|
id="path22"
|
||||||
|
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
d="m 0,0 c 0,-37.169 -30.128,-67.3 -67.296,-67.3 -37.167,0 -67.294,30.131 -67.294,67.3 0,37.165 30.127,67.296 67.294,67.296 C -30.128,67.296 0,37.165 0,0" /></g><g
|
||||||
|
transform="translate(125.3823,219.0791)"
|
||||||
|
id="g24"><path
|
||||||
|
id="path26"
|
||||||
|
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
d="m 0,0 c -52.737,0 -95.641,-42.905 -95.641,-95.643 0,-52.74 42.904,-95.647 95.641,-95.647 52.737,0 95.642,42.907 95.642,95.647 C 95.642,-42.905 52.737,0 0,0 m 0,-217.29 c -67.073,0 -121.641,54.571 -121.641,121.647 C -121.641,-28.569 -67.073,26 0,26 67.074,26 121.642,-28.569 121.642,-95.643 121.642,-162.719 67.074,-217.29 0,-217.29" /></g><g
|
||||||
|
transform="translate(144.4277,271.9385)"
|
||||||
|
id="g28"><path
|
||||||
|
id="path30"
|
||||||
|
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
d="m 0,0 c 66.188,0 121.118,-49.055 130.392,-112.714 l 28.259,-1.874 C 150.044,-34.655 82.181,27.791 0,27.791 c -3.892,0 -7.75,-0.147 -11.571,-0.423 L -9.73,-0.397 C -6.513,-0.161 -3.275,0 0,0" /></g><g
|
||||||
|
transform="translate(144.4883,334.7588)"
|
||||||
|
id="g32"><path
|
||||||
|
id="path34"
|
||||||
|
style="fill:<?php echo $color; ?>;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
d="m 0,0 c 101.94,0 185.667,-79.438 192.56,-179.664 l 27.962,-1.857 C 214.513,-65.087 117.899,27.791 0,27.791 c -5.31,0 -10.576,-0.2 -15.792,-0.571 l 1.84,-27.728 C -9.343,-0.177 -4.691,0 0,0" /></g></g></g></g></svg>
|
BIN
app/img/raspAP-logo.png
Normal file
After Width: | Height: | Size: 98 KiB |
28
app/img/wg-qr-code.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/defaults.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
// prevent direct file access
|
||||||
|
if (!isset($_SERVER['HTTP_REFERER'])) {
|
||||||
|
header('HTTP/1.0 403 Forbidden');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
exec("sudo cat " .RASPI_WIREGUARD_PATH.'client.conf', $return);
|
||||||
|
$peer_conf = implode(PHP_EOL,$return);
|
||||||
|
$peer_conf.= PHP_EOL;
|
||||||
|
$command = "qrencode -t svg -m 0 -o - " . mb_escapeshellarg($peer_conf);
|
||||||
|
$svg = shell_exec($command);
|
||||||
|
$etag = hash('sha256', $peer_conf);
|
||||||
|
$content_length = strlen($svg);
|
||||||
|
$last_modified = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
header("Content-Type: image/svg+xml");
|
||||||
|
header("Content-Length: $content_length");
|
||||||
|
header("Last-Modified: $last_modified");
|
||||||
|
header("ETag: \"$etag\"");
|
||||||
|
header("X-QR-Code-Content: $peer_conf");
|
||||||
|
echo shell_exec($command);
|
||||||
|
|
54
app/img/wifi-qr-code.php
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/defaults.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
// prevent direct file access
|
||||||
|
if (!isset($_SERVER['HTTP_REFERER'])) {
|
||||||
|
header('HTTP/1.0 403 Forbidden');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$hostapd = parse_ini_file(RASPI_HOSTAPD_CONFIG, false, INI_SCANNER_RAW);
|
||||||
|
|
||||||
|
// assume wpa encryption and get the passphrase
|
||||||
|
$type = "WPA";
|
||||||
|
$password = isset($hostapd['wpa_psk']) ? $hostapd['wpa_psk'] : $hostapd['wpa_passphrase'];
|
||||||
|
|
||||||
|
// use wep if configured
|
||||||
|
$wep_default_key = intval($hostapd['wep_default_key']);
|
||||||
|
$wep_key = 'wep_key' . $wep_default_key;
|
||||||
|
if (array_key_exists($wep_key, $hostapd)) {
|
||||||
|
$type = "WEP";
|
||||||
|
$password = $hostapd[$wep_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
// if password is still empty, assume nopass
|
||||||
|
if (empty($password)) {
|
||||||
|
$type = "nopass";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ssid = $hostapd['ssid'];
|
||||||
|
$hidden = intval($hostapd['ignore_broadcast_ssid']) != 0 ? "H:true" : "";
|
||||||
|
|
||||||
|
$ssid = qr_encode($ssid);
|
||||||
|
$password = qr_encode($password);
|
||||||
|
|
||||||
|
$data = "WIFI:S:$ssid;T:$type;P:$password;$hidden;";
|
||||||
|
$command = "qrencode -t svg -m 1 -o - " . mb_escapeshellarg($data);
|
||||||
|
$svg = shell_exec($command);
|
||||||
|
|
||||||
|
$config_mtime = filemtime(RASPI_HOSTAPD_CONFIG);
|
||||||
|
$last_modified = gmdate('D, d M Y H:i:s ', $config_mtime) . 'GMT';
|
||||||
|
$etag = hash('sha256', $data);
|
||||||
|
$content_length = strlen($svg);
|
||||||
|
|
||||||
|
header("Content-Type: image/svg+xml");
|
||||||
|
header("Content-Length: $content_length");
|
||||||
|
header("Last-Modified: $last_modified");
|
||||||
|
header("Content-Disposition: attachment; filename=\"qr.svg\"");
|
||||||
|
header("ETag: \"$etag\"");
|
||||||
|
header("X-QR-Code-Content: $data");
|
||||||
|
echo $svg;
|
||||||
|
|
147
app/js/bandwidthcharts.js
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
(function($, _t) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a Chart.js barchart.
|
||||||
|
*/
|
||||||
|
function CreateChart(ctx, labels) {
|
||||||
|
var barchart = new Chart(ctx,{
|
||||||
|
type: 'line',
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'date',
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
maxRotation: 90,
|
||||||
|
minRotation: 80
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
id: 'y-axis-1',
|
||||||
|
type: 'linear',
|
||||||
|
display: true,
|
||||||
|
position: 'left',
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
labels: labels,
|
||||||
|
datasets: []
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return barchart;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a jquery bootstrap datatable.
|
||||||
|
*/
|
||||||
|
function CreateDataTable(placeholder, timeunits) {
|
||||||
|
$("#"+placeholder).append('<table id="tableBandwidth'+timeunits+
|
||||||
|
'" class="table table-striped"><thead>'+
|
||||||
|
'<tr><th>date</th><th>rx</th><th>tx</th></tr></thead><tbody></tbody></table>');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Figure out which tab is selected and remove all existing charts and then
|
||||||
|
* construct the proper barchart.
|
||||||
|
*/
|
||||||
|
function ShowBandwidthChartHandler(e) {
|
||||||
|
// Remove all chartjs charts
|
||||||
|
$('#divChartBandwidthhourly').empty();
|
||||||
|
$('#divChartBandwidthdaily').empty();
|
||||||
|
$('#divChartBandwidthmonthly').empty();
|
||||||
|
// Remove all datatables
|
||||||
|
$('#divTableBandwidthhourly').empty();
|
||||||
|
$('#divTableBandwidthdaily').empty();
|
||||||
|
$('#divTableBandwidthmonthly').empty();
|
||||||
|
// Construct ajax uri for getting the proper data.
|
||||||
|
var timeunit = $('ul#tabbarBandwidth li.nav-item a.nav-link.active').attr('href').substr(1);
|
||||||
|
var uri = 'ajax/bandwidth/get_bandwidth.php?';
|
||||||
|
uri += 'inet=';
|
||||||
|
uri += encodeURIComponent($('#cbxInterface'+timeunit+' option:selected').text());
|
||||||
|
uri += '&tu=';
|
||||||
|
uri += encodeURIComponent(timeunit.substr(0, 1));
|
||||||
|
var datasizeunits = 'mb';
|
||||||
|
uri += '&dsu='+encodeURIComponent(datasizeunits);
|
||||||
|
// Init. datatable html
|
||||||
|
var datatable = CreateDataTable('divTableBandwidth'+timeunit, timeunit);
|
||||||
|
// Get data for chart
|
||||||
|
$.ajax({
|
||||||
|
url: uri,
|
||||||
|
dataType: 'json',
|
||||||
|
beforeSend: function() {
|
||||||
|
$('#divLoaderBandwidth'+timeunit).show();
|
||||||
|
}
|
||||||
|
}).done(function(jsondata) {
|
||||||
|
$('#divLoaderBandwidth'+timeunit).hide();
|
||||||
|
// Map json values to label array
|
||||||
|
var labels = jsondata.map(function(e) {
|
||||||
|
return e.date;
|
||||||
|
});
|
||||||
|
// Init. chart with label series
|
||||||
|
var barchart = CreateChart('divChartBandwidth'+timeunit, labels);
|
||||||
|
var dataRx = jsondata.map(function(e) {
|
||||||
|
return e.rx;
|
||||||
|
});
|
||||||
|
var dataTx = jsondata.map(function(e) {
|
||||||
|
return e.tx;
|
||||||
|
});
|
||||||
|
|
||||||
|
addData(barchart, dataRx, dataTx, datasizeunits);
|
||||||
|
$('#tableBandwidth'+timeunit).DataTable({
|
||||||
|
'searching': false,
|
||||||
|
'paging': false,
|
||||||
|
'data': jsondata,
|
||||||
|
'order': [[ 0, 'ASC' ]],
|
||||||
|
'columns': [
|
||||||
|
{ 'data': 'date' },
|
||||||
|
{ 'data': 'rx', "title": _t['receive']+' '+datasizeunits.toUpperCase() },
|
||||||
|
{ 'data': 'tx', "title": _t['send']+' '+datasizeunits.toUpperCase() }]
|
||||||
|
});
|
||||||
|
}).fail(function(xhr, textStatus) {
|
||||||
|
if (window.console) {
|
||||||
|
console.error('server error');
|
||||||
|
} else {
|
||||||
|
alert("server error");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add data array to datasets of current chart.
|
||||||
|
*/
|
||||||
|
function addData(chart, dataRx, dataTx, datasizeunits) {
|
||||||
|
chart.data.datasets.push({
|
||||||
|
label: 'Receive'+' '+datasizeunits.toUpperCase(),
|
||||||
|
yAxisID: 'y-axis-1',
|
||||||
|
borderColor: 'rgba(75, 192, 192, 1)',
|
||||||
|
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||||
|
data: dataRx
|
||||||
|
});
|
||||||
|
chart.data.datasets.push({
|
||||||
|
label: 'Send'+' '+datasizeunits.toUpperCase(),
|
||||||
|
yAxisID: 'y-axis-1',
|
||||||
|
borderColor: 'rgba(192, 192, 192, 1)',
|
||||||
|
backgroundColor: 'rgba(192, 192, 192, 0.2)',
|
||||||
|
data: dataTx
|
||||||
|
});
|
||||||
|
chart.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#tabbarBandwidth a[data-toggle="tab"]').on('shown.bs.tab', ShowBandwidthChartHandler);
|
||||||
|
$('#cbxInterfacehourly').on('change', ShowBandwidthChartHandler);
|
||||||
|
$('#cbxInterfacedaily').on('change', ShowBandwidthChartHandler);
|
||||||
|
$('#cbxInterfacemonthly').on('change', ShowBandwidthChartHandler);
|
||||||
|
ShowBandwidthChartHandler();
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery, t);
|
||||||
|
|
7
app/js/bandwidthcharts.min.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* RaspAP - RaspAP WiFi Configuration Portal v1.6.1 (https://github.com/billz/raspap-webgui)
|
||||||
|
* Copyright 2013-2019 RaspAP Developers
|
||||||
|
* Licensed under MIT (https://github.com/raspap-webgui/raspap-webgui/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
|
|
||||||
|
!function(r,i){"use strict";function t(t){r("#divChartBandwidthhourly").empty(),r("#divChartBandwidthdaily").empty(),r("#divChartBandwidthmonthly").empty(),r("#divTableBandwidthhourly").empty(),r("#divTableBandwidthdaily").empty(),r("#divTableBandwidthmonthly").empty();var e=r("ul#tabbarBandwidth li.active a").attr("href").substr(1),a="ajax/bandwidth/get_bandwidth.php?";a+="inet=",a+=encodeURIComponent(r("#cbxInterface"+e+" option:selected").text()),a+="&tu=",a+=encodeURIComponent(e.substr(0,1));var d="mb";a+="&dsu="+encodeURIComponent(d);var n=function(t,e){return new Morris.Bar({element:t,xkey:"date",ykeys:["rx","tx"],labels:[i.receive+" "+e.toUpperCase(),i.send+" "+e.toUpperCase()]})}("divChartBandwidth"+e,d);!function(t,e){r("#"+t).append('<table id="tableBandwidth'+e+'" class="table table-responsive table-striped container-fluid"><thead><tr><th>date</th><th>rx</th><th>tx</th></tr></thead><tbody></tbody></table>')}("divTableBandwidth"+e,e);r.ajax({url:a,dataType:"json",beforeSend:function(){r("#divLoaderBandwidth"+e).removeClass("hidden")}}).done(function(t){r("#divLoaderBandwidth"+e).addClass("hidden"),n.setData(t),r("#tableBandwidth"+e).DataTable({searching:!1,paging:!1,data:t,order:[[0,"ASC"]],columns:[{data:"date"},{data:"rx",title:i.receive+" "+d.toUpperCase()},{data:"tx",title:i.send+" "+d.toUpperCase()}]})}).fail(function(t,e){window.console?console.error("server error"):alert("server error")})}r(document).ready(function(){r('#tabbarBandwidth a[data-toggle="tab"]').on("shown.bs.tab",t),r("#cbxInterfacehourly").on("change",t),r("#cbxInterfacedaily").on("change",t),r("#cbxInterfacemonthly").on("change",t),t()})}(jQuery,t);
|
646
app/js/custom.js
Normal file
@ -0,0 +1,646 @@
|
|||||||
|
function msgShow(retcode,msg) {
|
||||||
|
if(retcode == 0) { var alertType = 'success';
|
||||||
|
} else if(retcode == 2 || retcode == 1) {
|
||||||
|
var alertType = 'danger';
|
||||||
|
}
|
||||||
|
var htmlMsg = '<div class="alert alert-'+alertType+' alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+msg+'</div>';
|
||||||
|
return htmlMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createNetmaskAddr(bitCount) {
|
||||||
|
var mask=[];
|
||||||
|
for(i=0;i<4;i++) {
|
||||||
|
var n = Math.min(bitCount, 8);
|
||||||
|
mask.push(256 - Math.pow(2, 8-n));
|
||||||
|
bitCount -= n;
|
||||||
|
}
|
||||||
|
return mask.join('.');
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadSummary(strInterface) {
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/networking/get_ip_summary.php',{'interface': strInterface, 'csrf_token': csrfToken},function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
if(jsonData['return'] == 0) {
|
||||||
|
$('#'+strInterface+'-summary').html(jsonData['output'].join('<br />'));
|
||||||
|
} else if(jsonData['return'] == 2) {
|
||||||
|
$('#'+strInterface+'-summary').append('<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+jsonData['output'].join('<br />')+'</div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAllInterfaces() {
|
||||||
|
$.get('ajax/networking/get_all_interfaces.php',function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$.each(jsonData,function(ind,value){
|
||||||
|
loadSummary(value)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupTabs() {
|
||||||
|
$('a[data-toggle="tab"]').on('shown.bs.tab',function(e){
|
||||||
|
var target = $(e.target).attr('href');
|
||||||
|
if(!target.match('summary')) {
|
||||||
|
var int = target.replace("#","");
|
||||||
|
loadCurrentSettings(int);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on("click", ".js-add-dhcp-static-lease", function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var container = $(".js-new-dhcp-static-lease");
|
||||||
|
var mac = $("input[name=mac]", container).val().trim();
|
||||||
|
var ip = $("input[name=ip]", container).val().trim();
|
||||||
|
var comment = $("input[name=comment]", container).val().trim();
|
||||||
|
if (mac == "" || ip == "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var row = $("#js-dhcp-static-lease-row").html()
|
||||||
|
.replace("{{ mac }}", mac)
|
||||||
|
.replace("{{ ip }}", ip)
|
||||||
|
.replace("{{ comment }}", comment);
|
||||||
|
$(".js-dhcp-static-lease-container").append(row);
|
||||||
|
|
||||||
|
$("input[name=mac]", container).val("");
|
||||||
|
$("input[name=ip]", container).val("");
|
||||||
|
$("input[name=comment]", container).val("");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".js-remove-dhcp-static-lease", function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$(this).parents(".js-dhcp-static-lease-row").remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("submit", ".js-dhcp-settings-form", function(e) {
|
||||||
|
$(".js-add-dhcp-static-lease").trigger("click");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".js-add-dhcp-upstream-server", function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var field = $("#add-dhcp-upstream-server-field")
|
||||||
|
var row = $("#dhcp-upstream-server").html().replace("{{ server }}", field.val())
|
||||||
|
|
||||||
|
if (field.val().trim() == "") { return }
|
||||||
|
|
||||||
|
$(".js-dhcp-upstream-servers").append(row)
|
||||||
|
|
||||||
|
field.val("")
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".js-remove-dhcp-upstream-server", function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$(this).parents(".js-dhcp-upstream-server").remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("submit", ".js-dhcp-settings-form", function(e) {
|
||||||
|
$(".js-add-dhcp-upstream-server").trigger("click");
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mark a form field, e.g. a select box, with the class `.js-field-preset`
|
||||||
|
* and give it an attribute `data-field-preset-target` with a text field's
|
||||||
|
* css selector.
|
||||||
|
*
|
||||||
|
* now, if the element marked `.js-field-preset` receives a `change` event,
|
||||||
|
* its value will be copied to all elements matching the selector in
|
||||||
|
* data-field-preset-target.
|
||||||
|
*/
|
||||||
|
$(document).on("change", ".js-field-preset", function(e) {
|
||||||
|
var selector = this.getAttribute("data-field-preset-target")
|
||||||
|
var value = "" + this.value
|
||||||
|
var syncValue = function(el) { el.value = value }
|
||||||
|
|
||||||
|
if (value.trim() === "") { return }
|
||||||
|
|
||||||
|
document.querySelectorAll(selector).forEach(syncValue)
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#gen_wpa_passphrase", function(e) {
|
||||||
|
$('#txtwpapassphrase').val(genPassword(63));
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#js-clearhostapd-log", function(e) {
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/hostapd.log', 'csrf_token': csrfToken},function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$("#hostapd-log").val("");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#js-cleardnsmasq-log", function(e) {
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/logging/clearlog.php?',{'logfile':'/var/log/dnsmasq.log', 'csrf_token': csrfToken},function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$("#dnsmasq-log").val("");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", "#js-clearopenvpn-log", function(e) {
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/openvpn.log', 'csrf_token': csrfToken},function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$("#openvpn-log").val("");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Enable Bootstrap tooltips
|
||||||
|
$(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
})
|
||||||
|
|
||||||
|
function genPassword(pwdLen) {
|
||||||
|
var pwdChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
|
var rndPass = Array(pwdLen).fill(pwdChars).map(function(x) { return x[Math.floor(Math.random() * x.length)] }).join('');
|
||||||
|
return rndPass;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupBtns() {
|
||||||
|
$('#btnSummaryRefresh').click(function(){getAllInterfaces();});
|
||||||
|
$('.intsave').click(function(){
|
||||||
|
var int = $(this).data('int');
|
||||||
|
saveNetworkSettings(int);
|
||||||
|
});
|
||||||
|
$('.intapply').click(function(){
|
||||||
|
applyNetworkSettings();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCSRFTokenHeader(event, xhr, settings) {
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
if (/^(POST|PATCH|PUT|DELETE)$/i.test(settings.type)) {
|
||||||
|
xhr.setRequestHeader("X-CSRF-Token", csrfToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function contentLoaded() {
|
||||||
|
pageCurrent = window.location.href.split("/").pop();
|
||||||
|
switch(pageCurrent) {
|
||||||
|
case "network_conf":
|
||||||
|
getAllInterfaces();
|
||||||
|
setupTabs();
|
||||||
|
setupBtns();
|
||||||
|
break;
|
||||||
|
case "hostapd_conf":
|
||||||
|
loadChannel();
|
||||||
|
setHardwareModeTooltip();
|
||||||
|
break;
|
||||||
|
case "dhcpd_conf":
|
||||||
|
loadInterfaceDHCPSelect();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadWifiStations(refresh) {
|
||||||
|
return function() {
|
||||||
|
var complete = function() { $(this).removeClass('loading-spinner'); }
|
||||||
|
var qs = refresh === true ? '?refresh' : '';
|
||||||
|
$('.js-wifi-stations')
|
||||||
|
.addClass('loading-spinner')
|
||||||
|
.empty()
|
||||||
|
.load('ajax/networking/wifi_stations.php'+qs, complete);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$(".js-reload-wifi-stations").on("click", loadWifiStations(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
Populates the DHCP server form fields
|
||||||
|
Option toggles are set dynamically depending on the loaded configuration
|
||||||
|
*/
|
||||||
|
function loadInterfaceDHCPSelect() {
|
||||||
|
var strInterface = $('#cbxdhcpiface').val();
|
||||||
|
$.get('ajax/networking/get_netcfg.php?iface='+strInterface,function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$('#dhcp-iface')[0].checked = jsonData.DHCPEnabled;
|
||||||
|
$('#txtipaddress').val(jsonData.StaticIP);
|
||||||
|
$('#txtsubnetmask').val(jsonData.SubnetMask);
|
||||||
|
$('#txtgateway').val(jsonData.StaticRouters);
|
||||||
|
$('#chkfallback')[0].checked = jsonData.FallbackEnabled;
|
||||||
|
$('#default-route').prop('checked', jsonData.DefaultRoute);
|
||||||
|
if (strInterface.startsWith("wl")) {
|
||||||
|
$('#nohook-wpa-supplicant').parent().parent().parent().show()
|
||||||
|
$('#nohook-wpa-supplicant').prop('checked', jsonData.NoHookWPASupplicant);
|
||||||
|
} else {
|
||||||
|
$('#nohook-wpa-supplicant').parent().parent().parent().hide()
|
||||||
|
}
|
||||||
|
$('#txtrangestart').val(jsonData.RangeStart);
|
||||||
|
$('#txtrangeend').val(jsonData.RangeEnd);
|
||||||
|
$('#txtrangeleasetime').val(jsonData.leaseTime);
|
||||||
|
$('#txtdns1').val(jsonData.DNS1);
|
||||||
|
$('#txtdns2').val(jsonData.DNS2);
|
||||||
|
$('#cbxrangeleasetimeunits').val(jsonData.leaseTimeInterval);
|
||||||
|
$('#no-resolv')[0].checked = jsonData.upstreamServersEnabled;
|
||||||
|
$('#cbxdhcpupstreamserver').val(jsonData.upstreamServers[0]);
|
||||||
|
$('#txtmetric').val(jsonData.Metric);
|
||||||
|
|
||||||
|
if (jsonData.StaticIP !== null && jsonData.StaticIP !== '' && !jsonData.FallbackEnabled) {
|
||||||
|
$('#chkstatic').closest('.btn').button('toggle');
|
||||||
|
$('#chkstatic').closest('.btn').button('toggle').blur();
|
||||||
|
$('#chkstatic').blur();
|
||||||
|
$('#chkfallback').prop('disabled', true);
|
||||||
|
} else {
|
||||||
|
$('#chkdhcp').closest('.btn').button('toggle');
|
||||||
|
$('#chkdhcp').closest('.btn').button('toggle').blur();
|
||||||
|
$('#chkdhcp').blur();
|
||||||
|
$('#chkfallback').prop('disabled', false);
|
||||||
|
}
|
||||||
|
if (jsonData.FallbackEnabled || $('#chkdhcp').is(':checked')) {
|
||||||
|
$('#dhcp-iface').prop('disabled', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setDHCPToggles(state) {
|
||||||
|
if ($('#chkfallback').is(':checked') && state) {
|
||||||
|
$('#chkfallback').prop('checked', state);
|
||||||
|
}
|
||||||
|
if ($('#dhcp-iface').is(':checked') && !state) {
|
||||||
|
$('#dhcp-iface').prop('checked', state);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#chkfallback').prop('disabled', state);
|
||||||
|
$('#dhcp-iface').prop('disabled', !state);
|
||||||
|
//$('#dhcp-iface').prop('checked', state);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadChannel() {
|
||||||
|
$.get('ajax/networking/get_channel.php',function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
loadChannelSelect(jsonData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#hostapdModal').on('shown.bs.modal', function (e) {
|
||||||
|
var seconds = 9;
|
||||||
|
var countDown = setInterval(function(){
|
||||||
|
if(seconds <= 0){
|
||||||
|
clearInterval(countDown);
|
||||||
|
}
|
||||||
|
var pct = Math.floor(100-(seconds*100/9));
|
||||||
|
document.getElementsByClassName('progress-bar').item(0).setAttribute('style','width:'+Number(pct)+'%');
|
||||||
|
seconds --;
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#configureClientModal').on('shown.bs.modal', function (e) {
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ovpn-confirm-delete').on('click', '.btn-delete', function (e) {
|
||||||
|
var cfg_id = $(this).data('recordId');
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/openvpn/del_ovpncfg.php',{'cfg_id':cfg_id, 'csrf_token': csrfToken},function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$("#ovpn-confirm-delete").modal('hide');
|
||||||
|
var row = $(document.getElementById("openvpn-client-row-" + cfg_id));
|
||||||
|
row.fadeOut( "slow", function() {
|
||||||
|
row.remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ovpn-confirm-delete').on('show.bs.modal', function (e) {
|
||||||
|
var data = $(e.relatedTarget).data();
|
||||||
|
$('.btn-delete', this).data('recordId', data.recordId);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ovpn-confirm-activate').on('click', '.btn-activate', function (e) {
|
||||||
|
var cfg_id = $(this).data('record-id');
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/openvpn/activate_ovpncfg.php',{'cfg_id':cfg_id, 'csrf_token': csrfToken},function(data){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
$("#ovpn-confirm-activate").modal('hide');
|
||||||
|
setTimeout(function(){
|
||||||
|
window.location.reload();
|
||||||
|
},300);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ovpn-confirm-activate').on('shown.bs.modal', function (e) {
|
||||||
|
var data = $(e.relatedTarget).data();
|
||||||
|
$('.btn-activate', this).data('recordId', data.recordId);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ovpn-userpw,#ovpn-certs').on('click', function (e) {
|
||||||
|
if (this.id == 'ovpn-userpw') {
|
||||||
|
$('#PanelCerts').hide();
|
||||||
|
$('#PanelUserPW').show();
|
||||||
|
} else if (this.id == 'ovpn-certs') {
|
||||||
|
$('#PanelUserPW').hide();
|
||||||
|
$('#PanelCerts').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#js-system-reset-confirm').on('click', function (e) {
|
||||||
|
var progressText = $('#js-system-reset-confirm').attr('data-message');
|
||||||
|
var successHtml = $('#system-reset-message').attr('data-message');
|
||||||
|
var closeHtml = $('#js-system-reset-cancel').attr('data-message');
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
var progressHtml = $('<div>').text(progressText).html() + '<i class="fas fa-cog fa-spin ml-2"></i>';
|
||||||
|
$('#system-reset-message').html(progressHtml);
|
||||||
|
$.post('ajax/networking/do_sys_reset.php?',{'csrf_token':csrfToken},function(data){
|
||||||
|
setTimeout(function(){
|
||||||
|
jsonData = JSON.parse(data);
|
||||||
|
if(jsonData['return'] == 0) {
|
||||||
|
$('#system-reset-message').text(successHtml);
|
||||||
|
} else {
|
||||||
|
$('#system-reset-message').text('Error occured: '+ jsonData['return']);
|
||||||
|
}
|
||||||
|
$("#js-system-reset-confirm").hide();
|
||||||
|
$("#js-system-reset-cancel").text(closeHtml);
|
||||||
|
},750);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#js-sys-reboot, #js-sys-shutdown').on('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
var action = $(this).data('action');
|
||||||
|
$.post('ajax/system/sys_actions.php?',{'a': action, 'csrf_token': csrfToken},function(data){
|
||||||
|
var response = JSON.parse(data);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#PanelManual").hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#wg-upload,#wg-manual').on('click', function (e) {
|
||||||
|
if (this.id == 'wg-upload') {
|
||||||
|
$('#PanelManual').hide();
|
||||||
|
$('#PanelUpload').show();
|
||||||
|
} else if (this.id == 'wg-manual') {
|
||||||
|
$('#PanelUpload').hide();
|
||||||
|
$('#PanelManual').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add the following code if you want the name of the file appear on select
|
||||||
|
$(".custom-file-input").on("change", function() {
|
||||||
|
var fileName = $(this).val().split("\\").pop();
|
||||||
|
$(this).siblings(".custom-file-label").addClass("selected").html(fileName);
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
Sets the wirelss channel select options based on hw_mode and country_code.
|
||||||
|
|
||||||
|
Methodology: In North America up to channel 11 is the maximum allowed WiFi 2.4Ghz channel,
|
||||||
|
except for the US that allows channel 12 & 13 in low power mode with additional restrictions.
|
||||||
|
Canada allows channel 12 in low power mode. Because it's unsure if low powered mode can be
|
||||||
|
supported the channels are not selectable for those countries. Also Uzbekistan and Colombia
|
||||||
|
allow up to channel 11 as maximum channel on the 2.4Ghz WiFi band.
|
||||||
|
Source: https://en.wikipedia.org/wiki/List_of_WLAN_channels
|
||||||
|
Additional: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
|
||||||
|
*/
|
||||||
|
function loadChannelSelect(selected) {
|
||||||
|
// Fetch wireless regulatory data
|
||||||
|
$.getJSON("config/wireless.json", function(json) {
|
||||||
|
var hw_mode = $('#cbxhwmode').val();
|
||||||
|
var country_code = $('#cbxcountries').val();
|
||||||
|
var channel_select = $('#cbxchannel');
|
||||||
|
var data = json["wireless_regdb"];
|
||||||
|
var selectablechannels = Array.range(1,14);
|
||||||
|
|
||||||
|
// Assign array of countries to valid frequencies (channels)
|
||||||
|
var countries_2_4Ghz_max11ch = data["2_4GHz_max11ch"].countries;
|
||||||
|
var countries_2_4Ghz_max14ch = data["2_4GHz_max14ch"].countries;
|
||||||
|
var countries_5Ghz_max48ch = data["5Ghz_max48ch"].countries;
|
||||||
|
|
||||||
|
// Map selected hw_mode and country to determine channel list
|
||||||
|
if (hw_mode === 'a') {
|
||||||
|
selectablechannels = data["5Ghz_max48ch"].channels;
|
||||||
|
} else if (($.inArray(country_code, countries_2_4Ghz_max11ch) !== -1) && (hw_mode !== 'ac') ) {
|
||||||
|
selectablechannels = data["2_4GHz_max11ch"].channels;
|
||||||
|
} else if (($.inArray(country_code, countries_2_4Ghz_max14ch) !== -1) && (hw_mode === 'b')) {
|
||||||
|
selectablechannels = data["2_4GHz_max14ch"].channels;
|
||||||
|
} else if (($.inArray(country_code, countries_5Ghz_max48ch) !== -1) && (hw_mode === 'ac')) {
|
||||||
|
selectablechannels = data["5Ghz_max48ch"].channels;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set channel select with available values
|
||||||
|
selected = (typeof selected === 'undefined') ? selectablechannels[0] : selected;
|
||||||
|
channel_select.empty();
|
||||||
|
$.each(selectablechannels, function(key,value) {
|
||||||
|
channel_select.append($("<option></option>").attr("value", value).text(value));
|
||||||
|
});
|
||||||
|
channel_select.val(selected);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sets hardware mode tooltip text for selected interface.
|
||||||
|
*/
|
||||||
|
function setHardwareModeTooltip() {
|
||||||
|
var iface = $('#cbxinterface').val();
|
||||||
|
var hwmodeText = '';
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
// Explanatory text if 802.11ac is disabled
|
||||||
|
if ($('#cbxhwmode').find('option[value="ac"]').prop('disabled') == true ) {
|
||||||
|
var hwmodeText = $('#hwmode').attr('data-tooltip');
|
||||||
|
}
|
||||||
|
$.post('ajax/networking/get_frequencies.php?',{'interface': iface, 'csrf_token': csrfToken},function(data){
|
||||||
|
var responseText = JSON.parse(data);
|
||||||
|
$('#tiphwmode').attr('data-original-title', responseText + '\n' + hwmodeText );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Updates the selected blocklist
|
||||||
|
* Request is passed to an ajax handler to download the associated list.
|
||||||
|
* Interface elements are updated to indicate current progress, status.
|
||||||
|
*/
|
||||||
|
function updateBlocklist() {
|
||||||
|
var opt = $('#cbxblocklist option:selected');
|
||||||
|
var blocklist_id = opt.val();
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
if (blocklist_id == '') { return; }
|
||||||
|
$('#cbxblocklist-status').find('i').removeClass('fas fa-check').addClass('fas fa-cog fa-spin');
|
||||||
|
$('#cbxblocklist-status').removeClass('check-hidden').addClass('check-progress');
|
||||||
|
$.post('ajax/adblock/update_blocklist.php',{ 'blocklist_id':blocklist_id, 'csrf_token': csrfToken},function(data){
|
||||||
|
var jsonData = JSON.parse(data);
|
||||||
|
if (jsonData['return'] == '0') {
|
||||||
|
$('#cbxblocklist-status').find('i').removeClass('fas fa-cog fa-spin').addClass('fas fa-check');
|
||||||
|
$('#cbxblocklist-status').removeClass('check-progress').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
|
||||||
|
$('#blocklist-'+jsonData['list']).text("Just now");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearBlocklistStatus() {
|
||||||
|
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handler for the wireguard generate key button
|
||||||
|
$('.wg-keygen').click(function(){
|
||||||
|
var entity_pub = $(this).parent('div').prev('input[type="text"]');
|
||||||
|
var entity_priv = $(this).parent('div').next('input[type="hidden"]');
|
||||||
|
var updated = entity_pub.attr('name')+"-pubkey-status";
|
||||||
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
|
$.post('ajax/networking/get_wgkey.php',{'entity':entity_pub.attr('name'), 'csrf_token': csrfToken},function(data){
|
||||||
|
var jsonData = JSON.parse(data);
|
||||||
|
entity_pub.val(jsonData.pubkey);
|
||||||
|
$('#' + updated).removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// Handler for wireguard client.conf download
|
||||||
|
$('.wg-client-dl').click(function(){
|
||||||
|
var req = new XMLHttpRequest();
|
||||||
|
var url = 'ajax/networking/get_wgcfg.php';
|
||||||
|
req.open('get', url, true);
|
||||||
|
req.responseType = 'blob';
|
||||||
|
req.setRequestHeader('Content-type', 'text/plain; charset=UTF-8');
|
||||||
|
req.onreadystatechange = function (event) {
|
||||||
|
if(req.readyState == 4 && req.status == 200) {
|
||||||
|
var blob = req.response;
|
||||||
|
var link=document.createElement('a');
|
||||||
|
link.href=window.URL.createObjectURL(blob);
|
||||||
|
link.download = 'client.conf';
|
||||||
|
link.click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
req.send();
|
||||||
|
})
|
||||||
|
|
||||||
|
// Event listener for Bootstrap's form validation
|
||||||
|
window.addEventListener('load', function() {
|
||||||
|
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||||
|
var forms = document.getElementsByClassName('needs-validation');
|
||||||
|
// Loop over them and prevent submission
|
||||||
|
var validation = Array.prototype.filter.call(forms, function(form) {
|
||||||
|
form.addEventListener('submit', function(event) {
|
||||||
|
if (form.checkValidity() === false) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
form.classList.add('was-validated');
|
||||||
|
}, false);
|
||||||
|
});
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
// Static Array method
|
||||||
|
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
|
||||||
|
|
||||||
|
$(document).on("click", ".js-toggle-password", function(e) {
|
||||||
|
var button = $(e.target)
|
||||||
|
var field = $(button.data("target"));
|
||||||
|
|
||||||
|
if (field.is(":input")) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if (!button.data("__toggle-with-initial")) {
|
||||||
|
$("i", this).removeClass("fas fa-eye").addClass(button.attr("data-toggle-with"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (field.attr("type") === "password") {
|
||||||
|
field.attr("type", "text");
|
||||||
|
} else {
|
||||||
|
$("i", this).removeClass("fas fa-eye-slash").addClass("fas fa-eye");
|
||||||
|
field.attr("type", "password");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$('#theme-select').change(function() {
|
||||||
|
var theme = themes[$( "#theme-select" ).val() ];
|
||||||
|
set_theme(theme);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function set_theme(theme) {
|
||||||
|
$('link[title="main"]').attr('href', 'app/css/' + theme);
|
||||||
|
// persist selected theme in cookie
|
||||||
|
setCookie('theme',theme,90);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var currentTheme = getCookie('theme');
|
||||||
|
// Check if the current theme is a dark theme
|
||||||
|
var isDarkTheme = currentTheme === 'lightsout.css' || currentTheme === 'material-dark.php';
|
||||||
|
|
||||||
|
$('#night-mode').prop('checked', isDarkTheme);
|
||||||
|
$('#night-mode').change(function() {
|
||||||
|
var state = $(this).is(':checked');
|
||||||
|
var currentTheme = getCookie('theme');
|
||||||
|
|
||||||
|
if (state == true) {
|
||||||
|
if (currentTheme == 'custom.php') {
|
||||||
|
set_theme('lightsout.css');
|
||||||
|
} else if (currentTheme == 'material-light.php') {
|
||||||
|
set_theme('material-dark.php');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (currentTheme == 'lightsout.css') {
|
||||||
|
set_theme('custom.php');
|
||||||
|
} else if (currentTheme == 'material-dark.php') {
|
||||||
|
set_theme('material-light.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function setCookie(cname, cvalue, exdays) {
|
||||||
|
var d = new Date();
|
||||||
|
d.setTime(d.getTime() + (exdays*24*60*60*1000));
|
||||||
|
var expires = "expires="+ d.toUTCString();
|
||||||
|
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCookie(cname) {
|
||||||
|
var regx = new RegExp(cname + "=([^;]+)");
|
||||||
|
var value = regx.exec(document.cookie);
|
||||||
|
return (value != null) ? unescape(value[1]) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define themes
|
||||||
|
var themes = {
|
||||||
|
"default": "custom.php",
|
||||||
|
"hackernews" : "hackernews.css",
|
||||||
|
"lightsout" : "lightsout.css",
|
||||||
|
"material-light" : "material-light.php",
|
||||||
|
"material-dark" : "material-dark.php",
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggles the sidebar navigation.
|
||||||
|
// Overrides the default SB Admin 2 behavior
|
||||||
|
$("#sidebarToggleTopbar").on('click', function(e) {
|
||||||
|
$("body").toggleClass("sidebar-toggled");
|
||||||
|
$(".sidebar").toggleClass("toggled d-none");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Overrides SB Admin 2
|
||||||
|
$("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
|
||||||
|
var toggled = $(".sidebar").hasClass("toggled");
|
||||||
|
// Persist state in cookie
|
||||||
|
setCookie('sidebarToggled',toggled, 90);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
if ($(window).width() < 768) {
|
||||||
|
$('.sidebar').addClass('toggled');
|
||||||
|
setCookie('sidebarToggled',false, 90);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).on("load resize",function(e) {
|
||||||
|
if ($(window).width() > 768) {
|
||||||
|
$('.sidebar').removeClass('d-none d-md-block');
|
||||||
|
if (getCookie('sidebarToggled') == 'false') {
|
||||||
|
$('.sidebar').removeClass('toggled');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Adds active class to current nav-item
|
||||||
|
$(window).bind("load", function() {
|
||||||
|
var url = window.location;
|
||||||
|
$('ul.navbar-nav a').filter(function() {
|
||||||
|
return this.href == url;
|
||||||
|
}).parent().addClass('active');
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document)
|
||||||
|
.ajaxSend(setCSRFTokenHeader)
|
||||||
|
.ready(contentLoaded)
|
||||||
|
.ready(loadWifiStations());
|
7
app/js/custom.min.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* RaspAP - RaspAP WiFi Configuration Portal v1.6.1 (https://github.com/billz/raspap-webgui)
|
||||||
|
* Copyright 2013-2019 RaspAP Developers
|
||||||
|
* Licensed under MIT (https://github.com/raspap-webgui/raspap-webgui/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
|
|
||||||
|
function msgShow(t,a){if(0==t)var e="success";else if(2==t||1==t)e="danger";return'<div class="alert alert-'+e+' alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+a+"</div>"}function createNetmaskAddr(t){var a=[];for(i=0;i<4;i++){var e=Math.min(t,8);a.push(256-Math.pow(2,8-e)),t-=e}return a.join(".")}function loadSummary(a){$.post("/ajax/networking/get_ip_summary.php",{interface:a},function(t){jsonData=JSON.parse(t),console.log(jsonData),0==jsonData.return?$("#"+a+"-summary").html(jsonData.output.join("<br />")):2==jsonData.return&&$("#"+a+"-summary").append('<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+jsonData.output.join("<br />")+"</div>")})}function getAllInterfaces(){$.get("/ajax/networking/get_all_interfaces.php",function(t){jsonData=JSON.parse(t),$.each(jsonData,function(t,a){loadSummary(a)})})}function setupTabs(){$('a[data-toggle="tab"]').on("shown.bs.tab",function(t){var a=$(t.target).attr("href");a.match("summary")||loadCurrentSettings(a.replace("#",""))})}function loadCurrentSettings(t){$.post("/ajax/networking/get_int_config.php",{interface:t},function(t){jsonData=JSON.parse(t),$.each(jsonData.output,function(t,a){var n=a.interface;$.each(a,function(t,a){switch(t){case"static":"true"==a?($("#"+n+"-static").click(),$("#"+n+"-nofailover").click()):$("#"+n+"-dhcp").click();break;case"failover":"true"===a?$("#"+n+"-failover").click():$("#"+n+"-nofailover").click();break;case"ip_address":var e=a.split("/");$("#"+n+"-ipaddress").val(e[0]),$("#"+n+"-netmask").val(createNetmaskAddr(e[1]));break;case"routers":$("#"+n+"-gateway").val(a);break;case"domain_name_server":svrsDNS=a.split(" "),$("#"+n+"-dnssvr").val(svrsDNS[0]),$("#"+n+"-dnssvralt").val(svrsDNS[1])}})})})}function saveNetworkSettings(t){var a=$("#frm-"+t).find(":input"),e={};$.each(a,function(t,a){"radio"==$(a).attr("type")?e[$(a).attr("id")]=$(a).prop("checked"):e[$(a).attr("id")]=$(a).val()}),e.interface=t,$.post("/ajax/networking/save_int_config.php",e,function(t){var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function applyNetworkSettings(){$(this).data("int");arrFormData={generate:""},$.post("/ajax/networking/gen_int_config.php",arrFormData,function(t){console.log(t);var a=JSON.parse(t);$("#msgNetworking").html(msgShow(a.return,a.output))})}function setupBtns(){$("#btnSummaryRefresh").click(function(){getAllInterfaces()}),$(".intsave").click(function(){saveNetworkSettings($(this).data("int"))}),$(".intapply").click(function(){applyNetworkSettings()})}function setCSRFTokenHeader(t,a,e){var n=$("meta[name=csrf_token]").attr("content");/^(POST|PATCH|PUT|DELETE)$/i.test(e.type)&&a.setRequestHeader("X-CSRF-Token",n)}function contentLoaded(){switch(pageCurrent=window.location.href.split("?")[1].split("=")[1],pageCurrent=pageCurrent.replace("#",""),$("#side-menu").metisMenu(),pageCurrent){case"network_conf":getAllInterfaces(),setupTabs(),setupBtns()}}function loadWifiStations(a){return function(){var t=!0===a?"?refresh":"";$(".js-wifi-stations").addClass("loading-spinner").empty().load("/ajax/networking/wifi_stations.php"+t,function(){$(this).removeClass("loading-spinner")})}}$(document).on("click",".js-add-dhcp-static-lease",function(t){t.preventDefault();var a=$(".js-new-dhcp-static-lease"),e=$("input[name=mac]",a).val().trim(),n=$("input[name=ip]",a).val().trim();if(""!=e&&""!=n){var i=$("#js-dhcp-static-lease-row").html().replace("{{ mac }}",e).replace("{{ ip }}",n);$(".js-dhcp-static-lease-container").append(i),$("input[name=mac]",a).val(""),$("input[name=ip]",a).val("")}}),$(document).on("click",".js-remove-dhcp-static-lease",function(t){t.preventDefault(),$(this).parents(".js-dhcp-static-lease-row").remove()}),$(document).on("submit",".js-dhcp-settings-form",function(t){$(".js-add-dhcp-static-lease").trigger("click")}),$(".js-reload-wifi-stations").on("click",loadWifiStations(!0)),$(document).on("click",".js-toggle-password",function(t){var a=$(t.target),e=$(a.data("target"));e.is(":input")&&(t.preventDefault(),a.data("__toggle-with-initial")||a.data("__toggle-with-initial",a.text()),"password"===e.attr("type")?(a.text(a.data("toggle-with")),e.attr("type","text")):(a.text(a.data("__toggle-with-initial")),e.attr("type","password")))}),$(document).on("keyup",".js-validate-psk",function(t){var a=$(t.target),e=a.data("colors").split(","),n=$(a.data("target"));a.val().length<8||63<a.val().length?(a.css("backgroundColor",e[0]),n.attr("disabled",!0)):(a.css("backgroundColor",e[1]),n.attr("disabled",!1))}),$(document).ajaxSend(setCSRFTokenHeader).ready(contentLoaded).ready(loadWifiStations());
|
106
app/js/dashboardchart.js
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
(function($, _t) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a Chart.js barchart.
|
||||||
|
*/
|
||||||
|
function CreateChart(ctx, labels) {
|
||||||
|
var barchart = new Chart(ctx,{
|
||||||
|
type: 'line',
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
scaleLabel: {
|
||||||
|
display: true
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
maxRotation: 0,
|
||||||
|
minRotation: 0
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
yAxes: [{
|
||||||
|
id: 'y-axis-1',
|
||||||
|
type: 'linear',
|
||||||
|
display: true,
|
||||||
|
position: 'left',
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
labels: labels,
|
||||||
|
datasets: []
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return barchart;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ShowBandwidthChartHandler(e) {
|
||||||
|
// Remove hourly chartjs chart
|
||||||
|
$('#divDBChartBandwidthhourly').empty();
|
||||||
|
// Construct ajax uri for getting the proper data
|
||||||
|
var timeunit = 'hourly';
|
||||||
|
var uri = 'ajax/bandwidth/get_bandwidth.php?';
|
||||||
|
uri += 'inet=';
|
||||||
|
uri += encodeURIComponent($('#divInterface').text());
|
||||||
|
uri += '&tu=';
|
||||||
|
uri += encodeURIComponent(timeunit.substr(0, 1));
|
||||||
|
var datasizeunits = 'mb';
|
||||||
|
uri += '&dsu='+encodeURIComponent(datasizeunits);
|
||||||
|
// Get data for chart
|
||||||
|
$.ajax({
|
||||||
|
url: uri,
|
||||||
|
dataType: 'json',
|
||||||
|
beforeSend: function() {}
|
||||||
|
}).done(function(jsondata) {
|
||||||
|
// Map json values to label array
|
||||||
|
var labels = jsondata.map(function(e) {
|
||||||
|
return e.date;
|
||||||
|
});
|
||||||
|
// Init. chart with label series
|
||||||
|
var barchart = CreateChart('divDBChartBandwidth'+timeunit, labels);
|
||||||
|
var dataRx = jsondata.map(function(e) {
|
||||||
|
return e.rx;
|
||||||
|
});
|
||||||
|
var dataTx = jsondata.map(function(e) {
|
||||||
|
return e.tx;
|
||||||
|
});
|
||||||
|
addData(barchart, dataTx, dataRx, datasizeunits);
|
||||||
|
}).fail(function(xhr, textStatus) {
|
||||||
|
if (window.console) {
|
||||||
|
console.error('server error');
|
||||||
|
} else {
|
||||||
|
alert("server error");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add data array to datasets of current chart.
|
||||||
|
*/
|
||||||
|
function addData(chart, dataTx, dataRx, datasizeunits) {
|
||||||
|
chart.data.datasets.push({
|
||||||
|
label: 'Send'+' '+datasizeunits.toUpperCase(),
|
||||||
|
yAxisID: 'y-axis-1',
|
||||||
|
borderColor: 'rgba(75, 192, 192, 1)',
|
||||||
|
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||||
|
data: dataTx
|
||||||
|
});
|
||||||
|
chart.data.datasets.push({
|
||||||
|
label: 'Receive'+' '+datasizeunits.toUpperCase(),
|
||||||
|
yAxisID: 'y-axis-1',
|
||||||
|
borderColor: 'rgba(192, 192, 192, 1)',
|
||||||
|
backgroundColor: 'rgba(192, 192, 192, 0.2)',
|
||||||
|
data: dataRx
|
||||||
|
});
|
||||||
|
chart.update();
|
||||||
|
}
|
||||||
|
$(document).ready(function() {
|
||||||
|
ShowBandwidthChartHandler();
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery, t);
|
||||||
|
|
22
app/js/huebee.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Initialize Huebee color picker
|
||||||
|
var elem = document.querySelector('.color-input');
|
||||||
|
var hueb = new Huebee( elem, {
|
||||||
|
notation: 'hex',
|
||||||
|
saturations: 2,
|
||||||
|
customColors: [ '#d8224c', '#dd4814', '#ea0', '#19f', '#333' ],
|
||||||
|
className: 'light-picker',
|
||||||
|
hue0: 210
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set custom color if defined
|
||||||
|
var color = getCookie('color');
|
||||||
|
if (color == null || color == '') {
|
||||||
|
color = '#2b8080';
|
||||||
|
}
|
||||||
|
hueb.setColor(color);
|
||||||
|
|
||||||
|
// Change event
|
||||||
|
hueb.on( 'change', function( color, hue, sat, lum ) {
|
||||||
|
setCookie('color',color,90);
|
||||||
|
})
|
||||||
|
|
88
app/js/linkquality.js
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
// Link quality gauge for ChartJS
|
||||||
|
|
||||||
|
// Support for dark theme
|
||||||
|
theme = getCookie('theme');
|
||||||
|
if (theme == 'lightsout.css') {
|
||||||
|
var borderColor = 'rgba(37, 153, 63, 1)';
|
||||||
|
var labelColor = 'rgba(37, 153, 63, 1)';
|
||||||
|
} else if (theme == 'material-light.php') {
|
||||||
|
var borderColor = '#f2f2fb';
|
||||||
|
var labelColor = '#f2f2fb';
|
||||||
|
} else if (theme == 'material-dark.php') {
|
||||||
|
var borderColor = '#f2f2fb';
|
||||||
|
var labelColor = '#f2f2fb';
|
||||||
|
} else {
|
||||||
|
var borderColor = 'rgba(147, 210, 162, 1)';
|
||||||
|
var labelColor = 'rgba(130, 130, 130, 1)';
|
||||||
|
}
|
||||||
|
|
||||||
|
let data1 = {
|
||||||
|
datasets: [{
|
||||||
|
data: [linkQ, 100-linkQ],
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
borderColor: borderColor,
|
||||||
|
}],
|
||||||
|
};
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
type: 'doughnut',
|
||||||
|
data: data1,
|
||||||
|
options: {
|
||||||
|
aspectRatio: 2,
|
||||||
|
responsive: true,
|
||||||
|
maintainAspectRatio: false,
|
||||||
|
tooltips: {enabled: false},
|
||||||
|
hover: {mode: null},
|
||||||
|
legend: {
|
||||||
|
display: false,
|
||||||
|
},
|
||||||
|
rotation: (2/3)*Math.PI,//2+(1/3),
|
||||||
|
circumference: (1+(2/3)) * Math.PI, // * Math.PI,
|
||||||
|
cutoutPercentage: 80,
|
||||||
|
animation: {
|
||||||
|
animateScale: false,
|
||||||
|
animateRotate: true
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
centerText: {
|
||||||
|
display: true,
|
||||||
|
text: linkQ + "%"
|
||||||
|
},
|
||||||
|
plugins: [{
|
||||||
|
beforeDraw: function(chart) {
|
||||||
|
if (chart.config.centerText.display !== null &&
|
||||||
|
typeof chart.config.centerText.display !== 'undefined' &&
|
||||||
|
chart.config.centerText.display) {
|
||||||
|
drawLinkQ(chart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
|
||||||
|
function drawLinkQ(chart) {
|
||||||
|
|
||||||
|
let width = chart.chart.width;
|
||||||
|
let height = chart.chart.height;
|
||||||
|
let ctx = chart.chart.ctx;
|
||||||
|
|
||||||
|
ctx.restore();
|
||||||
|
let fontSize = (height / 100).toFixed(2);
|
||||||
|
ctx.font = fontSize + "em sans-serif";
|
||||||
|
ctx.fillStyle = labelColor;
|
||||||
|
ctx.textBaseline = "middle";
|
||||||
|
|
||||||
|
let text = chart.config.centerText.text;
|
||||||
|
let textX = Math.round((width - ctx.measureText(text).width) * 0.5);
|
||||||
|
let textY = height / 2;
|
||||||
|
ctx.fillText(text, textX, textY);
|
||||||
|
ctx.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function() {
|
||||||
|
let ctx = document.getElementById("divChartLinkQ").getContext("2d");
|
||||||
|
var chart = new Chart(ctx, config);
|
||||||
|
};
|
||||||
|
|
1994
app/lib/Parsedown.php
Normal file
98
app/pitft/stats.py
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Author: @billz
|
||||||
|
# Author URI: https://github.com/billz
|
||||||
|
# Description: RaspAP stats display for the Adafruit Mini PiTFT,
|
||||||
|
# a 135x240 Color TFT add-on for the Raspberry Pi.
|
||||||
|
# Based on Adafruit's rgb_display_ministats.py
|
||||||
|
# See: https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display
|
||||||
|
# License: MIT License
|
||||||
|
|
||||||
|
import time
|
||||||
|
import subprocess
|
||||||
|
import digitalio
|
||||||
|
import board
|
||||||
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
import adafruit_rgb_display.st7789 as st7789
|
||||||
|
|
||||||
|
# Configuration for CS and DC pins
|
||||||
|
cs_pin = digitalio.DigitalInOut(board.CE0)
|
||||||
|
dc_pin = digitalio.DigitalInOut(board.D25)
|
||||||
|
reset_pin = None
|
||||||
|
|
||||||
|
# Config for display baudrate (default max is 24mhz)
|
||||||
|
BAUDRATE = 64000000
|
||||||
|
|
||||||
|
# Setup SPI bus using hardware SPI
|
||||||
|
spi = board.SPI()
|
||||||
|
|
||||||
|
# Create the ST7789 display
|
||||||
|
disp = st7789.ST7789(spi, cs=cs_pin, dc=dc_pin, rst=reset_pin, baudrate=BAUDRATE,
|
||||||
|
width=135, height=240, x_offset=53, y_offset=40)
|
||||||
|
|
||||||
|
# Create blank image with mode 'RGB'
|
||||||
|
height = disp.width # swap height/width to rotate it to landscape
|
||||||
|
width = disp.height
|
||||||
|
image = Image.new('RGB', (width, height))
|
||||||
|
rotation = 90
|
||||||
|
|
||||||
|
# Get a drawing object and clear the image
|
||||||
|
draw = ImageDraw.Draw(image)
|
||||||
|
draw.rectangle((0, 0, width, height), outline=0, fill=(0, 0, 0))
|
||||||
|
disp.image(image,rotation)
|
||||||
|
|
||||||
|
# Define some constants
|
||||||
|
padding = -2
|
||||||
|
top = padding
|
||||||
|
bottom = height-padding
|
||||||
|
# Move left to right keeping track of the current x position
|
||||||
|
x = 0
|
||||||
|
|
||||||
|
# Load DejaVu TTF Font
|
||||||
|
# Install with: sudo apt-get install ttf-dejavu
|
||||||
|
font = ImageFont.truetype('/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', 24)
|
||||||
|
|
||||||
|
# Turn on the backlight
|
||||||
|
backlight = digitalio.DigitalInOut(board.D22)
|
||||||
|
backlight.switch_to_output()
|
||||||
|
backlight.value = True
|
||||||
|
|
||||||
|
while True:
|
||||||
|
# Draw a black filled box to clear the image
|
||||||
|
draw.rectangle((0, 0, width, height), outline=0, fill=0)
|
||||||
|
|
||||||
|
# Collect basic system stats
|
||||||
|
cmd = "hostname -I | cut -d\' \' -f1"
|
||||||
|
IP = "IP: "+subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
cmd = "pidof hostapd | wc -l | awk '{printf \"Hotspot: %s\", $1 == 1 ? \"Active\" : \"Down\"}'"
|
||||||
|
Hostapd = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
cmd = "vnstat -i wlan0 | grep tx: | awk '{printf \"Data Tx: %d %s\", $5,$6}'"
|
||||||
|
DataTx = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
cmd = "top -bn1 | grep load | awk '{printf \"CPU Load: %.2f\", $(NF-2)}'"
|
||||||
|
CPU = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
cmd = "free -m | awk 'NR==2{printf \"Mem: %sMB %.2f%%\", $3,$3*100/$2 }'"
|
||||||
|
MemUsage = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
cmd = "cat /sys/class/thermal/thermal_zone0/temp | awk \'{printf \"CPU Temp: %.1f C\", $(NF-0) / 1000}\'" # pylint: disable=line-too-long
|
||||||
|
Temp = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
# Write five lines of stats
|
||||||
|
y = top
|
||||||
|
draw.text((x, y), IP, font=font, fill="#ffaaaa")
|
||||||
|
y += font.getsize(IP)[1]
|
||||||
|
draw.text((x, y), Hostapd, font=font, fill="#d46a6a")
|
||||||
|
y += font.getsize(Hostapd)[1]
|
||||||
|
draw.text((x, y), DataTx, font=font, fill="#aa3939")
|
||||||
|
y += font.getsize(DataTx)[1]
|
||||||
|
draw.text((x, y), MemUsage, font=font, fill="#801515")
|
||||||
|
y += font.getsize(MemUsage)[1]
|
||||||
|
draw.text((x, y), Temp, font=font, fill="#550000")
|
||||||
|
|
||||||
|
# Display image
|
||||||
|
disp.image(image, rotation)
|
||||||
|
time.sleep(.1)
|
||||||
|
|
49
bower.json
@ -1,49 +0,0 @@
|
|||||||
|
|
||||||
{
|
|
||||||
"name": "startbootstrap-sb-admin-2",
|
|
||||||
"homepage": "http://startbootstrap.com/template-overviews/sb-admin-2/",
|
|
||||||
"version": "3.3.7+1",
|
|
||||||
"authors": [
|
|
||||||
"David Miller"
|
|
||||||
],
|
|
||||||
"description": "A free, open source, Bootstrap admin theme created by Start Bootstrap",
|
|
||||||
"keywords": [
|
|
||||||
"bootstrap",
|
|
||||||
"theme"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"node_modules",
|
|
||||||
"bower_components",
|
|
||||||
"test",
|
|
||||||
"tests",
|
|
||||||
"pages",
|
|
||||||
"index.html",
|
|
||||||
"/js"
|
|
||||||
],
|
|
||||||
"main": [
|
|
||||||
"dist/css/sb-admin-2.css",
|
|
||||||
"dist/css/sb-admin-2.min.css",
|
|
||||||
"dist/js/sb-admin-2.js",
|
|
||||||
"dist/js/sb-admin-2.min.js"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"bootstrap": "~3.3.7",
|
|
||||||
"bootstrap-toggle": "~2.2.0",
|
|
||||||
"datatables": "~1.10.4",
|
|
||||||
"datatables-plugins": "~1.0.1",
|
|
||||||
"flot": "~0.8.3",
|
|
||||||
"font-awesome": "~4.6.3",
|
|
||||||
"holderjs": "~2.4.1",
|
|
||||||
"metisMenu": "~1.1.3",
|
|
||||||
"morrisjs": "~0.5.1",
|
|
||||||
"datatables-responsive": "1.0.6",
|
|
||||||
"bootstrap-social": "~4.8.0",
|
|
||||||
"flot.tooltip": "~0.8.4"
|
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"font-awesome": "~4.6.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
31
composer.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"name": "raspap/raspap-webgui",
|
||||||
|
"description": "Simple wireless AP setup and mangement for Debian-based devices",
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"homepage": "https://raspap.com/",
|
||||||
|
"keywords": ["raspberrypi", "debian", "armbian", "wifi"],
|
||||||
|
"type": "raspap-core",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "RaspAP Team",
|
||||||
|
"email": "billzimmerman@gmail.com",
|
||||||
|
"homepage": "https://raspap.com/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": "^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"php-parallel-lint/php-parallel-lint": "^1.2.0",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||||
|
"squizlabs/php_codesniffer": "^3.5.5"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "parallel-lint . --exclude vendor",
|
||||||
|
"phpcs": "phpcs -p -s --config-set installed_paths vendor/phpcompatibility/php-compatibility .",
|
||||||
|
"test": [
|
||||||
|
"composer lint",
|
||||||
|
"composer phpcs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
4
config/090_raspap.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# RaspAP default config
|
||||||
|
log-facility=/var/log/dnsmasq.log
|
||||||
|
conf-dir=/etc/dnsmasq.d
|
||||||
|
|
6
config/090_wlan0.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# RaspAP wlan0 configuration for wired (ethernet) AP mode
|
||||||
|
interface=wlan0
|
||||||
|
domain-needed
|
||||||
|
dhcp-range=10.3.141.50,10.3.141.254,255.255.255.0,12h
|
||||||
|
dhcp-option=6,9.9.9.9,1.1.1.1
|
||||||
|
|
9
config/50-raspap-router.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
server.modules += (
|
||||||
|
"mod_rewrite",
|
||||||
|
)
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" {
|
||||||
|
url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" )
|
||||||
|
server.error-handler-404 = "/REPLACE_ME/index.php"
|
||||||
|
}
|
||||||
|
|
17
config/blocklists.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"StevenBlack/hosts": [
|
||||||
|
"StevenBlack/hosts (default)"
|
||||||
|
],
|
||||||
|
"badmojr/hosts": [
|
||||||
|
"badmojr/1Hosts (Mini)",
|
||||||
|
"badmojr/1Hosts (Lite)",
|
||||||
|
"badmojr/1Hosts (Pro)",
|
||||||
|
"badmojr/1Hosts (Xtra)"
|
||||||
|
],
|
||||||
|
"OISD/domains": [
|
||||||
|
"oisd/big (default)",
|
||||||
|
"oisd/small",
|
||||||
|
"oisd/nsfw"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
4
config/client_config/70-mobile-data-sticks.rules
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# mobile data modem - ttyUSB0 device appears
|
||||||
|
SUBSYSTEM=="tty", KERNEL=="ttyUSB0", TAG+="systemd", ENV{SYSTEMD_WANTS}="start start_ppp0_device.service"
|
||||||
|
|
||||||
|
|
3
config/client_config/80-raspap-net-devices.rules
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
SUBSYSTEM=="net", ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14db", NAME="hilink%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="start start_huawei_hilink@hilink%n.service"
|
||||||
|
|
||||||
|
|
505
config/client_config/huawei_hilink_api.sh
Normal file
@ -0,0 +1,505 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Huawei Hilink API
|
||||||
|
# =================
|
||||||
|
# - communication with Hilink devices via HTTP
|
||||||
|
# - send a standard http request with a xml formatted string to the device (default IP 192.169.8.1)
|
||||||
|
# - Howto:
|
||||||
|
# o "source" this script in your own script from the command line
|
||||||
|
# o if hilink_host ip/name differs, set "hilink_host=192.168.178.1" before calling any function
|
||||||
|
# o if the device is locked by a password, set hilink_user="admin"; hilink_password"1234secret"
|
||||||
|
# _login is called automatically
|
||||||
|
# only password type 4 is supported
|
||||||
|
# o if the SIM is requiring a PIN, set "hilink_pin=1234"
|
||||||
|
# o connect device to network: _switchMobileData ON ( or 1 )
|
||||||
|
# o disconnect device: _switchMobileData OFF ( or 0 )
|
||||||
|
# o get informations about the device: _getDeviceInformation and _getStatus and _getNetProvider
|
||||||
|
# all functions return XML formatted data in $response.
|
||||||
|
# o _getAllInformations: returns all available informations as key/value pairs (outputs text)
|
||||||
|
# o Check if device is connected: "if _isConnected; then .... fi"
|
||||||
|
# o $response can be parsed by calling _valueFromResponse
|
||||||
|
# e.g "_valueFromResponse msisdn" to get the phone number after a call to _getDeviceInformation
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Usage of functions
|
||||||
|
# - call the function with parameters (if required)
|
||||||
|
# - return code: 0 - success; 1 - failed
|
||||||
|
# - $status: status information (OK, ERROR)
|
||||||
|
# - $response: xml response to be parsed for the required information
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# required software: curl, base64, sha256sum, sed
|
||||||
|
#
|
||||||
|
# ToDo: improve error handling
|
||||||
|
#
|
||||||
|
# zbchristian 2021
|
||||||
|
#
|
||||||
|
|
||||||
|
# Initialization procedure
|
||||||
|
# ========================
|
||||||
|
#
|
||||||
|
# hilink_host=192.168.8.1 # ip address of device
|
||||||
|
# hilink_user="admin" # user name if locked (default admin)
|
||||||
|
# hilink_password="1234Secret" # password if locked
|
||||||
|
# hilink_pin="1234" # PIN of SIM
|
||||||
|
# _initHilinkAPI # initialize the API
|
||||||
|
#
|
||||||
|
# Termination
|
||||||
|
# ===========
|
||||||
|
# cleanup the API before quitting the shell
|
||||||
|
# _closeHilinkAPI (optional: add parameter "save" to save the session/token data for subsequent calls. Valid for a few minutes.)
|
||||||
|
#
|
||||||
|
# BE AWARE, THAT THE API USES SOME GLOBAL VARIABLES : hilink_host, user, password, pin, response, status
|
||||||
|
# USE THESE ONLY TO COMMUNICATE WITH THE API.
|
||||||
|
# DO NOT USE THE VARIABLE PRE_FIX "hilink_" FOR YOUR OWN VARIABLES
|
||||||
|
#
|
||||||
|
|
||||||
|
hilink_host_default="192.168.8.1"
|
||||||
|
hilink_save_file="/tmp/hilink_api_saved.dat"
|
||||||
|
hilink_save_age=60
|
||||||
|
hilink_header_file="/tmp/hilink_login_hdr.txt"
|
||||||
|
|
||||||
|
# initialize
|
||||||
|
function _initHilinkAPI() {
|
||||||
|
local age
|
||||||
|
if [ -z "$hilink_host" ]; then hilink_host=$hilink_host_default; fi
|
||||||
|
if ! _hostReachable; then return 1; fi
|
||||||
|
if [ -f $hilink_save_file ]; then # found file with saved data
|
||||||
|
_getSavedData
|
||||||
|
age=$(( $(date +%s) - $(stat $hilink_save_file -c %Y) ))
|
||||||
|
if [[ $age -gt $hilink_save_age ]]; then
|
||||||
|
rm -f $hilink_save_file
|
||||||
|
_logout
|
||||||
|
_sessToken
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$hilink_sessID" ] || [ -z "$hilink_token" ]; then _sessToken; fi
|
||||||
|
_login
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
function _getSavedData() {
|
||||||
|
local dat
|
||||||
|
if [ -f $hilink_save_file ]; then # restore saved session data
|
||||||
|
dat=$(cat $hilink_save_file)
|
||||||
|
hilink_sessID=$(echo "$dat" | sed -nr 's/sessionid: ([a-z0-9]*)/\1/ip')
|
||||||
|
hilink_token=$(echo "$dat" | sed -nr 's/token: ([a-z0-9]*)/\1/ip')
|
||||||
|
hilink_tokenlist=( $(echo "$dat" | sed -nr 's/tokenlist: ([a-z0-9 ]*)/\1/ip') )
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
# parameter: "save" - will store sessionid and tokens in file
|
||||||
|
function _closeHilinkAPI() {
|
||||||
|
local opt
|
||||||
|
if [ -z "$hilink_host" ]; then hilink_host=$hilink_host_default; fi
|
||||||
|
if ! _hostReachable; then return 1; fi
|
||||||
|
rm -f $hilink_save_file
|
||||||
|
[ ! -z "$1" ] && opt="${1,,}"
|
||||||
|
if [ ! -z "$opt" ] && [ "$opt" = "save" ]; then
|
||||||
|
echo "sessionid: $hilink_sessID" > $hilink_save_file
|
||||||
|
echo "token: $hilink_token" >> $hilink_save_file
|
||||||
|
echo "tokenlist: ${hilink_tokenlist[@]}" >> $hilink_save_file
|
||||||
|
fi
|
||||||
|
_logout
|
||||||
|
hilink_tokenlist=""
|
||||||
|
hilink_sessID=""
|
||||||
|
hilink_token=""
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# get status (connection status, DNS, )
|
||||||
|
# parameter: none
|
||||||
|
function _getStatus() {
|
||||||
|
if _login; then
|
||||||
|
if _sendRequest "api/monitoring/status"; then
|
||||||
|
if [ ! -z "$1" ]; then _valueFromResponse "$1"; fi
|
||||||
|
fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function _isConnected() {
|
||||||
|
local conn
|
||||||
|
conn=$(_getStatus "connectionstatus")
|
||||||
|
status="NO"
|
||||||
|
if [ ! -z "$conn" ] && [ $conn -eq 901 ]; then
|
||||||
|
status="YES"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# get device information (device name, imei, imsi, msisdn-phone number, MAC, WAN IP ...)
|
||||||
|
# parameter: name of parameter to return
|
||||||
|
function _getDeviceInformation() {
|
||||||
|
if _login; then
|
||||||
|
if _sendRequest "api/device/information"; then
|
||||||
|
if [ ! -z "$1" ]; then _valueFromResponse "$1"; fi
|
||||||
|
fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# get net provider information
|
||||||
|
# parameter: name of parameter to return
|
||||||
|
function _getNetProvider() {
|
||||||
|
if _login; then
|
||||||
|
if _sendRequest "api/net/current-plmn"; then
|
||||||
|
if [ ! -z "$1" ]; then _valueFromResponse "$1"; fi
|
||||||
|
fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# get signal level
|
||||||
|
# parameter: name of parameter to return
|
||||||
|
function _getSignal() {
|
||||||
|
if _login; then
|
||||||
|
if _sendRequest "api/device/signal"; then
|
||||||
|
if [ ! -z "$1" ]; then _valueFromResponse "$1"; fi
|
||||||
|
fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function _getAllInformations() {
|
||||||
|
if _getDeviceInformation; then _keyValuePairs; fi
|
||||||
|
if _getSignal; then _keyValuePairs; fi
|
||||||
|
if _getNetProvider; then _keyValuePairs; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get status of mobile data connection
|
||||||
|
# parameter: none
|
||||||
|
function _getMobileDataStatus() {
|
||||||
|
if _login; then
|
||||||
|
if _sendRequest "api/dialup/mobile-dataswitch"; then
|
||||||
|
status=$(_valueFromResponse "dataswitch")
|
||||||
|
if [ $? -eq 0 ] && [ ! -z "$status" ]; then echo "$status"; fi
|
||||||
|
fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# PIN of SIM can be passed either as $hilink_pin, or as parameter
|
||||||
|
# parameter: PIN number of SIM card
|
||||||
|
function _enableSIM() {
|
||||||
|
#SimState:
|
||||||
|
#255 - no SIM,
|
||||||
|
#256 - error CPIN,
|
||||||
|
#257 - ready,
|
||||||
|
#258 - PIN disabled,
|
||||||
|
#259 - check PIN,
|
||||||
|
#260 - PIN required,
|
||||||
|
#261 - PUK required
|
||||||
|
local simstate
|
||||||
|
if [ ! -z "$1" ]; then hilink_pin="$1"; fi
|
||||||
|
if ! _login; then return 1; fi
|
||||||
|
if _sendRequest "api/pin/status"; then
|
||||||
|
simstate=$(echo $response | sed -rn 's/.*<simstate>([0-9]*)<\/simstate>.*/\1/pi')
|
||||||
|
if [[ $simstate -eq 257 ]]; then status="SIM ready"; return 0; fi
|
||||||
|
if [[ $simstate -eq 260 ]]; then
|
||||||
|
status="PIN required"
|
||||||
|
if [ ! -z "$hilink_pin" ]; then _setPIN "$hilink_pin"; fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
if [[ $simstate -eq 255 ]]; then status="NO SIM"; return 1; fi
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# obtain session and verification token - stored in vars $hilink_sessID and $token
|
||||||
|
# parameter: none
|
||||||
|
function _sessToken() {
|
||||||
|
hilink_tokenlist=""
|
||||||
|
hilink_token=""
|
||||||
|
hilink_sessID=""
|
||||||
|
response=$(curl -s http://$hilink_host/api/webserver/SesTokInfo -m 5 2> /dev/null)
|
||||||
|
if [ -z "$response" ]; then echo "No access to device at $hilink_host"; return 1; fi
|
||||||
|
status=$(echo "$response" | sed -nr 's/.*<code>([0-9]*)<\/code>.*/\1/ip')
|
||||||
|
if [ -z "$status" ]; then
|
||||||
|
hilink_token=$(echo $response | sed -r 's/.*<TokInfo>(.*)<\/TokInfo>.*/\1/')
|
||||||
|
hilink_sessID=$(echo $response | sed -r 's/.*<SesInfo>(.*)<\/SesInfo>.*/\1/')
|
||||||
|
if [ ! -z "$hilink_sessID" ] && [ ! -z "$hilink_token" ]; then
|
||||||
|
hilink_sessID="SessionID=$hilink_sessID"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# unlock device (if locked) with user name and password
|
||||||
|
# requires stored hilink_user="admin"; hilink_password"1234secret";hilink_host=$hilink_host_default
|
||||||
|
# parameter: none
|
||||||
|
function _login() {
|
||||||
|
local ret encpw pwtype pwtype3 hashedpw pwtype4
|
||||||
|
if _loginState; then return 0; fi # login not required, or already done
|
||||||
|
_sessToken
|
||||||
|
# get password type
|
||||||
|
if ! _sendRequest "api/user/state-login"; then return 1; fi
|
||||||
|
pwtype=$(echo "$response" | sed -rn 's/.*<password_type>([0-9])<\/password_type>.*/\1/pi')
|
||||||
|
if [ -z "$pwtype" ];then pwtype=4; fi # fallback is type 4
|
||||||
|
ret=1
|
||||||
|
if [[ ! -z "$hilink_user" ]] && [[ ! -z "$hilink_password" ]]; then
|
||||||
|
# password encoding
|
||||||
|
# type 3 : base64(pw) encoded
|
||||||
|
# type 4 : base64(sha256sum(user + base64(sha256sum(pw)) + token))
|
||||||
|
pwtype3=$(echo -n "$hilink_password" | base64 --wrap=0)
|
||||||
|
hashedpw=$(echo -n "$hilink_password" | sha256sum -b | sed -nr 's/^([0-9a-z]*).*$/\1/ip' )
|
||||||
|
hashedpw=$(echo -n "$hashedpw" | base64 --wrap=0)
|
||||||
|
pwtype4=$(echo -n "$hilink_user$hashedpw$hilink_token" | sha256sum -b | sed -nr 's/^([0-9a-z]*).*$/\1/ip' )
|
||||||
|
encpw=$(echo -n "$pwtype4" | base64 --wrap=0)
|
||||||
|
if [ $pwtype -ne 4 ]; then encpw=$pwtype3; fi
|
||||||
|
hilink_xmldata="<?xml version='1.0' encoding='UTF-8'?><request><Username>$hilink_user</Username><Password>$encpw</Password><password_type>$pwtype</password_type></request>"
|
||||||
|
hilink_xtraopts="--dump-header $hilink_header_file"
|
||||||
|
rm -f $hilink_header_file
|
||||||
|
_sendRequest "api/user/login"
|
||||||
|
if [ ! -z "$status" ] && [ "$status" = "OK" ]; then
|
||||||
|
# store the list of 30 tokens. Each token is valid for a single request
|
||||||
|
hilink_tokenlist=( $(cat $hilink_header_file | sed -rn 's/^__RequestVerificationToken:\s*([0-9a-z#]*).*$/\1/pi' | sed 's/#/ /g') )
|
||||||
|
_getToken
|
||||||
|
hilink_sessID=$(cat $hilink_header_file | grep -ioP 'SessionID=([a-z0-9]*)')
|
||||||
|
if [ ! -z "$hilink_sessID" ] && [ ! -z "$hilink_token" ]; then ret=0; fi
|
||||||
|
fi
|
||||||
|
rm -f $hilink_header_file
|
||||||
|
fi
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
# logout of hilink device
|
||||||
|
# parameter: none
|
||||||
|
function _logout() {
|
||||||
|
if _loginState; then
|
||||||
|
hilink_xmldata="<?xml version: '1.0' encoding='UTF-8'?><request><Logout>1</Logout></request>"
|
||||||
|
if _sendRequest "api/user/logout"; then
|
||||||
|
hilink_tokenlist=""
|
||||||
|
hilink_sessID=""
|
||||||
|
hilink_token=""
|
||||||
|
hilink_login_enabled=""
|
||||||
|
fi
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# parameter: none
|
||||||
|
function _loginState() {
|
||||||
|
local state
|
||||||
|
status="OK"
|
||||||
|
if [ -z "$hilink_login_enabled" ]; then _checkLoginEnabled; fi
|
||||||
|
if [ $hilink_login_enabled -eq 1 ]; then return 0; fi # login is disabled
|
||||||
|
_sendRequest "api/user/state-login"
|
||||||
|
state=`echo "$response" | sed -rn 's/.*<state>(.*)<\/state>.*/\1/pi'`
|
||||||
|
if [ ! -z "$state" ] && [ $state -eq 0 ]; then # already logged in
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function _checkLoginEnabled() {
|
||||||
|
local state
|
||||||
|
if _sendRequest "api/user/hilink_login"; then
|
||||||
|
hilink_login_enabled=0
|
||||||
|
state=$(echo $response | sed -rn 's/.*<hilink_login>(.*)<\/hilink_login>.*/\1/pi')
|
||||||
|
if [ ! -z "$state" ] && [ $state -eq 0 ]; then # no login enabled
|
||||||
|
hilink_login_enabled=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
hilink_login_enabled=""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# switch mobile data on/off 1/0
|
||||||
|
# if SIM is locked, $hilink_pin has to be set
|
||||||
|
# parameter: state - ON/OFF or 1/0
|
||||||
|
function _switchMobileData() {
|
||||||
|
local mode
|
||||||
|
if [ -z "$1" ]; then return 1; fi
|
||||||
|
_login
|
||||||
|
mode="${1,,}"
|
||||||
|
[ "$mode" = "on" ] && mode=1
|
||||||
|
[ "$mode" = "off" ] && mode=0
|
||||||
|
if [[ $mode -ge 0 ]]; then
|
||||||
|
if _enableSIM "$hilink_pin"; then
|
||||||
|
hilink_xmldata="<?xml version: '1.0' encoding='UTF-8'?><request><dataswitch>$mode</dataswitch></request>"
|
||||||
|
_sendRequest "api/dialup/mobile-dataswitch"
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# parameter: PIN of SIM card
|
||||||
|
function _setPIN() {
|
||||||
|
local pin
|
||||||
|
if [ -z "$1" ]; then return 1; fi
|
||||||
|
pin="$1"
|
||||||
|
hilink_xmldata="<?xml version: '1.0' encoding='UTF-8'?><request><OperateType>0</OperateType><CurrentPin>$pin</CurrentPin><NewPin></NewPin><PukCode></PukCode></request>"
|
||||||
|
_sendRequest "api/pin/operate"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
# Send request to host at http://$hilink_host/$apiurl
|
||||||
|
# data in $hilink_xmldata and options in $hilink_xtraopts
|
||||||
|
# parameter: apiurl (e.g. "api/user/login")
|
||||||
|
function _sendRequest() {
|
||||||
|
local ret apiurl
|
||||||
|
status="ERROR"
|
||||||
|
if [ -z "$1" ]; then return 1; fi
|
||||||
|
apiurl="$1"
|
||||||
|
ret=1
|
||||||
|
if [ -z "$hilink_sessID" ] || [ -z "$hilink_token" ]; then _sessToken; fi
|
||||||
|
if [ -z "$hilink_xmldata" ];then
|
||||||
|
response=$(curl -s http://$hilink_host/$apiurl -m 10 \
|
||||||
|
-H "Cookie: $hilink_sessID")
|
||||||
|
else
|
||||||
|
response=$(curl -s -X POST http://$hilink_host/$apiurl -m 10 \
|
||||||
|
-H "Content-Type: text/xml" \
|
||||||
|
-H "Cookie: $hilink_sessID" \
|
||||||
|
-H "__RequestVerificationToken: $hilink_token" \
|
||||||
|
-d "$hilink_xmldata" $hilink_xtraopts 2> /dev/null)
|
||||||
|
_getToken
|
||||||
|
fi
|
||||||
|
if [ ! -z "$response" ];then
|
||||||
|
response=$(echo $response | tr -d '\012\015') # delete newline chars
|
||||||
|
status=$(echo "$response" | sed -nr 's/.*<code>([0-9]*)<\/code>.*/\1/ip') # check for error code
|
||||||
|
if [ -z "$status" ]; then
|
||||||
|
status="OK"
|
||||||
|
response=$(echo "$response" | sed -nr 's/.*<response>(.*)<\/response>.*/\1/ip')
|
||||||
|
[ -z "$response" ] && response="none"
|
||||||
|
ret=0
|
||||||
|
else
|
||||||
|
status="ERROR $status"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
status="ERROR"
|
||||||
|
fi
|
||||||
|
if [[ "$status" =~ ERROR ]]; then _handleError; fi
|
||||||
|
hilink_xtraopts=""
|
||||||
|
hilink_xmldata=""
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
# handle the list of tokens available after login
|
||||||
|
# parameter: none
|
||||||
|
function _getToken() {
|
||||||
|
if [ ! -z "$hilink_tokenlist" ] && [ ${#hilink_tokenlist[@]} -gt 0 ]; then
|
||||||
|
hilink_token=${hilink_tokenlist[0]} # get first token in list
|
||||||
|
hilink_tokenlist=("${hilink_tokenlist[@]:1}") # remove used token from list
|
||||||
|
if [ ${#hilink_tokenlist[@]} -eq 0 ]; then
|
||||||
|
_logout # use the last token to logout
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
_sessToken # old token has been used - need new session
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Analyse $status for error code
|
||||||
|
# return error text in $status
|
||||||
|
function _handleError() {
|
||||||
|
local ret txt
|
||||||
|
txt=$(_getErrorText)
|
||||||
|
if [ -z "$code" ]; then return 1; fi
|
||||||
|
ret=0
|
||||||
|
case "$code" in
|
||||||
|
101|108003|108007)
|
||||||
|
ret=1
|
||||||
|
status="$txt"
|
||||||
|
;;
|
||||||
|
108001|108002|108006)
|
||||||
|
ret=1
|
||||||
|
status="$txt"
|
||||||
|
;;
|
||||||
|
125001|125002|125003)
|
||||||
|
_sessToken
|
||||||
|
ret=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
return "$ret"
|
||||||
|
}
|
||||||
|
|
||||||
|
declare -A hilink_err_api
|
||||||
|
hilink_err_api[101]="Unable to get session ID/token"
|
||||||
|
hilink_err_api[108001]="Invalid username/password"
|
||||||
|
hilink_err_api[108002]=${hilink_err_api[108001]}
|
||||||
|
hilink_err_api[108006]=${hilink_err_api[108001]}
|
||||||
|
hilink_err_api[108003]="User already logged in - need to wait a bit"
|
||||||
|
hilink_err_api[108007]="Too many login attempts - need to wait a bit"
|
||||||
|
hilink_err_api[125001]="Invalid session/request token"
|
||||||
|
hilink_err_api[125002]=${hilink_err_api[125001]}
|
||||||
|
hilink_err_api[125003]=${hilink_err_api[125001]}
|
||||||
|
|
||||||
|
# check error and return error text
|
||||||
|
# status passsed in $status, or $1
|
||||||
|
function _getErrorText() {
|
||||||
|
local err code errortext
|
||||||
|
err="$status"
|
||||||
|
code="0"
|
||||||
|
if [ ! -z "$1" ]; then err="$1"; fi
|
||||||
|
if [ -z "$err" ]; then return 1; fi
|
||||||
|
errortext="$err"
|
||||||
|
if [[ "$err" =~ ERROR\ *([0-9]*) ]] && [ ! -z "${BASH_REMATCH[1]}" ]; then
|
||||||
|
code=${BASH_REMATCH[1]}
|
||||||
|
if [ ! -z "$code" ] && [ ! -z "${hilink_err_api[$code]}" ]; then
|
||||||
|
errortext="${hilink_err_api[$code]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo $errortext
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function _hostReachable() {
|
||||||
|
local avail
|
||||||
|
avail=$( timeout 0.5 ping -c 1 $hilink_host | sed -rn 's/.*time=.*/1/p' )
|
||||||
|
if [ -z "$avail" ]; then status="ERROR: Not reachable"; return 1; fi
|
||||||
|
status="OK"
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
# helper function to parse $response (xml format) for a value
|
||||||
|
# call another function first!
|
||||||
|
# parameter: tag-name
|
||||||
|
function _valueFromResponse() {
|
||||||
|
local par value
|
||||||
|
if [ -z "$response" ] || [ -z "$1" ]; then return 1; fi
|
||||||
|
par="$1"
|
||||||
|
value=$(echo $response | sed -rn 's/.*<'$par'>(.*)<\/'$par'>.*/\1/pi')
|
||||||
|
if [ -z "$value" ]; then return 1; fi
|
||||||
|
echo "$value"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# list all keys of the current xml response
|
||||||
|
function _keysFromResponse() {
|
||||||
|
if [ -z "$response" ]; then return 1; fi
|
||||||
|
echo $response | grep -oiP "(?<=<)[a-z_-]*(?=>)"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# return all key=value pairs of the current xml response
|
||||||
|
function _keyValuePairs() {
|
||||||
|
if [ -z "$response" ]; then return 1; fi
|
||||||
|
echo $response | sed -n 's/<\([^>]*\)>\(.*\)<\/\1>[^<]*/\1=\"\2\"\n/gpi'
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
hilink_token=""
|
||||||
|
hilink_tokenlist=""
|
||||||
|
hilink_sessID=""
|
||||||
|
hilink_xmldata=""
|
||||||
|
hilink_xtraopts=""
|
||||||
|
hilink_host=$hilink_host_default
|
||||||
|
hilink_user="admin"
|
||||||
|
hilink_password=""
|
||||||
|
hilink_pin=""
|
||||||
|
response=""
|
||||||
|
status=""
|
||||||
|
|
109
config/client_config/info_huawei.sh
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# get info about device and signal of Huawei mobile USB devices
|
||||||
|
# parm:
|
||||||
|
# $1 : requested information (manufacturer, device, imei, imsi, telnumber, ipaddress, mode, signal, operator)
|
||||||
|
# $2 : (optional) type - hilink or modem (default: hilink)
|
||||||
|
# $3 : (optional) for hilink: ip address of the device (default: 192.168.8.1)
|
||||||
|
# for modem: tty interface for communication (default: /dev/ttypUSB2)
|
||||||
|
# $4 : more options can be added for Hilink devices ('-u user -P password -p pin'). These are passed to the corresponding script
|
||||||
|
#
|
||||||
|
# requires: bc
|
||||||
|
# calls the scripts info_huawei_hilink.sh and info_huawei_modem.sh (same path as this script)
|
||||||
|
#
|
||||||
|
# zbchristian 2020
|
||||||
|
#
|
||||||
|
path=$(dirname "$0")
|
||||||
|
opt="device"
|
||||||
|
if [ ! -z "$1" ]; then opt=${1,,}; fi
|
||||||
|
type="hilink"
|
||||||
|
if [ ! -z "$2" ]; then type=${2,,}; fi
|
||||||
|
|
||||||
|
parms=""
|
||||||
|
if [ "$type" = "hilink" ]; then
|
||||||
|
connect="-h 192.168.8.1"
|
||||||
|
if [ ! -z "$3" ]; then connect="-h $3"; fi
|
||||||
|
if [ ! -z "$4" ]; then parms="$4"; fi
|
||||||
|
script="$path/info_huawei_hilink.sh"
|
||||||
|
else
|
||||||
|
connect="/dev/ttyUSB2"
|
||||||
|
if [ ! -z "$3" ]; then connect=$3; fi
|
||||||
|
script="$path/info_huawei_modem.sh"
|
||||||
|
fi
|
||||||
|
res=$($script $opt $connect $parms)
|
||||||
|
|
||||||
|
# some results require special treatment
|
||||||
|
case $opt in
|
||||||
|
|
||||||
|
# manufacturer)
|
||||||
|
# if [ "$res" = "none" ]; then res="Huawei"; fi
|
||||||
|
# ;;
|
||||||
|
|
||||||
|
# device)
|
||||||
|
# if [ ! "$res" = "none" ]; then res="Huawei $res";
|
||||||
|
# else res="Huawei"; fi
|
||||||
|
# ;;
|
||||||
|
|
||||||
|
mode)
|
||||||
|
if [ ! "$res" = "none" ]; then
|
||||||
|
if [ "$type" = "hilink" ]; then
|
||||||
|
if [ "$res" = "LTE" ]; then res="4G"
|
||||||
|
elif [ "$res" = "WCDMA" ]; then res="3G";
|
||||||
|
else res="2G"; fi
|
||||||
|
else
|
||||||
|
if [ $res -eq 7 ]; then res="4G"
|
||||||
|
elif [ $res -lt 7 ] && [ $res -gt 2 ] ; then res="3G";
|
||||||
|
else res="2G"; fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
signal)
|
||||||
|
# return signal strength/quality in %
|
||||||
|
if [ "$type" = "hilink" ]; then
|
||||||
|
# signal request tries to get RSRQ value
|
||||||
|
# try to get RSRQ (4G), EC/IO (3G) or RSSI (2G) value
|
||||||
|
if [ "$res" = "none" ]; then res=$($script "ecio"); fi
|
||||||
|
if [ ! "$res" = "none" ]; then
|
||||||
|
# for rsrq and ecio assume: -3dB (100%) downto -20dB (0%)
|
||||||
|
qual=${res//dB/}
|
||||||
|
if [[ ! "$qual" =~ [-0-9\.]* ]]; then qual=-100; fi
|
||||||
|
qual=$(bc <<< "scale=0;res=$qual-0.5;res/1") # just round to next integer
|
||||||
|
if [ $qual -le -20 ]; then qual=0;
|
||||||
|
elif [ $qual -ge -3 ]; then qual=100;
|
||||||
|
else qual=$(bc <<< "scale=0;res=100.0/17.0*$qual+2000.0/17.0;res/1"); fi
|
||||||
|
else
|
||||||
|
# try rssi: >-70dBm (100%) downto -100dBm (0%)
|
||||||
|
res=$($script "rssi");
|
||||||
|
if [ ! "$res" = "none" ]; then
|
||||||
|
if [[ ! $res =~ [-0-9\.]* ]]; then res="-120 dBm"; fi
|
||||||
|
qual=${res//dBm/}
|
||||||
|
qual=$(bc <<< "scale=0;res=$qual+0.5;res/1") # just round to next integer
|
||||||
|
if [ $qual -le -110 ]; then qual=0;
|
||||||
|
elif [ $qual -ge -70 ]; then qual=100;
|
||||||
|
else qual=$(bc <<< "scale=0;res=2.5*$qual+275;res/1"); fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# modem returns RSSI as number 0-31 - 0 = -113dB (0%), 1 = -111dB, 31 = >=51dB (100%)
|
||||||
|
qual=$(bc <<< "scale=0;res=$res*3.5+0.5;res/1")
|
||||||
|
if [ $qual -gt 100 ]; then res=100; fi
|
||||||
|
fi
|
||||||
|
if [ ! "$res" = "none" ]; then res="$res (${qual}%)"; fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
operator)
|
||||||
|
# check if operator/network is just a 5 digit number -> extract network name from table
|
||||||
|
if [[ $res =~ ^[0-9]{5}$ ]]; then
|
||||||
|
mcc=${res:0:3}
|
||||||
|
mnc=${res:3:2}
|
||||||
|
op=$(cat $path/mcc-mnc-table.csv | sed -rn 's/^'$mcc'\,[0-9]*\,'$mnc'\,(.*\,){4}(.*)$/\2/p')
|
||||||
|
if [ ! -z "$op" ]; then res="$op ($res)"; fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo $res
|
||||||
|
|
95
config/client_config/info_huawei_hilink.sh
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Information about HUAWEI hilink
|
||||||
|
# -------------------------------
|
||||||
|
# get info about the device and signal
|
||||||
|
# parameter: $1 - "connected", "device", "ipaddress", "mode", "signal" (see case statement below)
|
||||||
|
# -u,--user - username
|
||||||
|
# -P,--password - password
|
||||||
|
# -p,--pin - SIM pin
|
||||||
|
# -h,--host - host ip address for API calls (optional)
|
||||||
|
# returns the value of the parameter, or "none" if not found or empty
|
||||||
|
#
|
||||||
|
# All device informations are buffered for 5 secs to speed up subsequent calls
|
||||||
|
#
|
||||||
|
# zbchristian 2021
|
||||||
|
|
||||||
|
function _setAPIParams() {
|
||||||
|
if [ ! -z "$hostip" ]; then hilink_host="$hostip"; fi
|
||||||
|
if [ ! -z "$username" ]; then hilink_user="$username"; fi
|
||||||
|
if [ ! -z "$password" ]; then hilink_password="$password"; fi
|
||||||
|
if [ ! -z "$simpin" ]; then hilink_pin="$simpin"; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then echo "none"; exit; fi
|
||||||
|
property="${1,,}"
|
||||||
|
shift
|
||||||
|
hostip="192.168.8.1"
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case "$1" in
|
||||||
|
-u|--user) username="$2"; shift ;;
|
||||||
|
-P|--password) password="$2"; shift ;;
|
||||||
|
-p|--pin) simpin="$2"; shift ;;
|
||||||
|
-h|--host) hostip="$2"; shift ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
status="no valid option given"
|
||||||
|
result="none"
|
||||||
|
hostip="192.168.8.1"
|
||||||
|
if [ "$opt" = "connected" ]; then
|
||||||
|
source /usr/local/sbin/huawei_hilink_api.sh
|
||||||
|
_setAPIParams
|
||||||
|
if ! _initHilinkAPI; then echo "none"; exit; fi
|
||||||
|
result=$(_getMobileDataStatus)
|
||||||
|
_closeHilinkAPI
|
||||||
|
else
|
||||||
|
info_file="/tmp/huawei_infos_${hostip}_$(id -u).dat"
|
||||||
|
if [ -f "$info_file" ]; then
|
||||||
|
age=$(( $(date +%s) - $(stat $info_file -c %Y) ))
|
||||||
|
if [[ $age -gt 10 ]]; then rm -f $info_file; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$info_file" ]; then
|
||||||
|
infos=$(cat $info_file)
|
||||||
|
else
|
||||||
|
source /usr/local/sbin/huawei_hilink_api.sh
|
||||||
|
_setAPIParams
|
||||||
|
if ! _initHilinkAPI; then echo "none"; exit; fi
|
||||||
|
infos=$(_getAllInformations)
|
||||||
|
_closeHilinkAPI
|
||||||
|
if [ ! -z "$infos" ]; then echo -n "$infos" > $info_file; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$property" in
|
||||||
|
device|devicename)
|
||||||
|
key="devicename"
|
||||||
|
;;
|
||||||
|
ipaddress|wanipaddress)
|
||||||
|
key="wanipaddress"
|
||||||
|
;;
|
||||||
|
mode)
|
||||||
|
key="workmode"
|
||||||
|
;;
|
||||||
|
telnumber)
|
||||||
|
key="msisdn"
|
||||||
|
;;
|
||||||
|
imei|imsi|rssi|rsrq|rsrp|sinr|ecio)
|
||||||
|
key="$property"
|
||||||
|
;;
|
||||||
|
signal)
|
||||||
|
key="rsrq"
|
||||||
|
;;
|
||||||
|
operator|fullname)
|
||||||
|
key="fullname"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
key="device"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [ -z "$key" ]; then result="none"; fi
|
||||||
|
result=$(echo "$infos" | sed -rn 's/'$key'=\"([^ \s]*)\"/\1/ip')
|
||||||
|
if [ -z "$result" ]; then result="none"; fi
|
||||||
|
fi
|
||||||
|
echo -n "$result"
|
||||||
|
|
52
config/client_config/info_huawei_modem.sh
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Information about HUAWEI modem - via AT commands
|
||||||
|
# ------------------------------------------------
|
||||||
|
# get info about the device and signal
|
||||||
|
# parameter: $1 - see opts list below
|
||||||
|
# $2 - tty device name for the communicaton (optional)
|
||||||
|
# returns the value of the parameter, or "none" if not found or empty
|
||||||
|
#
|
||||||
|
# requires: socat
|
||||||
|
#
|
||||||
|
# zbchristian 2020
|
||||||
|
|
||||||
|
opts=("manufacturer" "device" "imei" "imsi" "telnumber" "mode" "signal" "operator")
|
||||||
|
|
||||||
|
# at command to extract information
|
||||||
|
atcmds=("AT+CGMI" "AT+CGMM" "AT+CGSN" "AT+CIMI" "AT+CNUM" "AT+COPS?" "AT+CSQ" "AT+COPS?")
|
||||||
|
# regexp pattern to extract wanted information from result string
|
||||||
|
pats=( " " " " " " " " ".*\,\"([0-9\+]*)\".*" '.*\,([0-9])$' ".*: ([0-9]*).*" '.*\,\"([^ ]*)\".*$')
|
||||||
|
|
||||||
|
# tty device for communication - usually 3 tty devices are created and the 3rd ttyUSB2 is available, even, when the device is connected
|
||||||
|
dev="/dev/ttyUSB2"
|
||||||
|
|
||||||
|
atsilent="AT^CURC=0"
|
||||||
|
|
||||||
|
if [ ! -z $2 ]; then dev=$2; fi
|
||||||
|
|
||||||
|
idx=-1
|
||||||
|
opt=${opts[0]}
|
||||||
|
if [ ! -z $1 ]; then opt=$1; fi
|
||||||
|
|
||||||
|
for i in "${!opts[@]}"; do
|
||||||
|
if [[ ${opts[$i]} == $opt ]]; then idx=$i; fi
|
||||||
|
done
|
||||||
|
if [[ $idx == -1 ]];then echo "none"; exit; fi
|
||||||
|
|
||||||
|
atcmd=${atcmds[$idx]}
|
||||||
|
pat=${pats[$idx]}
|
||||||
|
|
||||||
|
|
||||||
|
result=`(echo $atsilent; echo $atcmd) | sudo /usr/bin/socat - $dev`
|
||||||
|
# escape the AT command to be used in the regexp
|
||||||
|
atesc=${atcmd//[\+]/\\+}
|
||||||
|
atesc=${atesc//[\?]/\\?}
|
||||||
|
result=`echo $result | sed -rn 's/.*'"$atesc"'\s([^ ]+|[^ ]+ [^ ]+)\sOK.*$/\1/pg'`
|
||||||
|
if [[ $pat != " " ]]; then
|
||||||
|
result=`echo $result | sed -rn 's/'"$pat"'/\1/pg'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$result" ]; then result="none"; fi
|
||||||
|
|
||||||
|
echo $result
|
||||||
|
|
13
config/client_config/interfaces
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# interfaces(5) file used by ifup(8) and ifdown(8)
|
||||||
|
|
||||||
|
# Please note that this file is written to be used with dhcpcd
|
||||||
|
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
|
||||||
|
|
||||||
|
# Include files from /etc/network/interfaces.d:
|
||||||
|
source-directory /etc/network/interfaces.d
|
||||||
|
|
||||||
|
auto ppp0
|
||||||
|
iface ppp0 inet wvdial
|
||||||
|
provider connect
|
||||||
|
pre-up /usr/local/sbin/ppp0_setpin.sh
|
||||||
|
up /usr/local/sbin/ppp0_route.sh
|
1691
config/client_config/mcc-mnc-table.csv
Normal file
58
config/client_config/onoff_huawei_hilink.sh
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# connect/disconnect Huawei mobile data stick in Hilink mode (e.g. E3372h)
|
||||||
|
# ========================================================================
|
||||||
|
#
|
||||||
|
# options: -u, --user - user name (default "admin")
|
||||||
|
# -P, --password - password
|
||||||
|
# -h, --host - host ip address (default 192.168.8.1)
|
||||||
|
# -d, --devname - device name (IP is extracted using default route)
|
||||||
|
# -p, --pin - PIN of SIM card
|
||||||
|
# -c, --connect - connect 0/1 to set datamode off/on
|
||||||
|
#
|
||||||
|
# required software: curl, base64, sha256sum
|
||||||
|
#
|
||||||
|
# zbchristian 2021
|
||||||
|
|
||||||
|
# include the hilink API (defaults: hilink_user=admin, hilink_host=192.168.8.1)
|
||||||
|
source /usr/local/sbin/huawei_hilink_api.sh
|
||||||
|
|
||||||
|
# include the raspap helper functions
|
||||||
|
source /usr/local/sbin/raspap_helpers.sh
|
||||||
|
|
||||||
|
datamode=""
|
||||||
|
devname=""
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case "$1" in
|
||||||
|
-u|--user) hilink_user="$2"; shift ;;
|
||||||
|
-P|--password) hilink_password="$2"; shift ;;
|
||||||
|
-p|--pin) if [[ $2 =~ ^[0-9]{4,8} ]]; then hilink_pin="$2"; fi; shift ;;
|
||||||
|
-h|--host) hilink_host="$2"; shift ;;
|
||||||
|
-d|--devname) devname="$2"; shift ;;
|
||||||
|
-c|--connect) if [ "$2" = "1" ]; then datamode=1; else datamode=0; fi; shift ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -z "$devname" ]; then # get host IP for given device name
|
||||||
|
gw=$(ip route list | sed -rn "s/default via (([0-9]{1,3}\.){3}[0-9]{1,3}).*dev $devname.*/\1/p")
|
||||||
|
if [ -z "$gw" ]; then exit; fi # device name not found in routing list -> abort
|
||||||
|
hilink_host="$gw"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$hilink_password" ] || [ -z "$hilink_pin" ]; then
|
||||||
|
_getAuthRouter
|
||||||
|
if [ ! -z "$raspap_user" ]; then hilink_user="$raspap_user"; fi
|
||||||
|
if [ ! -z "$raspap_password" ]; then hilink_password="$raspap_password"; fi
|
||||||
|
if [ ! -z "$raspap_pin" ]; then hilink_pin="$raspap_pin"; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Hilink: switch device at $hilink_host to mode $datamode" | systemd-cat
|
||||||
|
|
||||||
|
status="usage: -c 1/0 to disconnect/connect"
|
||||||
|
if [ -z "$datamode" ] || [ ! _initHilinkAPI ]; then echo "Hilink: failed - return status: $status"; exit; fi
|
||||||
|
|
||||||
|
if ! _switchMobileData "$datamode"; then echo -n "Hilink: could not switch the data mode on/off . Error: ";_getErrorText; fi
|
||||||
|
|
||||||
|
if ! _closeHilinkAPI; then echo -n "Hilink: failed - return status: $status . Error: ";_getErrorText; fi
|
||||||
|
|
||||||
|
|
21
config/client_config/ppp0_route.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# get gateway and ip address of UTMS modem connected to ppp0
|
||||||
|
# add a default route
|
||||||
|
# called by /etc/network/interfaces.d/ppp0, when device is coming up
|
||||||
|
#
|
||||||
|
ppp0rt=""
|
||||||
|
let i=1
|
||||||
|
while [ -z "$ppp0rt" ] ; do
|
||||||
|
let i+=1
|
||||||
|
if [ $i -gt 20 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
ppp0rt=`ip route list | grep -m 1 ppp0`
|
||||||
|
done
|
||||||
|
gate=`echo $ppp0rt | sed -rn 's/(([0-9]{1,3}\.){3}[0-9]{1,3}).*ppp0.*src (([0-9]{1,3}\.){3}[0-9]{1,3})/\1/p'`
|
||||||
|
src=`echo $ppp0rt | sed -rn 's/(([0-9]{1,3}\.){3}[0-9]{1,3}).*ppp0.*src (([0-9]{1,3}\.){3}[0-9]{1,3})/\3/p'`
|
||||||
|
|
||||||
|
ip route add default via $gate proto dhcp src $src metric 10
|
||||||
|
exit 0
|
21
config/client_config/ppp0_setpin.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# in case /dev/ttyUSB0 does not exist, wait for it at most 30 seconds
|
||||||
|
let i=1
|
||||||
|
while ! test -c /dev/ttyUSB0; do
|
||||||
|
let i+=1
|
||||||
|
if [ $i -gt 2 ]; then
|
||||||
|
logger -s -t setpin "/dev/ttyUSB0 does not exist"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
logger -s -t setpin "waiting 3 seconds for /dev/ttyUSB0"
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
# check for pin and set it if necessary
|
||||||
|
wvdial pinstatus 2>&1 | grep -q '^+CPIN: READY'
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
logger -s -t setpin "SIM card is ready to use :-)"
|
||||||
|
else
|
||||||
|
logger -s -t setpin "setting PIN"
|
||||||
|
wvdial pin 2>/dev/null
|
||||||
|
fi
|
||||||
|
exit 0
|
51
config/client_config/raspap_helpers.sh
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Helper functions to extract informations from RaspAP config/settings
|
||||||
|
#
|
||||||
|
# zbchristian 2021
|
||||||
|
#
|
||||||
|
# get the values of a RaspAP config variable
|
||||||
|
# call: _getRaspapConfig RASPAP_MOBILEDATA_CONFIG
|
||||||
|
|
||||||
|
raspap_webroot="/var/www/html"
|
||||||
|
|
||||||
|
function _getWebRoot() {
|
||||||
|
local path
|
||||||
|
path=$(cat /etc/lighttpd/lighttpd.conf | sed -rn "s/server.document-root \s*= \"([^ \s]*)\"/\1/p")
|
||||||
|
if [ ! -z "$path" ]; then raspap_webroot="$path"; fi
|
||||||
|
if [ -z "$path" ]; then return 1; else return 0; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# expand an RaspAP config variable utilizing PHP
|
||||||
|
function _getRaspapConfig() {
|
||||||
|
local conf var
|
||||||
|
raspap_config=""
|
||||||
|
var="$1"
|
||||||
|
if [ ! -z "$var" ]; then
|
||||||
|
if ! _getWebRoot; then return 1; fi
|
||||||
|
conf="$raspap_webroot/includes/config.php"
|
||||||
|
if [ -f "$conf" ]; then
|
||||||
|
conf=$(php -r 'include "'$conf'"; echo '$var';' 2> /dev/null)
|
||||||
|
if [ ! -z "$conf" ] && [ -d ${conf%/*} ]; then raspap_config="$conf"; fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$raspap_config" ]; then return 1; else return 0; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Username and password for mobile data devices is stored in a file (RASPAP_MOBILEDATA_CONFIG)
|
||||||
|
function _getAuthRouter() {
|
||||||
|
local mfile mdata pin user pw
|
||||||
|
if ! _getRaspapConfig "RASPI_MOBILEDATA_CONFIG"; then return 1; fi
|
||||||
|
mfile="$raspap_config"
|
||||||
|
if [ -f $mfile ]; then
|
||||||
|
mdata=$(cat "$mfile")
|
||||||
|
pin=$(echo "$mdata" | sed -rn 's/pin = ([^ \s]*)/\1/ip')
|
||||||
|
if [ ! -z "$pin" ]; then raspap_pin="$pin"; fi
|
||||||
|
user=$(echo "$mdata" | sed -rn 's/router_user = ([^ \s]*)/\1/ip')
|
||||||
|
if [ ! -z "$user" ]; then raspap_user="$user"; fi
|
||||||
|
pw=$(echo "$mdata" | sed -rn 's/router_pw = ([^ \s]*)/\1/ip')
|
||||||
|
if [ ! -z "$pw" ]; then raspap_password="$pw"; fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
13
config/client_config/start_huawei_hilink@.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Bring up HUAWEI mobile hilink device
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=no
|
||||||
|
ExecStart=/bin/sleep 15
|
||||||
|
ExecStart=/usr/local/sbin/onoff_huawei_hilink.sh -c 1 -d %i
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Alias=start_ltemodem.service
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
16
config/client_config/start_ppp0_device.service
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Start ppp0 interface
|
||||||
|
BindsTo=dev-ttyUSB0.device
|
||||||
|
After=dev-ttyUSB0.device
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/sbin/ifup ppp0
|
||||||
|
ExecStop=/sbin/ifdown ppp0
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Alias=startppp0.service
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
21
config/client_config/wvdial.conf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Dialer Defaults]
|
||||||
|
Modem Type = Analog Modem
|
||||||
|
ISDN = 0
|
||||||
|
Baud = 9600
|
||||||
|
Modem = /dev/ttyUSB0
|
||||||
|
|
||||||
|
[Dialer pin]
|
||||||
|
Init1 = AT+CPIN="XXXX"
|
||||||
|
|
||||||
|
[Dialer connect]
|
||||||
|
Init1 = ATZ
|
||||||
|
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
|
||||||
|
Init3 = AT+CGDCONT=1,"IP","web.vodafone.de"
|
||||||
|
New PPPD = yes
|
||||||
|
Phone = *99#
|
||||||
|
Password = me
|
||||||
|
Username = vodafone
|
||||||
|
Stupid Mode = 1
|
||||||
|
|
||||||
|
[Dialer pinstatus]
|
||||||
|
Init1 = AT+CPIN?
|
64
config/client_udev_prototypes.json
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"info": "UDEV rules for different client types. $...$ expressions will be replaces automatically ($MAC$, $IDVENDOR$, $IDPRODUCT$, $DEVNAME$)",
|
||||||
|
"udev_rules_file": "/etc/udev/rules.d/80-raspap-net-devices.rules",
|
||||||
|
"script_path": "/usr/local/sbin",
|
||||||
|
"network_devices": [
|
||||||
|
{
|
||||||
|
"type": "eth",
|
||||||
|
"type_info": "ethernet port",
|
||||||
|
"clientid": 0,
|
||||||
|
"comment": "standard ethernet port",
|
||||||
|
"name_prefix": "eth",
|
||||||
|
"udev_rule": "SUBSYSTEM==\"net\", ACTION==\"add\", ATTR{address}==\"$MAC$\", NAME=\"$DEVNAME$\", ENV{raspapType}=\"eth\" "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "usb",
|
||||||
|
"type_info": "usb network interface",
|
||||||
|
"clientid": 1,
|
||||||
|
"comment": "network interface - e.g. USB tethering of an Android phone ",
|
||||||
|
"name_prefix": "usb",
|
||||||
|
"udev_rule": "SUBSYSTEM==\"net\", ACTION==\"add\", SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"$IDVENDOR$\", ATTRS{idProduct}==\"$IDPRODUCT$\", NAME=\"$DEVNAME$\", ENV{raspapType}=\"eth\" "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "wlan",
|
||||||
|
"type_info": "wireless adapter",
|
||||||
|
"clientid": 2,
|
||||||
|
"comment": "standard wireless interface",
|
||||||
|
"name_prefix": "wlan",
|
||||||
|
"udev_rule": "SUBSYSTEM==\"net\", ACTION==\"add\", ATTR{address}==\"$MAC$\", NAME=\"$DEVNAME$\", ENV{raspapType}=\"wlan\" "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ppp",
|
||||||
|
"type_info": "mobile data modem",
|
||||||
|
"clientid": 3,
|
||||||
|
"name_prefix": "ppp",
|
||||||
|
"comment": "recognized mobile data modems are automatically named as ppp0-9. Renaming is not possible. Dialin service relies on the name",
|
||||||
|
"udev_rule": "SUBSYSTEM==\"tty\", KERNEL==\"ttyUSB0\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"start start_ppp0_device.service\" "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "hilink",
|
||||||
|
"type_info": "Huawei Hilink",
|
||||||
|
"clientid": 4,
|
||||||
|
"comment": "Huawei mobile data device in router mode. Control via HTTP. Device is connecting via service",
|
||||||
|
"name_prefix": "hilink",
|
||||||
|
"default_ip": "192.168.8.1",
|
||||||
|
"udev_rule": "SUBSYSTEM==\"net\", ACTION==\"add\", SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"$IDVENDOR$\", ATTRS{idProduct}==\"$IDPRODUCT$\", NAME=\"$DEVNAME$\", ENV{raspapType}=\"hilink\", TAG+=\"systemd\", ENV{SYSTEMD_WANTS}=\"start start_huawei_hilink@hilink%n.service\" "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "phone",
|
||||||
|
"type_info": "USB tethered phone",
|
||||||
|
"clientid": 5,
|
||||||
|
"comment": "ethernet access provided by tethering from phone via USB",
|
||||||
|
"name_prefix": "phone",
|
||||||
|
"udev_rule": "SUBSYSTEM==\"net\", ACTION==\"add\", SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"$IDVENDOR$\", ATTRS{idProduct}==\"$IDPRODUCT$\", NAME=\"$DEVNAME$\", ENV{raspapType}=\"phone\" "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tun",
|
||||||
|
"type_info": "tunnel device",
|
||||||
|
"clientid": -1,
|
||||||
|
"comment": "tunneling device used by OpenVPN",
|
||||||
|
"name_prefix": "tun"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
56
config/config.php
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
define('RASPI_BRAND_TEXT', 'RaspAP');
|
||||||
|
define('RASPI_CONFIG', '/etc/raspap');
|
||||||
|
define('RASPI_CONFIG_NETWORK', RASPI_CONFIG.'/networking/defaults.json');
|
||||||
|
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
|
||||||
|
define('RASPI_WIFI_AP_INTERFACE', 'wlan0');
|
||||||
|
define('RASPI_CACHE_PATH', sys_get_temp_dir() . '/raspap');
|
||||||
|
|
||||||
|
// Constants for configuration file paths.
|
||||||
|
// These are typical for default RPi installs. Modify if needed.
|
||||||
|
define('RASPI_DNSMASQ_LEASES', '/var/lib/misc/dnsmasq.leases');
|
||||||
|
define('RASPI_DNSMASQ_PREFIX', '/etc/dnsmasq.d/090_');
|
||||||
|
define('RASPI_ADBLOCK_LISTPATH', '/etc/raspap/adblock/');
|
||||||
|
define('RASPI_ADBLOCK_CONFIG', RASPI_DNSMASQ_PREFIX.'adblock.conf');
|
||||||
|
define('RASPI_HOSTAPD_CONFIG', '/etc/hostapd/hostapd.conf');
|
||||||
|
define('RASPI_DHCPCD_CONFIG', '/etc/dhcpcd.conf');
|
||||||
|
define('RASPI_DHCPCD_LOG', '/var/log/dnsmasq.log');
|
||||||
|
define('RASPI_WPA_SUPPLICANT_CONFIG', '/etc/wpa_supplicant/wpa_supplicant.conf');
|
||||||
|
define('RASPI_HOSTAPD_CTRL_INTERFACE', '/var/run/hostapd');
|
||||||
|
define('RASPI_WPA_CTRL_INTERFACE', '/var/run/wpa_supplicant');
|
||||||
|
define('RASPI_OPENVPN_CLIENT_PATH', '/etc/openvpn/client/');
|
||||||
|
define('RASPI_OPENVPN_CLIENT_CONFIG', '/etc/openvpn/client/client.conf');
|
||||||
|
define('RASPI_OPENVPN_CLIENT_LOGIN', '/etc/openvpn/client/login.conf');
|
||||||
|
define('RASPI_WIREGUARD_PATH', '/etc/wireguard/');
|
||||||
|
define('RASPI_WIREGUARD_CONFIG', RASPI_WIREGUARD_PATH.'wg0.conf');
|
||||||
|
define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc');
|
||||||
|
define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf');
|
||||||
|
define('RASPI_ACCESS_CHECK_IP', '1.1.1.1');
|
||||||
|
define('RASPI_ACCESS_CHECK_DNS', 'one.one.one.one');
|
||||||
|
|
||||||
|
// Constants for the 5GHz wireless regulatory domain.
|
||||||
|
define('RASPI_5GHZ_ISO_ALPHA2', array('NL','US'));
|
||||||
|
define('RASPI_5GHZ_MAX_CHANNEL', 165);
|
||||||
|
|
||||||
|
// Enable basic authentication for the web admin.
|
||||||
|
define('RASPI_AUTH_ENABLED', true);
|
||||||
|
|
||||||
|
// Optional services, set to true to enable.
|
||||||
|
define('RASPI_WIFICLIENT_ENABLED', true);
|
||||||
|
define('RASPI_HOTSPOT_ENABLED', true);
|
||||||
|
define('RASPI_NETWORK_ENABLED', true);
|
||||||
|
define('RASPI_DHCP_ENABLED', true);
|
||||||
|
define('RASPI_ADBLOCK_ENABLED', false);
|
||||||
|
define('RASPI_OPENVPN_ENABLED', false);
|
||||||
|
define('RASPI_WIREGUARD_ENABLED', false);
|
||||||
|
define('RASPI_TORPROXY_ENABLED', false);
|
||||||
|
define('RASPI_CONFAUTH_ENABLED', true);
|
||||||
|
define('RASPI_CHANGETHEME_ENABLED', true);
|
||||||
|
define('RASPI_VNSTAT_ENABLED', true);
|
||||||
|
define('RASPI_SYSTEM_ENABLED', true);
|
||||||
|
define('RASPI_MONITOR_ENABLED', false);
|
||||||
|
|
||||||
|
// Locale settings
|
||||||
|
define('LOCALE_ROOT', 'locale');
|
||||||
|
define('LOCALE_DOMAIN', 'messages');
|
@ -1,12 +0,0 @@
|
|||||||
# Location of hostapd configuration file
|
|
||||||
DAEMON_CONF="/etc/hostapd/hostapd.conf"
|
|
||||||
|
|
||||||
# Additional daemon options to be appended to hostapd command:-
|
|
||||||
# -d show more debug messages (-dd for even more)
|
|
||||||
# -K include key data in debug messages
|
|
||||||
# -t include timestamps in some debug messages
|
|
||||||
#
|
|
||||||
# Note that -B (daemon mode) and -P (pidfile) options are automatically
|
|
||||||
# configured by the init.d script and must not be added to DAEMON_OPTS.
|
|
||||||
#
|
|
||||||
#DAEMON_OPTS=""
|
|
57
config/defaults.json
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"dhcp": {
|
||||||
|
"wlan0": {
|
||||||
|
"static ip_address": [ "10.3.141.1/24" ],
|
||||||
|
"static routers": [ "10.3.141.1" ],
|
||||||
|
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||||
|
"subnetmask": [ "255.255.255.0" ]
|
||||||
|
},
|
||||||
|
"uap0": {
|
||||||
|
"static ip_address": [ "192.168.50.1/24" ],
|
||||||
|
"static routers": [ "192.168.50.1" ],
|
||||||
|
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
|
||||||
|
"subnetmask": [ "255.255.255.0" ]
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"# RaspAP default configuration": null,
|
||||||
|
"hostname": null,
|
||||||
|
"clientid": null,
|
||||||
|
"persistent": null,
|
||||||
|
"option rapid_commit": null,
|
||||||
|
"option domain_name_servers, domain_name, domain_search, host_name": null,
|
||||||
|
"option classless_static_routes": null,
|
||||||
|
"option ntp_servers": null,
|
||||||
|
"require dhcp_server_identifier": null,
|
||||||
|
"slaac private": null,
|
||||||
|
"nohook lookup-hostname": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dnsmasq": {
|
||||||
|
"wlan0": {
|
||||||
|
"dhcp-range": [ "10.3.141.50,10.3.141.254,255.255.255.0,12h" ]
|
||||||
|
},
|
||||||
|
"uap0": {
|
||||||
|
"dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wireguard": {
|
||||||
|
"server": {
|
||||||
|
"Address": [ "10.8.2.1/24" ],
|
||||||
|
"ListenPort": [ "51820" ],
|
||||||
|
"DNS": [ "9.9.9.9" ],
|
||||||
|
"PostUp": [ "iptables -A FORWARD -i wlan0 -o wg0 -j ACCEPT; iptables -A FORWARD -i wg0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE" ],
|
||||||
|
"PostDown": [ "iptables -D FORWARD -i wlan0 -o wg0 -j ACCEPT; iptables -D FORWARD -i wg0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE" ]
|
||||||
|
},
|
||||||
|
"peer": {
|
||||||
|
"Address": [ "10.8.1.2/24" ],
|
||||||
|
"Endpoint": [ "10.8.2.1:51820" ],
|
||||||
|
"ListenPort": [ "21841" ],
|
||||||
|
"AllowedIPs": ["10.8.2.0/24"],
|
||||||
|
"PersistentKeepalive": [ "15" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"txpower": {
|
||||||
|
"dbm": [ "auto", "30", "20", "17", "10", "6", "3", "1", "0" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
# Defaults from Raspberry Pi configuration
|
# RaspAP default configuration
|
||||||
hostname
|
hostname
|
||||||
clientid
|
clientid
|
||||||
persistent
|
persistent
|
||||||
@ -14,9 +14,5 @@ nohook lookup-hostname
|
|||||||
interface wlan0
|
interface wlan0
|
||||||
static ip_address=10.3.141.1/24
|
static ip_address=10.3.141.1/24
|
||||||
static routers=10.3.141.1
|
static routers=10.3.141.1
|
||||||
static domain_name_server=1.1.1.1 8.8.8.8
|
static domain_name_server=9.9.9.9 1.1.1.1
|
||||||
|
|
||||||
# RaspAP uap0 configuration
|
|
||||||
interface uap0
|
|
||||||
static ip_address=192.168.50.1/24
|
|
||||||
nohook wpa_supplicant
|
|
||||||
|
32
config/dns-servers.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"Cloudflare": [
|
||||||
|
"1.0.0.1",
|
||||||
|
"1.1.1.1"
|
||||||
|
],
|
||||||
|
"Freenom World": [
|
||||||
|
"80.80.80.80",
|
||||||
|
"80.80.81.81"
|
||||||
|
],
|
||||||
|
"German Privacy Foundation": [
|
||||||
|
"62.141.58.13",
|
||||||
|
"85.25.251.254",
|
||||||
|
"87.118.100.175",
|
||||||
|
"94.75.228.29"
|
||||||
|
],
|
||||||
|
"Google": [
|
||||||
|
"8.8.4.4",
|
||||||
|
"8.8.8.8"
|
||||||
|
],
|
||||||
|
"OpenDNS": [
|
||||||
|
"208.67.220.220",
|
||||||
|
"208.67.222.222"
|
||||||
|
],
|
||||||
|
"Quad9": [
|
||||||
|
"9.9.9.9",
|
||||||
|
"149.112.112.112"
|
||||||
|
],
|
||||||
|
"Yandex.DNS": [
|
||||||
|
"77.88.8.2",
|
||||||
|
"77.88.8.88"
|
||||||
|
]
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
# RaspAP wlan0 configuration for wired (ethernet) AP mode
|
|
||||||
interface=wlan0
|
|
||||||
dhcp-range=10.3.141.50,10.3.141.255,255.255.255.0,12h
|
|
||||||
|
|
||||||
# RaspAP uap0 configuration for wireless client AP mode
|
|
||||||
#interface=lo,uap0 # Use interfaces lo and uap0
|
|
||||||
#bind-interfaces # Bind to the interfaces
|
|
||||||
#server=8.8.8.8 # Forward DNS requests to Google DNS
|
|
||||||
#domain-needed # Don't forward short names
|
|
||||||
#bogus-priv # Never forward addresses in the non-routed address spaces
|
|
||||||
#dhcp-range=192.168.50.50,192.168.50.150,12h
|
|
||||||
|
|
@ -9,9 +9,9 @@ channel=1
|
|||||||
hw_mode=g
|
hw_mode=g
|
||||||
wpa_passphrase=ChangeMe
|
wpa_passphrase=ChangeMe
|
||||||
interface=wlan0
|
interface=wlan0
|
||||||
wpa=1
|
wpa=2
|
||||||
wpa_pairwise=TKIP
|
wpa_pairwise=CCMP
|
||||||
country_code=
|
country_code=GB
|
||||||
## Rapberry Pi 3 specific to on board WLAN/WiFi
|
## Rapberry Pi 3 specific to on board WLAN/WiFi
|
||||||
#ieee80211n=1 # 802.11n support (Raspberry Pi 3)
|
#ieee80211n=1 # 802.11n support (Raspberry Pi 3)
|
||||||
#wmm_enabled=1 # QoS support (Raspberry Pi 3)
|
#wmm_enabled=1 # QoS support (Raspberry Pi 3)
|
||||||
@ -19,3 +19,6 @@ country_code=
|
|||||||
|
|
||||||
## RaspAP wireless client AP mode
|
## RaspAP wireless client AP mode
|
||||||
#interface=uap0
|
#interface=uap0
|
||||||
|
|
||||||
|
## RaspAP bridge AP mode, disabled by default
|
||||||
|
#bridge=br0
|
||||||
|
205
config/iptables_rules.json
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
{
|
||||||
|
"info": "IPTABLES rules. $...$ expressions will be replaces automatically ($INTERFACE$, $PORT$, $IPADDRESS$)",
|
||||||
|
"rules_v4_file": "/etc/iptables/rules.v4",
|
||||||
|
"rules_v6_file": "/etc/iptables/rules.v6",
|
||||||
|
"order": [ "pre_rules", "restriction_rules", "main_rules", "exception_rules" ],
|
||||||
|
"pre_rules": [
|
||||||
|
{
|
||||||
|
"name": "firewall policies",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "Policy rules (firewall)",
|
||||||
|
"rules": [
|
||||||
|
"-P INPUT DROP",
|
||||||
|
"-P FORWARD ACCEPT",
|
||||||
|
"-P OUTPUT ACCEPT",
|
||||||
|
"-t nat -P PREROUTING ACCEPT",
|
||||||
|
"-t nat -P POSTROUTING ACCEPT",
|
||||||
|
"-t nat -P INPUT ACCEPT",
|
||||||
|
"-t nat -P OUTPUT ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "policies",
|
||||||
|
"fw-state": false,
|
||||||
|
"comment": "Policy rules",
|
||||||
|
"rules": [
|
||||||
|
"-P INPUT ACCEPT",
|
||||||
|
"-P FORWARD ACCEPT",
|
||||||
|
"-P OUTPUT ACCEPT",
|
||||||
|
"-t nat -P PREROUTING ACCEPT",
|
||||||
|
"-t nat -P POSTROUTING ACCEPT",
|
||||||
|
"-t nat -P INPUT ACCEPT",
|
||||||
|
"-t nat -P OUTPUT ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "loopback",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "allow loopback device",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -i lo -j ACCEPT",
|
||||||
|
"-A OUTPUT -o lo -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ping",
|
||||||
|
"fw-state": true,
|
||||||
|
"ip-version": 4,
|
||||||
|
"comment": "allow ping request and echo",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p icmp --icmp-type 8/0 -j ACCEPT",
|
||||||
|
"-A INPUT -p icmp --icmp-type 0/0 -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ping IPv6",
|
||||||
|
"fw-state": true,
|
||||||
|
"ip-version": 6,
|
||||||
|
"comment": "allow ping request and echo for IPv6",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p icmpv6 --icmpv6-type echo-request -j ACCEPT",
|
||||||
|
"-A INPUT -p icmpv6 --icmpv6-type echo-reply -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ntp",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "allow ntp request via udp (tcp should work w/o rule)",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p udp --sport 123 -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dns",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "allow dns request via tcp and udp",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p udp -m multiport --sport 53,853 -j ACCEPT",
|
||||||
|
"-A INPUT -p tcp -m multiport --sport 53,853 -j ACCEPT"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"main_rules": [
|
||||||
|
{
|
||||||
|
"name": "accesspoint",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "Access point interface by default no restrictions",
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "ap-device", "type": "string", "replace": "$INTERFACE$" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -i $INTERFACE$ -j ACCEPT",
|
||||||
|
"-A OUTPUT -o $INTERFACE$ -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NAT for access point",
|
||||||
|
"comment": "Masquerading needed for access point",
|
||||||
|
"rules": [
|
||||||
|
"-t nat -A POSTROUTING -j MASQUERADE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clients",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "Rules for client interfaces (includes tun device)",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "openvpn",
|
||||||
|
"comment": "Rules for tunnel device (tun)",
|
||||||
|
"ip-version": 4,
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "openvpn-enable", "type": "bool" },
|
||||||
|
{ "var": "openvpn-serverip", "type": "string", "replace": "$IPADDRESS$" },
|
||||||
|
{ "var": "ap-device", "type": "string", "replace": "$INTERFACE$" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p udp -s $IPADDRESS$ -j ACCEPT",
|
||||||
|
"-A FORWARD -i tun+ -o $INTERFACE$ -m state --state RELATED,ESTABLISHED -j ACCEPT",
|
||||||
|
"-A FORWARD -i $INTERFACE$ -o tun+ -j ACCEPT",
|
||||||
|
"-t nat -A POSTROUTING -o tun+ -j MASQUERADE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "wireguard",
|
||||||
|
"comment": "Rules for wireguard device (wg)",
|
||||||
|
"ip-version": 4,
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "wireguard-enable", "type": "bool" },
|
||||||
|
{ "var": "wireguard-serverip", "type": "string", "replace": "$IPADDRESS$" },
|
||||||
|
{ "var": "client-device", "type": "string", "replace": "$INTERFACE$" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p udp -s $IPADDRESS$ -j ACCEPT",
|
||||||
|
"-A FORWARD -i wg+ -j ACCEPT",
|
||||||
|
"-t nat -A POSTROUTING -o $INTERFACE$ -j MASQUERADE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"exception_rules": [
|
||||||
|
{
|
||||||
|
"name": "ssh",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "Allow ssh access to RaspAP on port 22",
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "ssh-enable", "type": "bool" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p tcp --dport 22 -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "http",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "Allow access to RaspAP GUI (https)",
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "http-enable", "type": "bool" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "interface",
|
||||||
|
"fw-state": true,
|
||||||
|
"comment": "Exclude interface from firewall",
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "excl-devices", "type": "list", "replace": "$INTERFACE$" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -i $INTERFACE$ -j ACCEPT",
|
||||||
|
"-A OUTPUT -o $INTERFACE$ -j ACCEPT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ipaddress",
|
||||||
|
"fw-state": true,
|
||||||
|
"ip-version": 4,
|
||||||
|
"comment": "allow access from/to IP",
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "excluded-ips", "type": "list", "replace": "$IPADDRESS$" }
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -s $IPADDRESS$ -j ACCEPT",
|
||||||
|
"-A INPUT -d $IPADDRESS$ -j ACCEPT"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"restriction_rules": [
|
||||||
|
{
|
||||||
|
"name": "ipaddress",
|
||||||
|
"fw-state": true,
|
||||||
|
"ip-version": 4,
|
||||||
|
"dependson": [
|
||||||
|
{ "var": "restricted-ips", "type": "list", "replace": "$IPADDRESS$" }
|
||||||
|
],
|
||||||
|
"comment": "Block access from IP-address",
|
||||||
|
"rules": [
|
||||||
|
"-A INPUT -s $IPADDRESS$ -j DROP"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
5
config/raspap-br0-member-eth0.network
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Match]
|
||||||
|
Name=eth0
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
Bridge=br0
|
3
config/raspap-bridge-br0.netdev
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[NetDev]
|
||||||
|
Name=br0
|
||||||
|
Kind=bridge
|
11
config/raspap-bridge-br0.netplan
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
network:
|
||||||
|
version: 2
|
||||||
|
renderer: networkd
|
||||||
|
ethernets:
|
||||||
|
eth0:
|
||||||
|
dhcp4: no
|
||||||
|
bridges:
|
||||||
|
br0:
|
||||||
|
dhcp4: yes
|
||||||
|
interfaces:
|
||||||
|
- eth0
|