Update On Mon Nov 24 19:40:25 CET 2025

This commit is contained in:
github-action[bot]
2025-11-24 19:40:25 +01:00
parent de15f1c914
commit 152eaef70f
50 changed files with 779 additions and 2672 deletions

1
.github/update.log vendored
View File

@@ -1191,3 +1191,4 @@ Update On Thu Nov 20 19:39:36 CET 2025
Update On Fri Nov 21 19:35:09 CET 2025 Update On Fri Nov 21 19:35:09 CET 2025
Update On Sat Nov 22 19:36:29 CET 2025 Update On Sat Nov 22 19:36:29 CET 2025
Update On Sun Nov 23 19:36:55 CET 2025 Update On Sun Nov 23 19:36:55 CET 2025
Update On Mon Nov 24 19:40:17 CET 2025

View File

@@ -32,7 +32,7 @@ require (
github.com/metacubex/sing-shadowsocks v0.2.12 github.com/metacubex/sing-shadowsocks v0.2.12
github.com/metacubex/sing-shadowsocks2 v0.2.7 github.com/metacubex/sing-shadowsocks2 v0.2.7
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2
github.com/metacubex/sing-tun v0.4.9 github.com/metacubex/sing-tun v0.4.10-0.20251124160354-85cd06f11a84
github.com/metacubex/sing-vmess v0.2.4 github.com/metacubex/sing-vmess v0.2.4
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f
github.com/metacubex/smux v0.0.0-20251111013112-03f8d12dafc1 github.com/metacubex/smux v0.0.0-20251111013112-03f8d12dafc1

View File

@@ -129,8 +129,8 @@ github.com/metacubex/sing-shadowsocks2 v0.2.7 h1:hSuuc0YpsfiqYqt1o+fP4m34BQz4e6w
github.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE= github.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI= github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E= github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=
github.com/metacubex/sing-tun v0.4.9 h1:jY0Yyt8nnN3yQRN/jTxgqNCmGi1dsFdxdIi7pQUlVVU= github.com/metacubex/sing-tun v0.4.10-0.20251124160354-85cd06f11a84 h1:PlVO8aCeAnVUsvO9X077iX9wz23nSnbRjtPRdE0GsY8=
github.com/metacubex/sing-tun v0.4.9/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w= github.com/metacubex/sing-tun v0.4.10-0.20251124160354-85cd06f11a84/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w=
github.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I= github.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I=
github.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM= github.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM=
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU= github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=

View File

@@ -2,7 +2,7 @@
"manifest_version": 1, "manifest_version": 1,
"latest": { "latest": {
"mihomo": "v1.19.16", "mihomo": "v1.19.16",
"mihomo_alpha": "alpha-140d892", "mihomo_alpha": "alpha-7571c87",
"clash_rs": "v0.9.2", "clash_rs": "v0.9.2",
"clash_premium": "2023-09-05-gdcc8d87", "clash_premium": "2023-09-05-gdcc8d87",
"clash_rs_alpha": "0.9.2-alpha+sha.87c7b2c" "clash_rs_alpha": "0.9.2-alpha+sha.87c7b2c"
@@ -69,5 +69,5 @@
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf" "linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
} }
}, },
"updated_at": "2025-11-22T22:21:07.536Z" "updated_at": "2025-11-23T22:21:13.537Z"
} }

View File

@@ -10,13 +10,13 @@ importers:
dependencies: dependencies:
'@chenfengyuan/vue-number-input': '@chenfengyuan/vue-number-input':
specifier: ^2.0.1 specifier: ^2.0.1
version: 2.0.1(vue@3.5.24(typescript@5.9.3)) version: 2.0.1(vue@3.5.25(typescript@5.9.3))
'@vueuse/core': '@vueuse/core':
specifier: ^14.0.0 specifier: ^14.0.0
version: 14.0.0(vue@3.5.24(typescript@5.9.3)) version: 14.0.0(vue@3.5.25(typescript@5.9.3))
'@vueuse/integrations': '@vueuse/integrations':
specifier: ^14.0.0 specifier: ^14.0.0
version: 14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.24(typescript@5.9.3)) version: 14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.25(typescript@5.9.3))
ace-builds: ace-builds:
specifier: ^1.43.2 specifier: ^1.43.2
version: 1.43.4 version: 1.43.4
@@ -52,13 +52,13 @@ importers:
version: 8.0.1 version: 8.0.1
pinia: pinia:
specifier: ^3.0.4 specifier: ^3.0.4
version: 3.0.4(typescript@5.9.3)(vue@3.5.24(typescript@5.9.3)) version: 3.0.4(typescript@5.9.3)(vue@3.5.25(typescript@5.9.3))
pretty-bytes: pretty-bytes:
specifier: ^7.1.0 specifier: ^7.1.0
version: 7.1.0 version: 7.1.0
qrcode.vue: qrcode.vue:
specifier: ^3.6.0 specifier: ^3.6.0
version: 3.6.0(vue@3.5.24(typescript@5.9.3)) version: 3.6.0(vue@3.5.25(typescript@5.9.3))
tus-js-client: tus-js-client:
specifier: ^4.3.1 specifier: ^4.3.1
version: 4.3.1 version: 4.3.1
@@ -76,13 +76,13 @@ importers:
version: 1.1.1(video.js@8.23.4) version: 1.1.1(video.js@8.23.4)
vue: vue:
specifier: ^3.5.17 specifier: ^3.5.17
version: 3.5.24(typescript@5.9.3) version: 3.5.25(typescript@5.9.3)
vue-final-modal: vue-final-modal:
specifier: ^4.5.5 specifier: ^4.5.5
version: 4.5.5(@vueuse/core@14.0.0(vue@3.5.24(typescript@5.9.3)))(@vueuse/integrations@14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.24(typescript@5.9.3)))(focus-trap@7.6.2)(vue@3.5.24(typescript@5.9.3)) version: 4.5.5(@vueuse/core@14.0.0(vue@3.5.25(typescript@5.9.3)))(@vueuse/integrations@14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.25(typescript@5.9.3)))(focus-trap@7.6.2)(vue@3.5.25(typescript@5.9.3))
vue-i18n: vue-i18n:
specifier: ^11.1.10 specifier: ^11.1.10
version: 11.2.1(vue@3.5.24(typescript@5.9.3)) version: 11.2.1(vue@3.5.25(typescript@5.9.3))
vue-lazyload: vue-lazyload:
specifier: ^3.0.0 specifier: ^3.0.0
version: 3.0.0 version: 3.0.0
@@ -91,14 +91,14 @@ importers:
version: 1.3.3 version: 1.3.3
vue-router: vue-router:
specifier: ^4.5.1 specifier: ^4.5.1
version: 4.6.3(vue@3.5.24(typescript@5.9.3)) version: 4.6.3(vue@3.5.25(typescript@5.9.3))
vue-toastification: vue-toastification:
specifier: ^2.0.0-rc.5 specifier: ^2.0.0-rc.5
version: 2.0.0-rc.5(vue@3.5.24(typescript@5.9.3)) version: 2.0.0-rc.5(vue@3.5.25(typescript@5.9.3))
devDependencies: devDependencies:
'@intlify/unplugin-vue-i18n': '@intlify/unplugin-vue-i18n':
specifier: ^11.0.1 specifier: ^11.0.1
version: 11.0.1(@vue/compiler-dom@3.5.24)(eslint@9.39.1)(rollup@4.53.3)(typescript@5.9.3)(vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3)))(vue@3.5.24(typescript@5.9.3)) version: 11.0.1(@vue/compiler-dom@3.5.25)(eslint@9.39.1)(rollup@4.53.3)(typescript@5.9.3)(vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))
'@tsconfig/node24': '@tsconfig/node24':
specifier: ^24.0.2 specifier: ^24.0.2
version: 24.0.3 version: 24.0.3
@@ -116,7 +116,7 @@ importers:
version: 7.2.1(terser@5.44.1)(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0)) version: 7.2.1(terser@5.44.1)(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0))
'@vitejs/plugin-vue': '@vitejs/plugin-vue':
specifier: ^6.0.1 specifier: ^6.0.1
version: 6.0.2(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0))(vue@3.5.24(typescript@5.9.3)) version: 6.0.2(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0))(vue@3.5.25(typescript@5.9.3))
'@vue/eslint-config-prettier': '@vue/eslint-config-prettier':
specifier: ^10.2.0 specifier: ^10.2.0
version: 10.2.0(eslint@9.39.1)(prettier@3.6.2) version: 10.2.0(eslint@9.39.1)(prettier@3.6.2)
@@ -125,7 +125,7 @@ importers:
version: 14.6.0(eslint-plugin-vue@10.6.0(@typescript-eslint/parser@8.37.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(vue-eslint-parser@10.2.0(eslint@9.39.1)))(eslint@9.39.1)(typescript@5.9.3) version: 14.6.0(eslint-plugin-vue@10.6.0(@typescript-eslint/parser@8.37.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(vue-eslint-parser@10.2.0(eslint@9.39.1)))(eslint@9.39.1)(typescript@5.9.3)
'@vue/tsconfig': '@vue/tsconfig':
specifier: ^0.8.1 specifier: ^0.8.1
version: 0.8.1(typescript@5.9.3)(vue@3.5.24(typescript@5.9.3)) version: 0.8.1(typescript@5.9.3)(vue@3.5.25(typescript@5.9.3))
autoprefixer: autoprefixer:
specifier: ^10.4.21 specifier: ^10.4.21
version: 10.4.22(postcss@8.5.6) version: 10.4.22(postcss@8.5.6)
@@ -1296,17 +1296,17 @@ packages:
'@volar/typescript@2.4.23': '@volar/typescript@2.4.23':
resolution: {integrity: sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==} resolution: {integrity: sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==}
'@vue/compiler-core@3.5.24': '@vue/compiler-core@3.5.25':
resolution: {integrity: sha512-eDl5H57AOpNakGNAkFDH+y7kTqrQpJkZFXhWZQGyx/5Wh7B1uQYvcWkvZi11BDhscPgj8N7XV3oRwiPnx1Vrig==} resolution: {integrity: sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==}
'@vue/compiler-dom@3.5.24': '@vue/compiler-dom@3.5.25':
resolution: {integrity: sha512-1QHGAvs53gXkWdd3ZMGYuvQFXHW4ksKWPG8HP8/2BscrbZ0brw183q2oNWjMrSWImYLHxHrx1ItBQr50I/q2zw==} resolution: {integrity: sha512-4We0OAcMZsKgYoGlMjzYvaoErltdFI2/25wqanuTu+S4gismOTRTBPi4IASOjxWdzIwrYSjnqONfKvuqkXzE2Q==}
'@vue/compiler-sfc@3.5.24': '@vue/compiler-sfc@3.5.25':
resolution: {integrity: sha512-8EG5YPRgmTB+YxYBM3VXy8zHD9SWHUJLIGPhDovo3Z8VOgvP+O7UP5vl0J4BBPWYD9vxtBabzW1EuEZ+Cqs14g==} resolution: {integrity: sha512-PUgKp2rn8fFsI++lF2sO7gwO2d9Yj57Utr5yEsDf3GNaQcowCLKL7sf+LvVFvtJDXUp/03+dC6f2+LCv5aK1ag==}
'@vue/compiler-ssr@3.5.24': '@vue/compiler-ssr@3.5.25':
resolution: {integrity: sha512-trOvMWNBMQ/odMRHW7Ae1CdfYx+7MuiQu62Jtu36gMLXcaoqKvAyh+P73sYG9ll+6jLB6QPovqoKGGZROzkFFg==} resolution: {integrity: sha512-ritPSKLBcParnsKYi+GNtbdbrIE1mtuFEJ4U1sWeuOMlIziK5GtOL85t5RhsNy4uWIXPgk+OUdpnXiTdzn8o3A==}
'@vue/devtools-api@6.6.4': '@vue/devtools-api@6.6.4':
resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==} resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==}
@@ -1345,22 +1345,22 @@ packages:
typescript: typescript:
optional: true optional: true
'@vue/reactivity@3.5.24': '@vue/reactivity@3.5.25':
resolution: {integrity: sha512-BM8kBhtlkkbnyl4q+HiF5R5BL0ycDPfihowulm02q3WYp2vxgPcJuZO866qa/0u3idbMntKEtVNuAUp5bw4teg==} resolution: {integrity: sha512-5xfAypCQepv4Jog1U4zn8cZIcbKKFka3AgWHEFQeK65OW+Ys4XybP6z2kKgws4YB43KGpqp5D/K3go2UPPunLA==}
'@vue/runtime-core@3.5.24': '@vue/runtime-core@3.5.25':
resolution: {integrity: sha512-RYP/byyKDgNIqfX/gNb2PB55dJmM97jc9wyF3jK7QUInYKypK2exmZMNwnjueWwGceEkP6NChd3D2ZVEp9undQ==} resolution: {integrity: sha512-Z751v203YWwYzy460bzsYQISDfPjHTl+6Zzwo/a3CsAf+0ccEjQ8c+0CdX1WsumRTHeywvyUFtW6KvNukT/smA==}
'@vue/runtime-dom@3.5.24': '@vue/runtime-dom@3.5.25':
resolution: {integrity: sha512-Z8ANhr/i0XIluonHVjbUkjvn+CyrxbXRIxR7wn7+X7xlcb7dJsfITZbkVOeJZdP8VZwfrWRsWdShH6pngMxRjw==} resolution: {integrity: sha512-a4WrkYFbb19i9pjkz38zJBg8wa/rboNERq3+hRRb0dHiJh13c+6kAbgqCPfMaJ2gg4weWD3APZswASOfmKwamA==}
'@vue/server-renderer@3.5.24': '@vue/server-renderer@3.5.25':
resolution: {integrity: sha512-Yh2j2Y4G/0/4z/xJ1Bad4mxaAk++C2v4kaa8oSYTMJBJ00/ndPuxCnWeot0/7/qafQFLh5pr6xeV6SdMcE/G1w==} resolution: {integrity: sha512-UJaXR54vMG61i8XNIzTSf2Q7MOqZHpp8+x3XLGtE3+fL+nQd+k7O5+X3D/uWrnQXOdMw5VPih+Uremcw+u1woQ==}
peerDependencies: peerDependencies:
vue: 3.5.24 vue: 3.5.25
'@vue/shared@3.5.24': '@vue/shared@3.5.25':
resolution: {integrity: sha512-9cwHL2EsJBdi8NY22pngYYWzkTDhld6fAD6jlaeloNGciNSJL6bLpbxVgXl96X00Jtc6YWQv96YA/0sxex/k1A==} resolution: {integrity: sha512-AbOPdQQnAnzs58H2FrrDxYj/TJfmeS2jdfEEhgiKINy+bnOANmVizIEgq1r+C5zsbs6l1CCQxtcj71rwNQ4jWg==}
'@vue/tsconfig@0.8.1': '@vue/tsconfig@0.8.1':
resolution: {integrity: sha512-aK7feIWPXFSUhsCP9PFqPyFOcz4ENkb8hZ2pneL6m2UjCkccvaOhC/5KCKluuBufvp2KzkbdA2W2pk20vLzu3g==} resolution: {integrity: sha512-aK7feIWPXFSUhsCP9PFqPyFOcz4ENkb8hZ2pneL6m2UjCkccvaOhC/5KCKluuBufvp2KzkbdA2W2pk20vLzu3g==}
@@ -1578,8 +1578,8 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
hasBin: true hasBin: true
csstype@3.1.3: csstype@3.2.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}
custom-error-instance@2.1.1: custom-error-instance@2.1.1:
resolution: {integrity: sha512-p6JFxJc3M4OTD2li2qaHkDCw9SfMw82Ldr6OC9Je1aXiGfhx2W8p3GaoeaGrPJTUN9NirTM/KTxHWMUdR1rsUg==} resolution: {integrity: sha512-p6JFxJc3M4OTD2li2qaHkDCw9SfMw82Ldr6OC9Je1aXiGfhx2W8p3GaoeaGrPJTUN9NirTM/KTxHWMUdR1rsUg==}
@@ -2524,8 +2524,8 @@ packages:
peerDependencies: peerDependencies:
typescript: '>=5.0.0' typescript: '>=5.0.0'
vue@3.5.24: vue@3.5.25:
resolution: {integrity: sha512-uTHDOpVQTMjcGgrqFPSb8iO2m1DUvo+WbGqoXQz8Y1CeBYQ0FXf2z1gLRaBtHjlRz7zZUBHxjVB5VTLzYkvftg==} resolution: {integrity: sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==}
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
peerDependenciesMeta: peerDependenciesMeta:
@@ -3220,9 +3220,9 @@ snapshots:
'@babel/helper-string-parser': 7.27.1 '@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.28.5 '@babel/helper-validator-identifier': 7.28.5
'@chenfengyuan/vue-number-input@2.0.1(vue@3.5.24(typescript@5.9.3))': '@chenfengyuan/vue-number-input@2.0.1(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
'@esbuild/aix-ppc64@0.25.12': '@esbuild/aix-ppc64@0.25.12':
optional: true optional: true
@@ -3359,7 +3359,7 @@ snapshots:
'@humanwhocodes/retry@0.4.3': {} '@humanwhocodes/retry@0.4.3': {}
'@intlify/bundle-utils@11.0.1(vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3)))': '@intlify/bundle-utils@11.0.1(vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)))':
dependencies: dependencies:
'@intlify/message-compiler': 11.2.1 '@intlify/message-compiler': 11.2.1
'@intlify/shared': 11.1.12 '@intlify/shared': 11.1.12
@@ -3371,7 +3371,7 @@ snapshots:
source-map-js: 1.2.1 source-map-js: 1.2.1
yaml-eslint-parser: 1.2.3 yaml-eslint-parser: 1.2.3
optionalDependencies: optionalDependencies:
vue-i18n: 11.2.1(vue@3.5.24(typescript@5.9.3)) vue-i18n: 11.2.1(vue@3.5.25(typescript@5.9.3))
'@intlify/core-base@11.2.1': '@intlify/core-base@11.2.1':
dependencies: dependencies:
@@ -3387,12 +3387,12 @@ snapshots:
'@intlify/shared@11.2.1': {} '@intlify/shared@11.2.1': {}
'@intlify/unplugin-vue-i18n@11.0.1(@vue/compiler-dom@3.5.24)(eslint@9.39.1)(rollup@4.53.3)(typescript@5.9.3)(vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3)))(vue@3.5.24(typescript@5.9.3))': '@intlify/unplugin-vue-i18n@11.0.1(@vue/compiler-dom@3.5.25)(eslint@9.39.1)(rollup@4.53.3)(typescript@5.9.3)(vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1) '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1)
'@intlify/bundle-utils': 11.0.1(vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3))) '@intlify/bundle-utils': 11.0.1(vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)))
'@intlify/shared': 11.1.12 '@intlify/shared': 11.1.12
'@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.12)(@vue/compiler-dom@3.5.24)(vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3)))(vue@3.5.24(typescript@5.9.3)) '@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.12)(@vue/compiler-dom@3.5.25)(vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))
'@rollup/pluginutils': 5.3.0(rollup@4.53.3) '@rollup/pluginutils': 5.3.0(rollup@4.53.3)
'@typescript-eslint/scope-manager': 8.46.4 '@typescript-eslint/scope-manager': 8.46.4
'@typescript-eslint/typescript-estree': 8.46.4(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.46.4(typescript@5.9.3)
@@ -3401,9 +3401,9 @@ snapshots:
pathe: 2.0.3 pathe: 2.0.3
picocolors: 1.1.1 picocolors: 1.1.1
unplugin: 2.3.10 unplugin: 2.3.10
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
optionalDependencies: optionalDependencies:
vue-i18n: 11.2.1(vue@3.5.24(typescript@5.9.3)) vue-i18n: 11.2.1(vue@3.5.25(typescript@5.9.3))
transitivePeerDependencies: transitivePeerDependencies:
- '@vue/compiler-dom' - '@vue/compiler-dom'
- eslint - eslint
@@ -3411,14 +3411,14 @@ snapshots:
- supports-color - supports-color
- typescript - typescript
'@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.12)(@vue/compiler-dom@3.5.24)(vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3)))(vue@3.5.24(typescript@5.9.3))': '@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.12)(@vue/compiler-dom@3.5.25)(vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@babel/parser': 7.28.5 '@babel/parser': 7.28.5
optionalDependencies: optionalDependencies:
'@intlify/shared': 11.1.12 '@intlify/shared': 11.1.12
'@vue/compiler-dom': 3.5.24 '@vue/compiler-dom': 3.5.25
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
vue-i18n: 11.2.1(vue@3.5.24(typescript@5.9.3)) vue-i18n: 11.2.1(vue@3.5.25(typescript@5.9.3))
'@jridgewell/gen-mapping@0.3.13': '@jridgewell/gen-mapping@0.3.13':
dependencies: dependencies:
@@ -3815,11 +3815,11 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@vitejs/plugin-vue@6.0.2(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0))(vue@3.5.24(typescript@5.9.3))': '@vitejs/plugin-vue@6.0.2(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0))(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@rolldown/pluginutils': 1.0.0-beta.50 '@rolldown/pluginutils': 1.0.0-beta.50
vite: 7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0) vite: 7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0)
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
'@volar/language-core@2.4.23': '@volar/language-core@2.4.23':
dependencies: dependencies:
@@ -3833,35 +3833,35 @@ snapshots:
path-browserify: 1.0.1 path-browserify: 1.0.1
vscode-uri: 3.1.0 vscode-uri: 3.1.0
'@vue/compiler-core@3.5.24': '@vue/compiler-core@3.5.25':
dependencies: dependencies:
'@babel/parser': 7.28.5 '@babel/parser': 7.28.5
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
entities: 4.5.0 entities: 4.5.0
estree-walker: 2.0.2 estree-walker: 2.0.2
source-map-js: 1.2.1 source-map-js: 1.2.1
'@vue/compiler-dom@3.5.24': '@vue/compiler-dom@3.5.25':
dependencies: dependencies:
'@vue/compiler-core': 3.5.24 '@vue/compiler-core': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
'@vue/compiler-sfc@3.5.24': '@vue/compiler-sfc@3.5.25':
dependencies: dependencies:
'@babel/parser': 7.28.5 '@babel/parser': 7.28.5
'@vue/compiler-core': 3.5.24 '@vue/compiler-core': 3.5.25
'@vue/compiler-dom': 3.5.24 '@vue/compiler-dom': 3.5.25
'@vue/compiler-ssr': 3.5.24 '@vue/compiler-ssr': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
estree-walker: 2.0.2 estree-walker: 2.0.2
magic-string: 0.30.21 magic-string: 0.30.21
postcss: 8.5.6 postcss: 8.5.6
source-map-js: 1.2.1 source-map-js: 1.2.1
'@vue/compiler-ssr@3.5.24': '@vue/compiler-ssr@3.5.25':
dependencies: dependencies:
'@vue/compiler-dom': 3.5.24 '@vue/compiler-dom': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
'@vue/devtools-api@6.6.4': {} '@vue/devtools-api@6.6.4': {}
@@ -3908,8 +3908,8 @@ snapshots:
'@vue/language-core@3.1.5(typescript@5.9.3)': '@vue/language-core@3.1.5(typescript@5.9.3)':
dependencies: dependencies:
'@volar/language-core': 2.4.23 '@volar/language-core': 2.4.23
'@vue/compiler-dom': 3.5.24 '@vue/compiler-dom': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
alien-signals: 3.1.0 alien-signals: 3.1.0
muggle-string: 0.4.1 muggle-string: 0.4.1
path-browserify: 1.0.1 path-browserify: 1.0.1
@@ -3917,56 +3917,56 @@ snapshots:
optionalDependencies: optionalDependencies:
typescript: 5.9.3 typescript: 5.9.3
'@vue/reactivity@3.5.24': '@vue/reactivity@3.5.25':
dependencies: dependencies:
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
'@vue/runtime-core@3.5.24': '@vue/runtime-core@3.5.25':
dependencies: dependencies:
'@vue/reactivity': 3.5.24 '@vue/reactivity': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
'@vue/runtime-dom@3.5.24': '@vue/runtime-dom@3.5.25':
dependencies: dependencies:
'@vue/reactivity': 3.5.24 '@vue/reactivity': 3.5.25
'@vue/runtime-core': 3.5.24 '@vue/runtime-core': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
csstype: 3.1.3 csstype: 3.2.3
'@vue/server-renderer@3.5.24(vue@3.5.24(typescript@5.9.3))': '@vue/server-renderer@3.5.25(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@vue/compiler-ssr': 3.5.24 '@vue/compiler-ssr': 3.5.25
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
'@vue/shared@3.5.24': {} '@vue/shared@3.5.25': {}
'@vue/tsconfig@0.8.1(typescript@5.9.3)(vue@3.5.24(typescript@5.9.3))': '@vue/tsconfig@0.8.1(typescript@5.9.3)(vue@3.5.25(typescript@5.9.3))':
optionalDependencies: optionalDependencies:
typescript: 5.9.3 typescript: 5.9.3
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
'@vueuse/core@14.0.0(vue@3.5.24(typescript@5.9.3))': '@vueuse/core@14.0.0(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@types/web-bluetooth': 0.0.21 '@types/web-bluetooth': 0.0.21
'@vueuse/metadata': 14.0.0 '@vueuse/metadata': 14.0.0
'@vueuse/shared': 14.0.0(vue@3.5.24(typescript@5.9.3)) '@vueuse/shared': 14.0.0(vue@3.5.25(typescript@5.9.3))
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
'@vueuse/integrations@14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.24(typescript@5.9.3))': '@vueuse/integrations@14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
'@vueuse/core': 14.0.0(vue@3.5.24(typescript@5.9.3)) '@vueuse/core': 14.0.0(vue@3.5.25(typescript@5.9.3))
'@vueuse/shared': 14.0.0(vue@3.5.24(typescript@5.9.3)) '@vueuse/shared': 14.0.0(vue@3.5.25(typescript@5.9.3))
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
optionalDependencies: optionalDependencies:
focus-trap: 7.6.2 focus-trap: 7.6.2
jwt-decode: 4.0.0 jwt-decode: 4.0.0
'@vueuse/metadata@14.0.0': {} '@vueuse/metadata@14.0.0': {}
'@vueuse/shared@14.0.0(vue@3.5.24(typescript@5.9.3))': '@vueuse/shared@14.0.0(vue@3.5.25(typescript@5.9.3))':
dependencies: dependencies:
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
'@xmldom/xmldom@0.7.13': {} '@xmldom/xmldom@0.7.13': {}
@@ -4118,7 +4118,7 @@ snapshots:
cssesc@3.0.0: {} cssesc@3.0.0: {}
csstype@3.1.3: {} csstype@3.2.3: {}
custom-error-instance@2.1.1: {} custom-error-instance@2.1.1: {}
@@ -4668,10 +4668,10 @@ snapshots:
picomatch@4.0.3: {} picomatch@4.0.3: {}
pinia@3.0.4(typescript@5.9.3)(vue@3.5.24(typescript@5.9.3)): pinia@3.0.4(typescript@5.9.3)(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
'@vue/devtools-api': 7.7.8 '@vue/devtools-api': 7.7.8
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
optionalDependencies: optionalDependencies:
typescript: 5.9.3 typescript: 5.9.3
@@ -4714,9 +4714,9 @@ snapshots:
punycode@2.3.1: {} punycode@2.3.1: {}
qrcode.vue@3.6.0(vue@3.5.24(typescript@5.9.3)): qrcode.vue@3.6.0(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
querystringify@2.2.0: {} querystringify@2.2.0: {}
@@ -5014,19 +5014,19 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
vue-final-modal@4.5.5(@vueuse/core@14.0.0(vue@3.5.24(typescript@5.9.3)))(@vueuse/integrations@14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.24(typescript@5.9.3)))(focus-trap@7.6.2)(vue@3.5.24(typescript@5.9.3)): vue-final-modal@4.5.5(@vueuse/core@14.0.0(vue@3.5.25(typescript@5.9.3)))(@vueuse/integrations@14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.25(typescript@5.9.3)))(focus-trap@7.6.2)(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
'@vueuse/core': 14.0.0(vue@3.5.24(typescript@5.9.3)) '@vueuse/core': 14.0.0(vue@3.5.25(typescript@5.9.3))
'@vueuse/integrations': 14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.24(typescript@5.9.3)) '@vueuse/integrations': 14.0.0(focus-trap@7.6.2)(jwt-decode@4.0.0)(vue@3.5.25(typescript@5.9.3))
focus-trap: 7.6.2 focus-trap: 7.6.2
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
vue-i18n@11.2.1(vue@3.5.24(typescript@5.9.3)): vue-i18n@11.2.1(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
'@intlify/core-base': 11.2.1 '@intlify/core-base': 11.2.1
'@intlify/shared': 11.2.1 '@intlify/shared': 11.2.1
'@vue/devtools-api': 6.6.4 '@vue/devtools-api': 6.6.4
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
vue-lazyload@3.0.0: {} vue-lazyload@3.0.0: {}
@@ -5034,14 +5034,14 @@ snapshots:
dependencies: dependencies:
epubjs: 0.3.93 epubjs: 0.3.93
vue-router@4.6.3(vue@3.5.24(typescript@5.9.3)): vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
'@vue/devtools-api': 6.6.4 '@vue/devtools-api': 6.6.4
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
vue-toastification@2.0.0-rc.5(vue@3.5.24(typescript@5.9.3)): vue-toastification@2.0.0-rc.5(vue@3.5.25(typescript@5.9.3)):
dependencies: dependencies:
vue: 3.5.24(typescript@5.9.3) vue: 3.5.25(typescript@5.9.3)
vue-tsc@3.1.5(typescript@5.9.3): vue-tsc@3.1.5(typescript@5.9.3):
dependencies: dependencies:
@@ -5049,13 +5049,13 @@ snapshots:
'@vue/language-core': 3.1.5(typescript@5.9.3) '@vue/language-core': 3.1.5(typescript@5.9.3)
typescript: 5.9.3 typescript: 5.9.3
vue@3.5.24(typescript@5.9.3): vue@3.5.25(typescript@5.9.3):
dependencies: dependencies:
'@vue/compiler-dom': 3.5.24 '@vue/compiler-dom': 3.5.25
'@vue/compiler-sfc': 3.5.24 '@vue/compiler-sfc': 3.5.25
'@vue/runtime-dom': 3.5.24 '@vue/runtime-dom': 3.5.25
'@vue/server-renderer': 3.5.24(vue@3.5.24(typescript@5.9.3)) '@vue/server-renderer': 3.5.25(vue@3.5.25(typescript@5.9.3))
'@vue/shared': 3.5.24 '@vue/shared': 3.5.25
optionalDependencies: optionalDependencies:
typescript: 5.9.3 typescript: 5.9.3

View File

@@ -9,27 +9,43 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ppp PKG_NAME:=ppp
PKG_RELEASE:=6 PKG_VERSION:=2.5.2
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/paulusmack/ppp PKG_SOURCE_URL:=https://github.com/ppp-project/ppp
PKG_SOURCE_DATE:=2021-01-04 PKG_MIRROR_HASH:=495bc264c765fd57b64f85e8ecb40b965e1da0818fc63d1fa5c9f3761b049471
PKG_SOURCE_VERSION:=4fb319056f168bb8379865b91b4fd3e1ada73f1e PKG_SOURCE_DATE:=2024-12-31
PKG_MIRROR_HASH:=429cb5fcff36e1d8698766130711d4764347f08b83233dfb4831bea21616efef PKG_SOURCE_VERSION:=9f612dc02c34509f062ed63b60bcc7e937e25178
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-4-Clause PKG_LICENSE:=BSD-4-Clause
PKG_CPE_ID:=cpe:/a:samba:ppp PKG_CPE_ID:=cpe:/a:samba:ppp
PKG_RELEASE_VERSION:=2.4.9
PKG_VERSION:=$(PKG_RELEASE_VERSION).git-$(PKG_SOURCE_DATE)
PKG_BUILD_DEPENDS:=libpcap
PKG_ASLR_PIE_REGULAR:=1 PKG_ASLR_PIE_REGULAR:=1
PKG_BUILD_DEPENDS:=libpcap
PKG_BUILD_FLAGS:=gc-sections lto
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1 PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--disable-cbcp \
--disable-eaptls \
--disable-mslanman \
--disable-openssl-engine \
--disable-peap \
--disable-systemd \
--enable-ipv6cp \
--enable-microsoft-extensions \
--enable-plugins \
--with-atm \
--with-static-pcap \
--without-openssl \
--without-pam \
--without-pcap \
--without-srp
define Package/ppp/Default define Package/ppp/Default
SECTION:=net SECTION:=net
@@ -39,14 +55,14 @@ endef
define Package/ppp define Package/ppp
$(call Package/ppp/Default) $(call Package/ppp/Default)
DEPENDS:=+kmod-ppp +libpthread +shellsync +kmod-mppe DEPENDS:= +USE_GLIBC:libcrypt-compat +kmod-ppp +shellsync +kmod-mppe
TITLE:=PPP daemon TITLE:=PPP daemon
VARIANT:=default VARIANT:=default
endef endef
define Package/ppp-multilink define Package/ppp-multilink
$(call Package/ppp/Default) $(call Package/ppp/Default)
DEPENDS:=+kmod-ppp DEPENDS:= +USE_GLIBC:libcrypt-compat +kmod-ppp
TITLE:=PPP daemon (with multilink support) TITLE:=PPP daemon (with multilink support)
VARIANT:=multilink VARIANT:=multilink
endef endef
@@ -173,54 +189,25 @@ This tool performs the same discovery process as pppoe, but does
not initiate a session. Can be useful to debug pppoe. not initiate a session. Can be useful to debug pppoe.
endef endef
define Build/Configure
$(call Build/Configure/Default,, \
UNAME_S="Linux" \
UNAME_R="$(LINUX_VERSION)" \
UNAME_M="$(ARCH)" \
)
mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
$(CP) \
$(LINUX_DIR)/include/linux/compiler.h \
$(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
$(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
# Kernel 4.14.9+ only, ignore the exit status of cp in case the file
# doesn't exits
-$(CP) $(LINUX_DIR)/include/linux/compiler_types.h \
$(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
endef
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections -flto -fuse-linker-plugin
MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
PRECOMPILED_FILTER=1 \
STAGING_DIR="$(STAGING_DIR)"
ifeq ($(BUILD_VARIANT),multilink) ifeq ($(BUILD_VARIANT),multilink)
MAKE_FLAGS += HAVE_MULTILINK=y CONFIGURE_ARGS += \
else --enable-multilink
MAKE_FLAGS += HAVE_MULTILINK=
endif
ifdef CONFIG_USE_MUSL
MAKE_FLAGS += USE_LIBUTIL=
endif endif
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/include/pppd $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
endef endef
define Package/ppp/script_install define Package/ppp/script_install
endef endef
define Package/ppp/install define Package/ppp/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/ppp $(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/ $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
$(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/ $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
@@ -235,21 +222,21 @@ endef
Package/ppp-multilink/install=$(Package/ppp/install) Package/ppp-multilink/install=$(Package/ppp/install)
define Package/ppp-mod-pppoa/install define Package/ppp-mod-pppoa/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pppoatm.so \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/ $(1)/usr/lib/pppd/$(PKG_VERSION)/
endef endef
define Package/ppp-mod-pppoe/install define Package/ppp-mod-pppoe/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pppoe.so \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoe.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/ $(1)/usr/lib/pppd/$(PKG_VERSION)/
endef endef
define Package/ppp-mod-radius/install define Package/ppp-mod-radius/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/radius.so \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/ $(1)/usr/lib/pppd/$(PKG_VERSION)/
$(INSTALL_DIR) $(1)/etc/ppp $(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/ $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/etc/ppp/radius $(INSTALL_DIR) $(1)/etc/ppp/radius
@@ -260,43 +247,43 @@ define Package/ppp-mod-radius/install
endef endef
define Package/ppp-mod-pppol2tp/install define Package/ppp-mod-pppol2tp/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pppol2tp.so \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/ $(1)/usr/lib/pppd/$(PKG_VERSION)/
endef endef
define Package/ppp-mod-pptp/install define Package/ppp-mod-pptp/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pptp.so \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pptp.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/ $(1)/usr/lib/pppd/$(PKG_VERSION)/
$(INSTALL_DIR) $(1)/etc/ppp $(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/ $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
endef endef
define Package/ppp-mod-passwordfd/install define Package/ppp-mod-passwordfd/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION) $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/passwordfd.so \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/passwordfd.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/ $(1)/usr/lib/pppd/$(PKG_VERSION)/
endef endef
define Package/chat/install define Package/chat/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
endef endef
define Package/pppdump/install define Package/pppdump/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
endef endef
define Package/pppstats/install define Package/pppstats/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
endef endef
define Package/pppoe-discovery/install define Package/pppoe-discovery/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppoe-discovery $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-discovery $(1)/usr/sbin/
endef endef
$(eval $(call BuildPackage,ppp)) $(eval $(call BuildPackage,ppp))

View File

@@ -3,5 +3,7 @@ noauth
nobsdcomp nobsdcomp
nodeflate nodeflate
idle 0 idle 0
mppe required,no40,no56,stateless nomppe-40
require-mppe-128
nomppe-stateful
maxfail 0 maxfail 0

View File

@@ -11,3 +11,4 @@ proto_send_update "$PPP_IPPARAM"
[ -x "$SCRIPT" ] && "$SCRIPT" "$@" [ -x "$SCRIPT" ] && "$SCRIPT" "$@"
done done
} }
sleep 3

View File

@@ -26,7 +26,11 @@ if [ -n "$AUTOIPV6" ]; then
[ -n "$ZONE" ] && json_add_string zone "$ZONE" [ -n "$ZONE" ] && json_add_string zone "$ZONE"
[ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1 [ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
[ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE [ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
[ -n "$REQPREFIX" ] && json_add_string reqprefix $REQPREFIX
[ -n "$PEERDNS" ] && json_add_boolean peerdns $PEERDNS [ -n "$PEERDNS" ] && json_add_boolean peerdns $PEERDNS
[ "$NOSOURCEFILTER" = "1" ] && json_add_boolean sourcefilter "0"
[ "$DELEGATE" = "0" ] && json_add_boolean delegate "0"
[ -n "$NORELEASE" ] && json_add_boolean norelease "1"
json_close_object json_close_object
ubus call network add_dynamic "$(json_dump)" ubus call network add_dynamic "$(json_dump)"
fi fi

View File

@@ -79,16 +79,20 @@ ppp_generic_init_config() {
proto_config_add_int mtu proto_config_add_int mtu
proto_config_add_string pppname proto_config_add_string pppname
proto_config_add_string unnumbered proto_config_add_string unnumbered
proto_config_add_string reqprefix
proto_config_add_boolean persist proto_config_add_boolean persist
proto_config_add_int maxfail proto_config_add_int maxfail
proto_config_add_int holdoff proto_config_add_int holdoff
proto_config_add_boolean sourcefilter
proto_config_add_boolean delegate
proto_config_add_boolean norelease
} }
ppp_generic_setup() { ppp_generic_setup() {
local config="$1"; shift local config="$1"; shift
local localip local localip
json_get_vars ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns json_get_vars ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered reqprefix persist maxfail holdoff peerdns sourcefilter delegate norelease
[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6 [ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
@@ -99,6 +103,11 @@ ppp_generic_setup() {
autoipv6=1 autoipv6=1
fi fi
if [ "$autoipv6" != 1 ]; then
reqprefix=""
norelease=""
fi
if [ "${demand:-0}" -gt 0 ]; then if [ "${demand:-0}" -gt 0 ]; then
demand="precompiled-active-filter /etc/ppp/filter demand idle $demand" demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
else else
@@ -133,6 +142,9 @@ ppp_generic_setup() {
[ "${keepalive_adaptive:-1}" -lt 1 ] && lcp_adaptive="" [ "${keepalive_adaptive:-1}" -lt 1 ] && lcp_adaptive=""
[ -n "$connect" ] || json_get_var connect connect [ -n "$connect" ] || json_get_var connect connect
[ -n "$disconnect" ] || json_get_var disconnect disconnect [ -n "$disconnect" ] || json_get_var disconnect disconnect
[ "$sourcefilter" = "0" ] || sourcefilter=""
[ "$delegate" != "0" ] && delegate=""
[ "$norelease" = "1" ] || norelease=""
proto_run_command "$config" /usr/sbin/pppd \ proto_run_command "$config" /usr/sbin/pppd \
nodetach ipparam "$config" \ nodetach ipparam "$config" \
@@ -141,8 +153,12 @@ ppp_generic_setup() {
${lcp_failure:+lcp-echo-interval $lcp_interval lcp-echo-failure $lcp_failure $lcp_adaptive} \ ${lcp_failure:+lcp-echo-interval $lcp_interval lcp-echo-failure $lcp_failure $lcp_adaptive} \
${ipv6:++ipv6} \ ${ipv6:++ipv6} \
${autoipv6:+set AUTOIPV6=1} \ ${autoipv6:+set AUTOIPV6=1} \
${reqprefix:+set REQPREFIX=$reqprefix} \
${norelease:+set NORELEASE=1} \
${ip6table:+set IP6TABLE=$ip6table} \ ${ip6table:+set IP6TABLE=$ip6table} \
${peerdns:+set PEERDNS=$peerdns} \ ${peerdns:+set PEERDNS=$peerdns} \
${sourcefilter:+set NOSOURCEFILTER=1} \
${delegate:+set DELEGATE=0} \
nodefaultroute \ nodefaultroute \
usepeerdns \ usepeerdns \
$demand $persist maxfail $maxfail \ $demand $persist maxfail $maxfail \
@@ -209,6 +225,7 @@ proto_pppoe_init_config() {
ppp_generic_init_config ppp_generic_init_config
proto_config_add_string "ac" proto_config_add_string "ac"
proto_config_add_string "service" proto_config_add_string "service"
proto_config_add_string "ac_mac"
proto_config_add_string "host_uniq" proto_config_add_string "host_uniq"
proto_config_add_int "padi_attempts" proto_config_add_int "padi_attempts"
proto_config_add_int "padi_timeout" proto_config_add_int "padi_timeout"
@@ -227,6 +244,7 @@ proto_pppoe_setup() {
json_get_var ac ac json_get_var ac ac
json_get_var service service json_get_var service service
json_get_var ac_mac ac_mac
json_get_var host_uniq host_uniq json_get_var host_uniq host_uniq
json_get_var padi_attempts padi_attempts json_get_var padi_attempts padi_attempts
json_get_var padi_timeout padi_timeout json_get_var padi_timeout padi_timeout
@@ -244,6 +262,7 @@ proto_pppoe_setup() {
plugin pppoe.so \ plugin pppoe.so \
${ac:+rp_pppoe_ac "$ac"} \ ${ac:+rp_pppoe_ac "$ac"} \
${service:+rp_pppoe_service "$service"} \ ${service:+rp_pppoe_service "$service"} \
${ac_mac:+pppoe-mac "$ac_mac"} \
${host_uniq:+host-uniq "$host_uniq"} \ ${host_uniq:+host-uniq "$host_uniq"} \
${padi_attempts:+pppoe-padi-attempts $padi_attempts} \ ${padi_attempts:+pppoe-padi-attempts $padi_attempts} \
${padi_timeout:+pppoe-padi-timeout $padi_timeout} \ ${padi_timeout:+pppoe-padi-timeout $padi_timeout} \

View File

@@ -0,0 +1,30 @@
From 5edcb01f1d8d521c819d45df1f1bb87697252130 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 17 Mar 2025 14:38:26 -0700
Subject: [PATCH] pppd/session: Fixed building with GCC 15
Fixed building with GCC 15 which defaults to C23
and find conflicting declration of getspnam() here
with the one provided by shadow.h (extern struct spwd *getspnam (const char *__name);)
Fixes
../../ppp-2.5.2/pppd/session.c: In function 'session_start':
../../ppp-2.5.2/pppd/session.c:185:18: error: conflicting types for 'getspnam'; have 'struct spwd *(void)'
185 | struct spwd *getspnam();
| ^~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
pppd/session.c | 1 -
1 file changed, 1 deletion(-)
--- a/pppd/session.c
+++ b/pppd/session.c
@@ -182,7 +182,6 @@ session_start(const int flags, const cha
char *cbuf;
#ifdef HAVE_SHADOW_H
struct spwd *spwd;
- struct spwd *getspnam();
long now = 0;
#endif /* #ifdef HAVE_SHADOW_H */
#endif /* #ifdef PPP_WITH_PAM */

View File

@@ -0,0 +1,70 @@
From c6c84c77c16878745be4955f2f5baac1f2280c96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
Date: Thu, 27 Feb 2025 11:44:08 +0100
Subject: [PATCH] Fixed building with GCC 15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 15 defaults to C23 which does not allow K&R declarations.
Credit Yaakov Selkowitz in:
https://src.fedoraproject.org/rpms/ppp/pull-request/12
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
---
pppdump/pppdump.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
--- a/pppdump/pppdump.c
+++ b/pppdump/pppdump.c
@@ -42,14 +42,12 @@ int tot_sent, tot_rcvd;
extern int optind;
extern char *optarg;
-void dumplog();
-void dumpppp();
-void show_time();
+void dumplog(FILE *);
+void dumpppp(FILE *);
+void show_time(FILE *, int);
int
-main(ac, av)
- int ac;
- char **av;
+main(int ac, char **av)
{
int i;
char *p;
@@ -97,8 +95,7 @@ main(ac, av)
}
void
-dumplog(f)
- FILE *f;
+dumplog(FILE *f)
{
int c, n, k, col;
int nb, c2;
@@ -241,8 +238,7 @@ struct pkt {
unsigned char dbuf[8192];
void
-dumpppp(f)
- FILE *f;
+dumpppp(FILE *f)
{
int c, n, k;
int nb, nl, dn, proto, rv;
@@ -375,9 +371,7 @@ dumpppp(f)
}
void
-show_time(f, c)
- FILE *f;
- int c;
+show_time(FILE *f, int c)
{
time_t t;
int n;

View File

@@ -1,24 +0,0 @@
configure: Allow overriding uname results
In a cross compile setting it makes no sense to rely on the "uname" values
reported by the build host system. This patch allows overriding the
"uname -r", "uname -s" and "uname -m" results with the "UNAME_R", "UNAME_S"
and "UNAME_M" environment variables.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/configure
+++ b/configure
@@ -10,9 +10,9 @@ CROSS_COMPILE=
CC=cc
CFLAGS=
-system=`uname -s`
-release=`uname -r`
-arch=`uname -m`
+system=${UNAME_S:-`uname -s`}
+release=${UNAME_R:-`uname -r`}
+arch=${UNAME_M:-`uname -m`}
state="unknown"
case $system in

View File

@@ -1,6 +1,6 @@
--- a/pppd/demand.c --- a/pppd/demand.c
+++ b/pppd/demand.c +++ b/pppd/demand.c
@@ -36,6 +36,8 @@ @@ -34,6 +34,8 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <netdb.h> #include <netdb.h>
@@ -9,16 +9,16 @@
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
@@ -43,6 +45,8 @@ @@ -41,6 +43,8 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/socket.h> #include <sys/socket.h>
+#include <netinet/in.h> +#include <netinet/in.h>
+#include <arpa/inet.h> +#include <arpa/inet.h>
#ifdef PPP_FILTER #ifdef PPP_WITH_FILTER
#include <pcap-bpf.h> #include <pcap-bpf.h>
#endif #endif
@@ -218,6 +222,14 @@ loop_chars(unsigned char *p, int n) @@ -217,6 +221,14 @@ loop_chars(unsigned char *p, int n)
int c, rv; int c, rv;
rv = 0; rv = 0;
@@ -33,7 +33,7 @@
for (; n > 0; --n) { for (; n > 0; --n) {
c = *p++; c = *p++;
if (c == PPP_FLAG) { if (c == PPP_FLAG) {
@@ -294,16 +306,100 @@ loop_frame(unsigned char *frame, int len @@ -293,16 +305,100 @@ loop_frame(unsigned char *frame, int len
* loopback, now that the real serial link is up. * loopback, now that the real serial link is up.
*/ */
void void
@@ -137,7 +137,7 @@
} else { } else {
--- a/pppd/ipcp.c --- a/pppd/ipcp.c
+++ b/pppd/ipcp.c +++ b/pppd/ipcp.c
@@ -1850,7 +1850,7 @@ ipcp_up(fsm *f) @@ -1915,7 +1915,7 @@ ipcp_up(fsm *f)
proxy_arp_set[f->unit] = 1; proxy_arp_set[f->unit] = 1;
} }
@@ -148,7 +148,7 @@
} else { } else {
--- a/pppd/ipv6cp.c --- a/pppd/ipv6cp.c
+++ b/pppd/ipv6cp.c +++ b/pppd/ipv6cp.c
@@ -1253,7 +1253,7 @@ ipv6cp_up(fsm *f) @@ -1338,7 +1338,7 @@ ipv6cp_up(fsm *f)
if (sif6defaultroute(f->unit, go->ourid, ho->hisid)) if (sif6defaultroute(f->unit, go->ourid, ho->hisid))
default_route_set[f->unit] = 1; default_route_set[f->unit] = 1;
} }
@@ -157,14 +157,14 @@
sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS); sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS);
} else { } else {
--- a/pppd/pppd.h --- a/pppd/pppd-private.h
+++ b/pppd/pppd.h +++ b/pppd/pppd-private.h
@@ -598,7 +598,7 @@ void demand_conf(void); /* config interf @@ -370,7 +370,7 @@ void demand_conf(void); /* config interf
void demand_block(void); /* set all NPs to queue up packets */ void demand_block(void); /* set all NPs to queue up packets */
void demand_unblock(void); /* set all NPs to pass packets */ void demand_unblock(void); /* set all NPs to pass packets */
void demand_discard(void); /* set all NPs to discard packets */ void demand_discard(void); /* set all NPs to discard packets */
-void demand_rexmit(int); /* retransmit saved frames for an NP */ -void demand_rexmit(int); /* retransmit saved frames for an NP */
+void demand_rexmit(int, u_int32_t); /* retransmit saved frames for an NP*/ +void demand_rexmit(int, u_int32_t); /* retransmit saved frames for an NP */
int loop_chars(unsigned char *, int); /* process chars from loopback */ int loop_chars(unsigned char *, int); /* process chars from loopback */
int loop_frame(unsigned char *, int); /* should we bring link up? */ int loop_frame(unsigned char *, int); /* should we bring link up? */

View File

@@ -1,95 +0,0 @@
pppd: Allow specifying ipv6-up and ipv6-down scripts
This patch implements the "ipv6-up-script" and "ipv6-down-script" options
which allow to specify the path of the ipv6-up and ipv6-down scripts to call.
These options default to _PATH_IPV6UP and _PATH_IPV6DOWN to retain the
existing behaviour.
The patch originated from the Debian project.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -295,6 +295,8 @@ main(int argc, char *argv[])
strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
+ strlcpy(path_ipv6up, _PATH_IPV6UP, sizeof(path_ipv6up));
+ strlcpy(path_ipv6down, _PATH_IPV6DOWN, sizeof(path_ipv6down));
link_stats_valid = 0;
new_phase(PHASE_INITIALIZE);
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -118,6 +118,8 @@ int req_unit = -1; /* requested interfa
char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
char req_ifname[MAXIFNAMELEN]; /* requested interface name */
+char path_ipv6up[MAXPATHLEN]; /* pathname of ipv6-up script */
+char path_ipv6down[MAXPATHLEN];/* pathname of ipv6-down script */
bool multilink = 0; /* Enable multilink operation */
char *bundle_name = NULL; /* bundle name for multilink */
bool dump_options; /* print out option values */
@@ -324,6 +326,13 @@ option_t general_options[] = {
"Set pathname of ip-down script",
OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
+ { "ipv6-up-script", o_string, path_ipv6up,
+ "Set pathname of ipv6-up script",
+ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
+ { "ipv6-down-script", o_string, path_ipv6down,
+ "Set pathname of ipv6-down script",
+ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
+
#ifdef HAVE_MULTILINK
{ "multilink", o_bool, &multilink,
"Enable multilink operation", OPT_PRIO | 1 },
--- a/pppd/ipv6cp.c
+++ b/pppd/ipv6cp.c
@@ -1295,7 +1295,7 @@ ipv6cp_up(fsm *f)
*/
if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) {
ipv6cp_script_state = s_up;
- ipv6cp_script(_PATH_IPV6UP);
+ ipv6cp_script(path_ipv6up);
}
}
@@ -1346,7 +1346,7 @@ ipv6cp_down(fsm *f)
/* Execute the ipv6-down script */
if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) {
ipv6cp_script_state = s_down;
- ipv6cp_script(_PATH_IPV6DOWN);
+ ipv6cp_script(path_ipv6down);
}
}
@@ -1384,13 +1384,13 @@ ipv6cp_script_done(void *arg)
case s_up:
if (ipv6cp_fsm[0].state != OPENED) {
ipv6cp_script_state = s_down;
- ipv6cp_script(_PATH_IPV6DOWN);
+ ipv6cp_script(path_ipv6down);
}
break;
case s_down:
if (ipv6cp_fsm[0].state == OPENED) {
ipv6cp_script_state = s_up;
- ipv6cp_script(_PATH_IPV6UP);
+ ipv6cp_script(path_ipv6up);
}
break;
}
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -328,6 +328,8 @@ extern int req_unit; /* interface unit n
extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
extern char req_ifname[MAXIFNAMELEN]; /* interface name to use */
+extern char path_ipv6up[MAXPATHLEN]; /* pathname of ipv6-up script */
+extern char path_ipv6down[MAXPATHLEN]; /* pathname of ipv6-down script */
extern bool multilink; /* enable multilink operation */
extern bool noendpoint; /* don't send or accept endpt. discrim. */
extern char *bundle_name; /* bundle name for multilink */

View File

@@ -1,11 +0,0 @@
--- a/pppd/sha1.c
+++ b/pppd/sha1.c
@@ -19,7 +19,7 @@
#include <string.h>
#include <time.h>
#include <netinet/in.h> /* htonl() */
-#include <net/ppp_defs.h>
+#include "pppd.h"
#include "sha1.h"
static void

View File

@@ -1,56 +0,0 @@
pppd: tune Linux config defaults for OpenWrt
This patch adjusts a number defaults to properly match the OpenWrt environment.
It is not intended for upstream.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -49,7 +49,7 @@ MPPE=y
# Uncomment the next line to include support for PPP packet filtering.
# This requires that the libpcap library and headers be installed
# and that the kernel driver support PPP packet filtering.
-FILTER=y
+#FILTER=y
# Uncomment the next line to enable multilink PPP (enabled by default)
# Linux distributions: Please leave multilink ENABLED in your builds
@@ -59,7 +59,7 @@ HAVE_MULTILINK=y
# Uncomment the next line to enable the TDB database (enabled by default.)
# If you enable multilink, then TDB is automatically enabled also.
# Linux distributions: Please leave TDB ENABLED in your builds.
-USE_TDB=y
+#USE_TDB=y
# Uncomment the next line to enable Type=notify services in systemd
# If enabled, and the user sets the up_sdnotify option, then
@@ -85,13 +85,13 @@ USE_LIBUTIL=y
endif
# Enable EAP-TLS authentication (requires MPPE support, libssl and libcrypto)
-USE_EAPTLS=y
+#USE_EAPTLS=y
MAXOCTETS=y
INCLUDE_DIRS= -I../include
-COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -pipe
+COMPILE_FLAGS= -DHAVE_PATHS_H -DHAVE_MMAP -pipe
CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
@@ -143,10 +143,10 @@ CFLAGS += -DHAS_SHADOW
#LIBS += -lshadow $(LIBS)
endif
-ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
+#ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes)
CFLAGS += -DHAVE_CRYPT_H=1
LIBS += -lcrypt
-endif
+#endif
ifdef USE_LIBUTIL
CFLAGS += -DHAVE_LOGWTMP=1

View File

@@ -1,38 +0,0 @@
build: Move optimization flags into a separate variable
Isolate optimization related compiler flags from CFLAGS and move them into a
separate COPTS variable so that it is easier to override optimizations from
the environment.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/plugins/radius/Makefile.linux
+++ b/pppd/plugins/radius/Makefile.linux
@@ -47,13 +47,13 @@ install: all
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
radius.so: radius.o libradiusclient.a
- $(CC) $(LDFLAGS) -o radius.so -shared radius.o libradiusclient.a
+ $(CC) $(LDFLAGS) -fPIC -o radius.so -shared radius.o libradiusclient.a
radattr.so: radattr.o
- $(CC) $(LDFLAGS) -o radattr.so -shared radattr.o
+ $(CC) $(LDFLAGS) -fPIC -o radattr.so -shared radattr.o
radrealms.so: radrealms.o
- $(CC) $(LDFLAGS) -o radrealms.so -shared radrealms.o
+ $(CC) $(LDFLAGS) -fPIC -o radrealms.so -shared radrealms.o
CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
clientid.o sendserver.o lock.o util.o md5.o
--- a/pppd/plugins/pppoe/Makefile.linux
+++ b/pppd/plugins/pppoe/Makefile.linux
@@ -38,7 +38,7 @@ debug.o: debug.c
$(CC) $(CFLAGS) -I../../.. -c -o debug.o debug.c
pppoe.so: plugin.o discovery.o if.o common.o
- $(CC) $(LDFLAGS) -o pppoe.so -shared plugin.o discovery.o if.o common.o
+ $(CC) $(LDFLAGS) -fPIC -o pppoe.so -shared plugin.o discovery.o if.o common.o
install: all
$(INSTALL) -d -m 755 $(LIBDIR)

View File

@@ -1,6 +1,6 @@
--- a/pppd/plugins/radius/config.c --- a/pppd/plugins/radius/config.c
+++ b/pppd/plugins/radius/config.c +++ b/pppd/plugins/radius/config.c
@@ -371,31 +371,37 @@ static int test_config(char *filename) @@ -379,31 +379,37 @@ static int test_config(char *filename)
} }
#endif #endif
@@ -40,7 +40,7 @@
} }
--- a/pppd/plugins/radius/options.h --- a/pppd/plugins/radius/options.h
+++ b/pppd/plugins/radius/options.h +++ b/pppd/plugins/radius/options.h
@@ -31,24 +31,21 @@ typedef struct _option { @@ -29,24 +29,21 @@ typedef struct _option {
static SERVER acctserver = {0}; static SERVER acctserver = {0};
static SERVER authserver = {0}; static SERVER authserver = {0};

View File

@@ -1,29 +0,0 @@
pppd: Don't use exponential timeout in discovery phase
This patch removes the exponential timeout increase between PADO or PADS
discovery attempts.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/plugins/pppoe/discovery.c
+++ b/pppd/plugins/pppoe/discovery.c
@@ -632,7 +632,9 @@ discovery(PPPoEConnection *conn)
conn->discoveryState = STATE_SENT_PADI;
waitForPADO(conn, timeout);
+#if 0
timeout *= 2;
+#endif
} while (conn->discoveryState == STATE_SENT_PADI);
timeout = conn->discoveryTimeout;
@@ -647,7 +649,9 @@ discovery(PPPoEConnection *conn)
sendPADR(conn);
conn->discoveryState = STATE_SENT_PADR;
waitForPADS(conn, timeout);
+#if 0
timeout *= 2;
+#endif
} while (conn->discoveryState == STATE_SENT_PADR);
if (!conn->seenMaxPayload) {

View File

@@ -8,18 +8,18 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/lcp.c --- a/pppd/lcp.c
+++ b/pppd/lcp.c +++ b/pppd/lcp.c
@@ -1862,12 +1862,12 @@ lcp_up(fsm *f) @@ -1888,12 +1888,12 @@ lcp_up(fsm *f)
* the interface MTU is set to the lowest of that, the * the interface MTU is set to the lowest of that, the
* MTU we want to use, and our link MRU. * MTU we want to use, and our link MRU.
*/ */
- mtu = ho->neg_mru? ho->mru: PPP_MRU; - mtu = ho->neg_mru? ho->mru: PPP_MRU;
+ mtu = MIN(ho->neg_mru? ho->mru: PPP_MRU, ao->mru); + mtu = MIN(ho->neg_mru? ho->mru: PPP_MRU, ao->mru);
mru = go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU; mru = go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU;
#ifdef HAVE_MULTILINK #ifdef PPP_WITH_MULTILINK
if (!(multilink && go->neg_mrru && ho->neg_mrru)) if (!(multilink && go->neg_mrru && ho->neg_mrru))
#endif /* HAVE_MULTILINK */ #endif /* PPP_WITH_MULTILINK */
- netif_set_mtu(f->unit, MIN(MIN(mtu, mru), ao->mru)); - ppp_set_mtu(f->unit, MIN(MIN(mtu, mru), ao->mru));
+ netif_set_mtu(f->unit, MIN(mtu, mru)); + ppp_set_mtu(f->unit, MIN(mtu, mru));
ppp_send_config(f->unit, mtu, ppp_send_config(f->unit, mtu,
(ho->neg_asyncmap? ho->asyncmap: 0xffffffff), (ho->neg_asyncmap? ho->asyncmap: 0xffffffff),
ho->neg_pcompression, ho->neg_accompression); ho->neg_pcompression, ho->neg_accompression);

View File

@@ -12,13 +12,13 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/main.c --- a/pppd/main.c
+++ b/pppd/main.c +++ b/pppd/main.c
@@ -1034,7 +1034,8 @@ get_input(void) @@ -1150,7 +1150,8 @@ get_input(void)
} }
notice("Modem hangup"); notice("Modem hangup");
hungup = 1; hungup = 1;
- status = EXIT_HANGUP; - code = EXIT_HANGUP;
+ if (status == EXIT_OK) + if (code == EXIT_OK)
+ status = EXIT_HANGUP; + code = EXIT_HANGUP;
need_holdoff = 0;
lcp_lowerdown(0); /* serial link is no longer available */ lcp_lowerdown(0); /* serial link is no longer available */
link_terminated(0); link_terminated(0);
return;

View File

@@ -1,20 +0,0 @@
build: Add required CFLAGS for libpcap
This patch adds some flags to required to properly link libpcap within the
OpenWrt environment.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -210,8 +210,8 @@ LIBS += -ldl
endif
ifdef FILTER
-LIBS += -lpcap
-CFLAGS += -DPPP_FILTER
+LIBS += -lpcap -L$(STAGING_DIR)/usr/lib
+CFLAGS += -DPPP_FILTER -I$(STAGING_DIR)/usr/include
endif
ifdef HAVE_INET6

View File

@@ -11,62 +11,70 @@ packets which are treated as active.
Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/Makefile.linux --- a/configure.ac
+++ b/pppd/Makefile.linux +++ b/configure.ac
@@ -51,6 +51,9 @@ MPPE=y @@ -306,6 +306,9 @@ AM_CONDITIONAL(PPP_WITH_PAM, test "x${wi
# and that the kernel driver support PPP packet filtering. # With libpcap support, activate pppd on network activity
#FILTER=y AX_CHECK_PCAP
+# Support for precompiled filters +# internal statically linked pcap
+PRECOMPILED_FILTER=y +AM_CONDITIONAL(PPP_WITH_PRECOMPILED_FILTER, test "x${with_static_pcap}" = "xyes")
+ +
# Uncomment the next line to enable multilink PPP (enabled by default) #
# Linux distributions: Please leave multilink ENABLED in your builds # SunOS provides a version of libpcap that would work, but SunOS has no support for activity filter
# of pppd! AM_CONDITIONAL([PPP_WITH_FILTER], [ test "x${with_pcap}" = "xyes" && test "x${build_sunos}" != "xyes" ])
@@ -214,6 +217,14 @@ LIBS += -lpcap -L$(STAGING_DIR)/usr/l @@ -348,6 +351,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
CFLAGS += -DPPP_FILTER -I$(STAGING_DIR)/usr/include With libatm..........: ${with_atm:-no}
With libpam..........: ${with_pam:-no}
With libpcap.........: ${with_pcap:-no}
+ With static libpcap..: ${with_static_pcap:-no}
With libsrp..........: ${with_srp:-no}
C Compiler...........: $CC $CFLAGS
Linker...............: $LD $LDFLAGS $LIBS
--- a/pppd/Makefile.am
+++ b/pppd/Makefile.am
@@ -137,6 +137,12 @@ pppd_LDFLAGS += $(PCAP_LDFLAGS)
pppd_LIBS += $(PCAP_LIBS)
endif endif
+ifdef PRECOMPILED_FILTER +if PPP_WITH_PRECOMPILED_FILTER
+PPPDSRCS += pcap_pcc.c +pppd_SOURCES += pcap_pcc.c
+HEADERS += pcap_pcc.h +pppd_include_HEADERS += pcap_pcc.h
+PPPDOBJS += pcap_pcc.o +pppd_LIBS += $(STAGING_DIR)/usr/lib/libpcap.a
+LIBS += $(STAGING_DIR)/usr/lib/libpcap.a
+CFLAGS += -DPPP_FILTER -DPPP_PRECOMPILED_FILTER -I$(STAGING_DIR)/usr/include
+endif +endif
+ +
ifdef HAVE_INET6 if PPP_WITH_PLUGINS
PPPDSRCS += ipv6cp.c eui64.c pppd_CPPFLAGS += -DPPPD_PLUGIN_DIR='"@PPPD_PLUGIN_DIR@"'
HEADERS += ipv6cp.h eui64.h pppd_LIBS += -ldl
--- a/pppd/options.c --- a/pppd/options.c
+++ b/pppd/options.c +++ b/pppd/options.c
@@ -56,6 +56,7 @@ @@ -62,6 +62,7 @@
#ifdef PPP_FILTER #ifdef PPP_WITH_FILTER
#include <pcap.h> #include <pcap.h>
+#include <pcap-bpf.h> +#include <pcap-bpf.h>
/* /*
* There have been 3 or 4 different names for this in libpcap CVS, but * There have been 3 or 4 different names for this in libpcap CVS, but
* this seems to be what they have settled on... * this seems to be what they have settled on...
@@ -168,6 +169,13 @@ static int setlogfile(char **); @@ -182,6 +183,13 @@ static int setlogfile(char **);
static int loadplugin(char **); static int loadplugin(char **);
#endif #endif
+#ifdef PPP_PRECOMPILED_FILTER +#ifdef PPP_WITH_PRECOMPILED_FILTER
+#include "pcap_pcc.h" +#include "pcap_pcc.h"
+static int setprecompiledpassfilter(char **); +static int setprecompiledpassfilter(char **);
+static int setprecompiledactivefilter(char **); +static int setprecompiledactivefilter(char **);
+#undef PPP_FILTER +#undef PPP_WITH_FILTER
+#endif +#endif
+ +
#ifdef PPP_FILTER #ifdef PPP_WITH_FILTER
static int setpassfilter(char **); static int setpassfilter(char **);
static int setactivefilter(char **); static int setactivefilter(char **);
@@ -360,6 +368,14 @@ option_t general_options[] = { @@ -391,6 +399,14 @@ struct option general_options[] = {
"set filter for active pkts", OPT_PRIO }, "set filter for active pkts", OPT_PRIO },
#endif #endif
+#ifdef PPP_PRECOMPILED_FILTER +#ifdef PPP_WITH_PRECOMPILED_FILTER
+ { "precompiled-pass-filter", 1, setprecompiledpassfilter, + { "precompiled-pass-filter", 1, setprecompiledpassfilter,
+ "set precompiled filter for packets to pass", OPT_PRIO }, + "set precompiled filter for packets to pass", OPT_PRIO },
+ +
@@ -74,14 +82,14 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
+ "set precompiled filter for active pkts", OPT_PRIO }, + "set precompiled filter for active pkts", OPT_PRIO },
+#endif +#endif
+ +
#ifdef MAXOCTETS
{ "maxoctets", o_int, &maxoctets, { "maxoctets", o_int, &maxoctets,
"Set connection traffic limit", "Set connection traffic limit",
@@ -1468,6 +1484,27 @@ callfile(char **argv) OPT_PRIO | OPT_LLIMIT | OPT_NOINCR | OPT_ZEROINF },
@@ -1666,6 +1682,27 @@ callfile(char **argv)
return ok; return ok;
} }
+#ifdef PPP_PRECOMPILED_FILTER +#ifdef PPP_WITH_PRECOMPILED_FILTER
+/* +/*
+ * setprecompiledpassfilter - Set the pass filter for packets using a + * setprecompiledpassfilter - Set the pass filter for packets using a
+ * precompiled expression + * precompiled expression
@@ -102,18 +110,19 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
+} +}
+#endif +#endif
+ +
#ifdef PPP_FILTER #ifdef PPP_WITH_FILTER
/* /*
* setpassfilter - Set the pass filter for packets * setpassfilter - Set the pass filter for packets
--- /dev/null --- /dev/null
+++ b/pppd/pcap_pcc.c +++ b/pppd/pcap_pcc.c
@@ -0,0 +1,74 @@ @@ -0,0 +1,75 @@
+#include <pcap.h> +#include <pcap.h>
+#include <pcap-bpf.h> +#include <pcap-bpf.h>
+#include <stdio.h> +#include <stdio.h>
+#include <stdlib.h> +#include <stdlib.h>
+#include <string.h> +#include <string.h>
+#include <errno.h> +#include <errno.h>
+#include "options.h"
+#include "pppd.h" +#include "pppd.h"
+ +
+int pcap_pre_compiled (char * fname, struct bpf_program *p) +int pcap_pre_compiled (char * fname, struct bpf_program *p)
@@ -123,7 +132,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
+ FILE *f = fopen (fname, "r"); + FILE *f = fopen (fname, "r");
+ if (!f) + if (!f)
+ { + {
+ option_error("error opening precompiled active-filter '%s': %s", + ppp_option_error("error opening precompiled active-filter '%s': %s",
+ fname, strerror (errno)); + fname, strerror (errno));
+ return 0; + return 0;
+ } + }
@@ -167,18 +176,18 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
+ } + }
+ if (size != index) + if (size != index)
+ { + {
+ option_error("error in precompiled active-filter," + ppp_option_error("error in precompiled active-filter,"
+ " expected %d expressions, got %dn", + " expected %d expressions, got %dn",
+ size, index); + size, index);
+ ret = 0; + ret = 0;
+ } + }
+ fclose(f); + fclose(f);
+ return ret; + return ret;
+ +
+err: +err:
+ option_error("error in precompiled active-filter" + ppp_option_error("error in precompiled active-filter"
+ " expression line %s:%d (wrong size)\n", + " expression line %s:%d (wrong size)\n",
+ fname, line); + fname, line);
+ fclose (f); + fclose (f);
+ return 0; + return 0;
+} +}

View File

@@ -8,15 +8,15 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
2 files changed, 53 insertions(+), 14 deletions(-) 2 files changed, 53 insertions(+), 14 deletions(-)
--- a/pppd/multilink.c --- a/pppd/multilink.c
+++ b/pppd/multilink.c +++ b/pppd/multilink.c
@@ -35,6 +35,7 @@ @@ -36,6 +36,7 @@
#include <signal.h> #include <signal.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <unistd.h> #include <unistd.h>
+#include <net/if.h> +#include <net/if.h>
#include "pppd.h" #include "pppd-private.h"
#include "fsm.h" #include "fsm.h"
@@ -56,7 +57,8 @@ static void iterate_bundle_links(void (* @@ -58,7 +59,8 @@ static void iterate_bundle_links(void (*
static int get_default_epdisc(struct epdisc *); static int get_default_epdisc(struct epdisc *);
static int parse_num(char *str, const char *key, int *valp); static int parse_num(char *str, const char *key, int *valp);
@@ -26,7 +26,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
#define set_ip_epdisc(ep, addr) do { \ #define set_ip_epdisc(ep, addr) do { \
ep->length = 4; \ ep->length = 4; \
@@ -197,35 +199,38 @@ mp_join_bundle(void) @@ -211,35 +213,38 @@ mp_join_bundle(void)
key.dptr = bundle_id; key.dptr = bundle_id;
key.dsize = p - bundle_id; key.dsize = p - bundle_id;
pid = tdb_fetch(pppdb, key); pid = tdb_fetch(pppdb, key);
@@ -61,7 +61,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
- if (bundle_attach(unit)) { - if (bundle_attach(unit)) {
+ if (unit >= 0 && bundle_attach(unit)) { + if (unit >= 0 && bundle_attach(unit)) {
set_ifunit(0); set_ifunit(0);
script_setenv("BUNDLE", bundle_id + 7, 0); ppp_script_setenv("BUNDLE", bundle_id + 7, 0);
make_bundle_links(1); make_bundle_links(1);
unlock_db(); unlock_db();
- info("Link attached to %s", ifname); - info("Link attached to %s", ifname);
@@ -73,7 +73,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
} }
/* we have to make a new bundle */ /* we have to make a new bundle */
@@ -405,20 +410,39 @@ parse_num(char *str, const char *key, in @@ -419,20 +424,39 @@ parse_num(char *str, const char *key, in
return 0; return 0;
} }
@@ -119,7 +119,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
&& memcmp(vd.dptr, key.dptr, vd.dsize) == 0; && memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c +++ b/pppd/sys-linux.c
@@ -706,6 +706,16 @@ void cfg_bundle(int mrru, int mtru, int @@ -980,6 +980,16 @@ void cfg_bundle(int mrru, int mtru, int
add_fd(ppp_dev_fd); add_fd(ppp_dev_fd);
} }
@@ -129,14 +129,14 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
+#ifdef USE_TDB +#ifdef USE_TDB
+ char tmp[11]; + char tmp[11];
+ slprintf(tmp, sizeof(tmp), "%d", ifunit); + slprintf(tmp, sizeof(tmp), "%d", ifunit);
+ script_setenv("IFUNIT", tmp, 0); + ppp_script_setenv("IFUNIT", tmp, 0);
+#endif +#endif
+} +}
+ +
/* /*
* make_new_bundle - create a new PPP unit (i.e. a bundle) * make_new_bundle - create a new PPP unit (i.e. a bundle)
* and connect our channel to it. This should only get called * and connect our channel to it. This should only get called
@@ -724,6 +734,8 @@ void make_new_bundle(int mrru, int mtru, @@ -998,6 +1008,8 @@ void make_new_bundle(int mrru, int mtru,
/* set the mrru and flags */ /* set the mrru and flags */
cfg_bundle(mrru, mtru, rssn, tssn); cfg_bundle(mrru, mtru, rssn, tssn);

View File

@@ -1,22 +0,0 @@
pppd: Retain foreign default routes on Linux
On Linux, when pppd attempts to delete its default route it does not fill
the rt_dev field of the struct rtentry used to match the system default route.
As a consequence, pppd happily deletes any default route even if it belongs
to another interface.
This patch makes pppd fill out the rt_dev field so that only own default
routes are ever matched.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -1770,6 +1770,7 @@ int cifdefaultroute (int unit, u_int32_t
SIN_ADDR(rt.rt_genmask) = 0L;
}
+ rt.rt_dev = ifname;
rt.rt_flags = RTF_UP;
if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
if (still_ppp()) {

View File

@@ -13,7 +13,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c +++ b/pppd/sys-linux.c
@@ -1720,6 +1720,9 @@ int sifdefaultroute (int unit, u_int32_t @@ -2247,6 +2247,9 @@ int sifdefaultroute (int unit, u_int32_t
memset (&rt, 0, sizeof (rt)); memset (&rt, 0, sizeof (rt));
SET_SA_FAMILY (rt.rt_dst, AF_INET); SET_SA_FAMILY (rt.rt_dst, AF_INET);
@@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
rt.rt_dev = ifname; rt.rt_dev = ifname;
rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */ rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
@@ -1728,7 +1731,7 @@ int sifdefaultroute (int unit, u_int32_t @@ -2255,7 +2258,7 @@ int sifdefaultroute (int unit, u_int32_t
SIN_ADDR(rt.rt_genmask) = 0L; SIN_ADDR(rt.rt_genmask) = 0L;
} }

View File

@@ -10,7 +10,14 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c +++ b/pppd/sys-linux.c
@@ -206,7 +206,7 @@ static int driver_is_old = 0; @@ -220,14 +220,10 @@ static fd_set in_fds; /* set of fds tha
static int max_in_fd; /* highest fd set in in_fds */
static int has_proxy_arp = 0;
-static int driver_version = 0;
-static int driver_modification = 0;
-static int driver_patch = 0;
-static int driver_is_old = 0;
static int restore_term = 0; /* 1 => we've munged the terminal */ static int restore_term = 0; /* 1 => we've munged the terminal */
static struct termios inittermios; /* Initial TTY termios */ static struct termios inittermios; /* Initial TTY termios */
@@ -19,17 +26,18 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
static char loop_name[20]; static char loop_name[20];
static unsigned char inbuf[512]; /* buffer for chars read from loopback */ static unsigned char inbuf[512]; /* buffer for chars read from loopback */
@@ -225,8 +225,8 @@ static int looped; /* 1 if using loop @@ -245,9 +241,8 @@ static int dynaddr_set; /* 1 if ip_dyna
static int looped; /* 1 if using loop */
static int link_mtu; /* mtu for the link (not bundle) */ static int link_mtu; /* mtu for the link (not bundle) */
static struct utsname utsname; /* for the kernel version */ -static struct utsname utsname; /* for the kernel version */
-static int kernel_version; -static int kernel_version;
#define KVERSION(j,n,p) ((j)*1000000 + (n)*1000 + (p)) #define KVERSION(j,n,p) ((j)*1000000 + (n)*1000 + (p))
+static const int kernel_version = KVERSION(2,6,37); +static const int kernel_version = KVERSION(4,9,0);
#define MAX_IFS 100 #define MAX_IFS 100
@@ -1455,11 +1455,12 @@ int ccp_fatal_error (int unit) @@ -1966,11 +1961,12 @@ int ccp_fatal_error (int unit)
* *
* path_to_procfs - find the path to the proc file system mount point * path_to_procfs - find the path to the proc file system mount point
*/ */
@@ -44,7 +52,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
struct mntent *mntent; struct mntent *mntent;
FILE *fp; FILE *fp;
@@ -1481,6 +1482,7 @@ static char *path_to_procfs(const char * @@ -1992,6 +1988,7 @@ static char *path_to_procfs(const char *
fclose (fp); fclose (fp);
} }
} }
@@ -52,35 +60,24 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
strlcpy(proc_path + proc_path_len, tail, strlcpy(proc_path + proc_path_len, tail,
sizeof(proc_path) - proc_path_len); sizeof(proc_path) - proc_path_len);
@@ -2365,15 +2367,19 @@ int ppp_available(void) @@ -2883,6 +2880,8 @@ ppp_registered(void)
int my_version, my_modification, my_patch;
int osmaj, osmin, ospatch;
int ppp_check_kernel_support(void)
{
+ return 1; /* OpenWrt support ppp device "/dev/ppp" by default */
+#if 0 +#if 0
/* get the kernel version now, since we are called before sys_init */ int s, ok, fd;
uname(&utsname); struct ifreq ifr;
osmaj = osmin = ospatch = 0; int size;
sscanf(utsname.release, "%d.%d.%d", &osmaj, &osmin, &ospatch); @@ -3010,6 +3009,7 @@ int ppp_check_kernel_support(void)
kernel_version = KVERSION(osmaj, osmin, ospatch); }
close(s);
return ok;
+#endif +#endif
}
fd = open("/dev/ppp", O_RDWR); #ifndef HAVE_LOGWTMP
if (fd >= 0) { @@ -3571,6 +3571,7 @@ get_pty(int *master_fdp, int *slave_fdp,
+#if 0
new_style_driver = 1;
+#endif
/* XXX should get from driver */
driver_version = 2;
@@ -2433,6 +2439,7 @@ int ppp_available(void)
if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
ok = 0;
+ return ok;
/*
* This is the PPP device. Validate the version of the driver at this
@@ -3106,6 +3113,7 @@ get_pty(int *master_fdp, int *slave_fdp,
} }
#endif /* TIOCGPTN */ #endif /* TIOCGPTN */
@@ -88,7 +85,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (sfd < 0) { if (sfd < 0) {
/* the old way - scan through the pty name space */ /* the old way - scan through the pty name space */
for (i = 0; i < 64; ++i) { for (i = 0; i < 64; ++i) {
@@ -3124,6 +3132,7 @@ get_pty(int *master_fdp, int *slave_fdp, @@ -3595,6 +3596,7 @@ get_pty(int *master_fdp, int *slave_fdp,
} }
} }
} }
@@ -96,28 +93,40 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (sfd < 0) if (sfd < 0)
return 0; return 0;
--- a/pppd/plugins/pppoatm/pppoatm.c @@ -3710,6 +3712,7 @@ get_host_seed(void)
+++ b/pppd/plugins/pppoatm/pppoatm.c int
@@ -171,14 +171,6 @@ static void disconnect_pppoatm(void) sys_check_options(void)
void plugin_init(void)
{ {
-#ifdef linux +#if 0
- extern int new_style_driver; /* From sys-linux.c */ if (demand && driver_is_old) {
- if (!ppp_available() && !new_style_driver) ppp_option_error("demand dialling is not supported by kernel driver "
- fatal("Kernel doesn't support ppp_generic - " "version %d.%d.%d", driver_version, driver_modification,
- "needed for PPPoATM"); @@ -3720,6 +3723,7 @@ sys_check_options(void)
-#else warn("Warning: multilink is not supported by the kernel driver");
- fatal("No PPPoATM support on this OS"); multilink = 0;
-#endif }
add_options(pppoa_options); +#endif
return 1;
} }
--- a/pppd/plugins/pppoatm/pppoatm.c
+++ b/pppd/plugins/pppoatm/pppoatm.c
@@ -180,10 +180,6 @@ static void disconnect_pppoatm(void)
void plugin_init(void)
{
#ifdef linux
- extern int new_style_driver; /* From sys-linux.c */
- if (!ppp_check_kernel_support() && !new_style_driver)
- fatal("Kernel doesn't support ppp_generic - "
- "needed for PPPoATM");
#else
fatal("No PPPoATM support on this OS");
#endif
--- a/pppd/plugins/pppoe/plugin.c --- a/pppd/plugins/pppoe/plugin.c
+++ b/pppd/plugins/pppoe/plugin.c +++ b/pppd/plugins/pppoe/plugin.c
@@ -58,9 +58,6 @@ static char const RCSID[] = @@ -54,9 +54,6 @@
char pppd_version[] = VERSION; char pppd_version[] = PPPD_VERSION;
-/* From sys-linux.c in pppd -- MUST FIX THIS! */ -/* From sys-linux.c in pppd -- MUST FIX THIS! */
-extern int new_style_driver; -extern int new_style_driver;
@@ -125,30 +134,27 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
char *pppd_pppoe_service = NULL; char *pppd_pppoe_service = NULL;
static char *acName = NULL; static char *acName = NULL;
static char *existingSession = NULL; static char *existingSession = NULL;
@@ -407,10 +404,6 @@ PPPoEDevnameHook(char *cmd, char **argv, @@ -418,10 +415,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
void void
plugin_init(void) plugin_init(void)
{ {
- if (!ppp_available() && !new_style_driver) { - if (!ppp_check_kernel_support() && !new_style_driver) {
- fatal("Linux kernel does not support PPPoE -- are you running 2.4.x?"); - fatal("Linux kernel does not support PPPoE -- are you running 2.4.x?");
- } - }
- -
add_options(Options); ppp_add_options(Options);
info("PPPoE plugin from pppd %s", VERSION); info("PPPoE plugin from pppd %s", PPPD_VERSION);
--- a/pppd/plugins/pppol2tp/pppol2tp.c --- a/pppd/plugins/pppol2tp/pppol2tp.c
+++ b/pppd/plugins/pppol2tp/pppol2tp.c +++ b/pppd/plugins/pppol2tp/pppol2tp.c
@@ -490,12 +490,7 @@ static void pppol2tp_cleanup(void) @@ -501,10 +501,6 @@ static void pppol2tp_cleanup(void)
void plugin_init(void) void plugin_init(void)
{ {
-#if defined(__linux__) #if defined(__linux__)
- extern int new_style_driver; /* From sys-linux.c */ - extern int new_style_driver; /* From sys-linux.c */
- if (!ppp_available() && !new_style_driver) - if (!ppp_check_kernel_support() && !new_style_driver)
- fatal("Kernel doesn't support ppp_generic - " - fatal("Kernel doesn't support ppp_generic - "
- "needed for PPPoL2TP"); - "needed for PPPoL2TP");
-#else #else
+#if !defined(__linux__)
fatal("No PPPoL2TP support on this OS"); fatal("No PPPoL2TP support on this OS");
#endif #endif
add_options(pppol2tp_options);

View File

@@ -5,19 +5,19 @@ information to the permanent storage, therfore remove this option.
Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/pppd.h --- a/pppd/pppd-private.h
+++ b/pppd/pppd.h +++ b/pppd/pppd-private.h
@@ -317,7 +317,6 @@ extern int holdoff; /* Dead time before @@ -189,7 +189,6 @@ extern int holdoff; /* Dead time before
extern bool holdoff_specified; /* true if user gave a holdoff value */ extern bool holdoff_specified; /* true if user gave a holdoff value */
extern bool notty; /* Stdin/out is not a tty */ extern bool notty; /* Stdin/out is not a tty */
extern char *pty_socket; /* Socket to connect to pty */ extern char *pty_socket; /* Socket to connect to pty */
-extern char *record_file; /* File to record chars sent/received */ -extern char *record_file; /* File to record chars sent/received */
extern bool sync_serial; /* Device is synchronous serial device */
extern int maxfail; /* Max # of unsuccessful connection attempts */ extern int maxfail; /* Max # of unsuccessful connection attempts */
extern char linkname[MAXPATHLEN]; /* logical name for link */ extern char linkname[]; /* logical name for link */
extern bool tune_kernel; /* May alter kernel settings as necessary */
--- a/pppd/tty.c --- a/pppd/tty.c
+++ b/pppd/tty.c +++ b/pppd/tty.c
@@ -143,7 +143,7 @@ char *disconnect_script = NULL; /* Scrip @@ -146,7 +146,7 @@ char *disconnect_script = NULL; /* Scrip
char *welcomer = NULL; /* Script to run after phys link estab. */ char *welcomer = NULL; /* Script to run after phys link estab. */
char *ptycommand = NULL; /* Command to run on other side of pty */ char *ptycommand = NULL; /* Command to run on other side of pty */
bool notty = 0; /* Stdin/out is not a tty */ bool notty = 0; /* Stdin/out is not a tty */
@@ -26,7 +26,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
int max_data_rate; /* max bytes/sec through charshunt */ int max_data_rate; /* max bytes/sec through charshunt */
bool sync_serial = 0; /* Device is synchronous serial device */ bool sync_serial = 0; /* Device is synchronous serial device */
char *pty_socket = NULL; /* Socket to connect to pty */ char *pty_socket = NULL; /* Socket to connect to pty */
@@ -199,8 +199,10 @@ option_t tty_options[] = { @@ -202,8 +202,10 @@ static struct option tty_options[] = {
"Send and receive over socket, arg is host:port", "Send and receive over socket, arg is host:port",
OPT_PRIO | OPT_DEVNAM }, OPT_PRIO | OPT_DEVNAM },

View File

@@ -1,25 +0,0 @@
pppd: Disable wtmp support
Many uClibc based environments lack wtmp and utmp support, therfore remove
the code updating the wtmp information.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -2503,6 +2503,7 @@ int ppp_available(void)
void logwtmp (const char *line, const char *name, const char *host)
{
+#if 0
struct utmp ut, *utp;
pid_t mypid = getpid();
#if __GLIBC__ < 2
@@ -2568,6 +2569,7 @@ void logwtmp (const char *line, const ch
close (wtmp);
}
#endif
+#endif
}
#endif /* HAVE_LOGWTMP */

View File

@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/main.c --- a/pppd/main.c
+++ b/pppd/main.c +++ b/pppd/main.c
@@ -866,14 +866,17 @@ struct protocol_list { @@ -982,14 +982,17 @@ struct protocol_list {
const char *name; const char *name;
} protocol_list[] = { } protocol_list[] = {
{ 0x21, "IP" }, { 0x21, "IP" },
@@ -25,7 +25,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x33, "Stream Protocol ST-II" }, { 0x33, "Stream Protocol ST-II" },
{ 0x35, "Banyan Vines" }, { 0x35, "Banyan Vines" },
{ 0x39, "AppleTalk EDDP" }, { 0x39, "AppleTalk EDDP" },
@@ -887,8 +890,11 @@ struct protocol_list { @@ -1003,8 +1006,11 @@ struct protocol_list {
{ 0x49, "Serial Data Transport Protocol (PPP-SDTP)" }, { 0x49, "Serial Data Transport Protocol (PPP-SDTP)" },
{ 0x4b, "SNA over 802.2" }, { 0x4b, "SNA over 802.2" },
{ 0x4d, "SNA" }, { 0x4d, "SNA" },
@@ -37,7 +37,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x53, "Encryption" }, { 0x53, "Encryption" },
{ 0x55, "Individual Link Encryption" }, { 0x55, "Individual Link Encryption" },
{ 0x57, "IPv6" }, { 0x57, "IPv6" },
@@ -899,12 +905,15 @@ struct protocol_list { @@ -1015,12 +1021,15 @@ struct protocol_list {
{ 0x65, "RTP IPHC Compressed non-TCP" }, { 0x65, "RTP IPHC Compressed non-TCP" },
{ 0x67, "RTP IPHC Compressed UDP 8" }, { 0x67, "RTP IPHC Compressed UDP 8" },
{ 0x69, "RTP IPHC Compressed RTP 8" }, { 0x69, "RTP IPHC Compressed RTP 8" },
@@ -53,7 +53,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x0203, "IBM Source Routing BPDU" }, { 0x0203, "IBM Source Routing BPDU" },
{ 0x0205, "DEC LANBridge100 Spanning Tree" }, { 0x0205, "DEC LANBridge100 Spanning Tree" },
{ 0x0207, "Cisco Discovery Protocol" }, { 0x0207, "Cisco Discovery Protocol" },
@@ -916,15 +925,19 @@ struct protocol_list { @@ -1032,15 +1041,19 @@ struct protocol_list {
{ 0x0231, "Luxcom" }, { 0x0231, "Luxcom" },
{ 0x0233, "Sigma Network Systems" }, { 0x0233, "Sigma Network Systems" },
{ 0x0235, "Apple Client Server Protocol" }, { 0x0235, "Apple Client Server Protocol" },
@@ -73,7 +73,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x4001, "Cray Communications Control Protocol" }, { 0x4001, "Cray Communications Control Protocol" },
{ 0x4003, "CDPD Mobile Network Registration Protocol" }, { 0x4003, "CDPD Mobile Network Registration Protocol" },
{ 0x4005, "Expand accelerator protocol" }, { 0x4005, "Expand accelerator protocol" },
@@ -935,8 +948,10 @@ struct protocol_list { @@ -1051,8 +1064,10 @@ struct protocol_list {
{ 0x4023, "RefTek Protocol" }, { 0x4023, "RefTek Protocol" },
{ 0x4025, "Fibre Channel" }, { 0x4025, "Fibre Channel" },
{ 0x4027, "EMIT Protocols" }, { 0x4027, "EMIT Protocols" },
@@ -84,7 +84,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x8023, "OSI Network Layer Control Protocol" }, { 0x8023, "OSI Network Layer Control Protocol" },
{ 0x8025, "Xerox NS IDP Control Protocol" }, { 0x8025, "Xerox NS IDP Control Protocol" },
{ 0x8027, "DECnet Phase IV Control Protocol" }, { 0x8027, "DECnet Phase IV Control Protocol" },
@@ -945,7 +960,9 @@ struct protocol_list { @@ -1061,7 +1076,9 @@ struct protocol_list {
{ 0x8031, "Bridging NCP" }, { 0x8031, "Bridging NCP" },
{ 0x8033, "Stream Protocol Control Protocol" }, { 0x8033, "Stream Protocol Control Protocol" },
{ 0x8035, "Banyan Vines Control Protocol" }, { 0x8035, "Banyan Vines Control Protocol" },
@@ -94,7 +94,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x803f, "NETBIOS Framing Control Protocol" }, { 0x803f, "NETBIOS Framing Control Protocol" },
{ 0x8041, "Cisco Systems Control Protocol" }, { 0x8041, "Cisco Systems Control Protocol" },
{ 0x8043, "Ascom Timeplex" }, { 0x8043, "Ascom Timeplex" },
@@ -954,18 +971,24 @@ struct protocol_list { @@ -1070,18 +1087,24 @@ struct protocol_list {
{ 0x8049, "Serial Data Control Protocol (PPP-SDCP)" }, { 0x8049, "Serial Data Control Protocol (PPP-SDCP)" },
{ 0x804b, "SNA over 802.2 Control Protocol" }, { 0x804b, "SNA over 802.2 Control Protocol" },
{ 0x804d, "SNA Control Protocol" }, { 0x804d, "SNA Control Protocol" },
@@ -119,7 +119,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x8207, "Cisco Discovery Protocol Control" }, { 0x8207, "Cisco Discovery Protocol Control" },
{ 0x8209, "Netcs Twin Routing" }, { 0x8209, "Netcs Twin Routing" },
{ 0x820b, "STP - Control Protocol" }, { 0x820b, "STP - Control Protocol" },
@@ -974,24 +997,29 @@ struct protocol_list { @@ -1090,24 +1113,29 @@ struct protocol_list {
{ 0x8281, "MPLSCP" }, { 0x8281, "MPLSCP" },
{ 0x8285, "IEEE p1284.4 standard - Protocol Control" }, { 0x8285, "IEEE p1284.4 standard - Protocol Control" },
{ 0x8287, "ETSI TETRA TNP1 Control Protocol" }, { 0x8287, "ETSI TETRA TNP1 Control Protocol" },

View File

@@ -9,7 +9,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/options.c --- a/pppd/options.c
+++ b/pppd/options.c +++ b/pppd/options.c
@@ -348,13 +348,14 @@ option_t general_options[] = { @@ -379,13 +379,14 @@ struct option general_options[] = {
"Enable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 1 }, "Enable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 1 },
{ "nomultilink", o_bool, &multilink, { "nomultilink", o_bool, &multilink,
"Disable multilink operation", OPT_PRIOSUB | 0 }, "Disable multilink operation", OPT_PRIOSUB | 0 },
@@ -18,11 +18,11 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ "bundle", o_string, &bundle_name, { "bundle", o_string, &bundle_name,
"Bundle name for multilink", OPT_PRIO }, "Bundle name for multilink", OPT_PRIO },
#endif /* HAVE_MULTILINK */ #endif /* PPP_WITH_MULTILINK */
+ { "nomp", o_bool, &multilink, + { "nomp", o_bool, &multilink,
+ "Disable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 0 }, + "Disable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 0 },
+ +
#ifdef PLUGIN #ifdef PPP_WITH_PLUGINS
{ "plugin", o_special, (void *)loadplugin, { "plugin", o_special, (void *)loadplugin,
"Load a plug-in module into pppd", OPT_PRIV | OPT_A2LIST }, "Load a plug-in module into pppd", OPT_PRIV | OPT_A2LIST },

View File

@@ -1,59 +1,43 @@
--- a/configure --- a/configure.ac
+++ b/configure +++ b/configure.ac
@@ -133,7 +133,7 @@ if [ -d "$ksrc" ]; then @@ -333,6 +333,7 @@ AC_CONFIG_FILES([
mkmkf $ksrc/Makedefs$compiletype Makedefs.com pppd/plugins/pppoatm/Makefile
for dir in pppd pppstats chat pppdump pppd/plugins pppd/plugins/pppoe \ pppd/plugins/pppol2tp/Makefile
pppd/plugins/radius pppd/plugins/pppoatm \ pppd/plugins/radius/Makefile
- pppd/plugins/pppol2tp; do + pppd/plugins/pptp/Makefile
+ pppd/plugins/pppol2tp pppd/plugins/pptp ; do pppdump/Makefile
mkmkf $dir/Makefile.$makext $dir/Makefile pppstats/Makefile
done scripts/Makefile
if [ -f $ksrc/Makefile.$makext$archvariant ]; then --- a/pppd/plugins/Makefile.am
--- a/pppd/plugins/Makefile.linux +++ b/pppd/plugins/Makefile.am
+++ b/pppd/plugins/Makefile.linux @@ -17,5 +17,5 @@ winbind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
@@ -14,7 +14,7 @@ INSTALL = install winbind_la_SOURCES = winbind.c
# EAP-TLS
CFLAGS += -DUSE_EAPTLS=1
-SUBDIRS := pppoe pppoatm pppol2tp if !SUNOS
+SUBDIRS := pppoe pppoatm pppol2tp pptp -SUBDIRS = pppoe pppoatm pppol2tp radius
# Uncomment the next line to include the radius authentication plugin +SUBDIRS = pppoe pppoatm pppol2tp radius pptp
SUBDIRS += radius endif
PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so
--- /dev/null --- /dev/null
+++ b/pppd/plugins/pptp/Makefile.linux +++ b/pppd/plugins/pptp/Makefile.am
@@ -0,0 +1,31 @@ @@ -0,0 +1,18 @@
+# +pppd_plugin_LTLIBRARIES = pptp.la
+# This program may be distributed according to the terms of the GNU +pppd_plugindir = $(PPPD_PLUGIN_DIR)
+# General Public License, version 2 or (at your option) any later version.
+#
+# $Id: Makefile.linux,v 1.9 2012/05/04 21:48:00 dgolle Exp $
+#***********************************************************************
+ +
+DESTDIR = $(INSTROOT)@DESTDIR@ +noinst_HEADERS = \
+LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION) + dirutil.h \
+ + orckit_quirks.h \
+PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) + pptp_callmgr.h \
+ + pptp_ctrl.h \
+INSTALL = install + pptp_msg.h \
+ + pptp_options.h \
+COPTS=-O2 -g + pptp_quirks.h \
+CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC -DPPPD_VERSION=\"$(PPPDVERSION)\" + util.h \
+all: pptp.so + vector.h
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+pptp.so: dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o
+ $(CC) -o pptp.so -shared dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o
+
+install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+ $(INSTALL) -c -m 4550 pptp.so $(LIBDIR)
+
+clean:
+ rm -f *.o *.so
+ +
+pptp_la_CPPFLAGS = -I${top_srcdir} -DSYSCONFDIR=\"${sysconfdir}\" -DPLUGIN
+pptp_la_LDFLAGS = -fPIC -module -avoid-version
+pptp_la_SOURCES = dirutil.c orckit_quirks.c pptp.c pptp_callmgr.c pptp_ctrl.c \
+ pptp_quirks.c util.c vector.c
--- /dev/null --- /dev/null
+++ b/pppd/plugins/pptp/dirutil.c +++ b/pppd/plugins/pptp/dirutil.c
@@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
@@ -334,7 +318,7 @@
+xeb xeb@mail.ru +xeb xeb@mail.ru
--- /dev/null --- /dev/null
+++ b/pppd/plugins/pptp/pptp.c +++ b/pppd/plugins/pptp/pptp.c
@@ -0,0 +1,323 @@ @@ -0,0 +1,325 @@
+/*************************************************************************** +/***************************************************************************
+ * Copyright (C) 2006 by Kozlov D. <xeb@mail.ru> * + * Copyright (C) 2006 by Kozlov D. <xeb@mail.ru> *
+ * some cleanup done (C) 2012 by Daniel Golle <dgolle@allnet.de> * + * some cleanup done (C) 2012 by Daniel Golle <dgolle@allnet.de> *
@@ -377,6 +361,8 @@
+#include <sys/ioctl.h> +#include <sys/ioctl.h>
+ +
+#include "pppd.h" +#include "pppd.h"
+#include "pppd-private.h"
+#include "options.h"
+#include "fsm.h" +#include "fsm.h"
+#include "lcp.h" +#include "lcp.h"
+#include "ipcp.h" +#include "ipcp.h"
@@ -385,7 +371,7 @@
+ +
+#include "pptp_callmgr.h" +#include "pptp_callmgr.h"
+#include <net/if.h> +#include <net/if.h>
+#include <net/ethernet.h> +#include <linux/if_ether.h>
+#include <linux/if_pppox.h> +#include <linux/if_pppox.h>
+ +
+#include <stdio.h> +#include <stdio.h>
@@ -437,8 +423,8 @@
+ check_options: NULL, + check_options: NULL,
+ connect: &pptp_connect, + connect: &pptp_connect,
+ disconnect: &pptp_disconnect, + disconnect: &pptp_disconnect,
+ establish_ppp: &generic_establish_ppp, + establish_ppp: &ppp_generic_establish,
+ disestablish_ppp: &generic_disestablish_ppp, + disestablish_ppp: &ppp_generic_disestablish,
+ close: NULL, + close: NULL,
+ cleanup: NULL + cleanup: NULL
+}; +};
@@ -446,7 +432,7 @@
+static int pptp_start_server(void) +static int pptp_start_server(void)
+{ +{
+ pptp_fd=pptp_sock; + pptp_fd=pptp_sock;
+ sprintf(ppp_devnam,"pptp (%s)",pptp_client); + sprintf(ppp_devname,"pptp (%s)",pptp_client);
+ +
+ return pptp_fd; + return pptp_fd;
+} +}
@@ -527,7 +513,7 @@
+ return -1; + return -1;
+ } + }
+ +
+ sprintf(ppp_devnam,"pptp (%s)",pptp_server); + sprintf(ppp_devname,"pptp (%s)",pptp_server);
+ +
+ return pptp_fd; + return pptp_fd;
+} +}
@@ -651,7 +637,7 @@
+ +
+void plugin_init(void) +void plugin_init(void)
+{ +{
+ add_options(Options); + ppp_add_options(Options);
+ +
+ info("PPTP plugin version %s", PPTP_VERSION); + info("PPTP plugin version %s", PPTP_VERSION);
+ +

View File

@@ -1,11 +0,0 @@
--- a/pppd/plugins/pptp/pptp.c
+++ b/pppd/plugins/pptp/pptp.c
@@ -48,7 +48,7 @@
#include "pptp_callmgr.h"
#include <net/if.h>
-#include <net/ethernet.h>
+#include <linux/if_ether.h>
#include <linux/if_pppox.h>
#include <stdio.h>

View File

@@ -1,11 +0,0 @@
--- a/pppd/plugins/pptp/Makefile.linux
+++ b/pppd/plugins/pptp/Makefile.linux
@@ -20,7 +20,7 @@ all: pptp.so
$(CC) $(CFLAGS) -c -o $@ $<
pptp.so: dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o
- $(CC) -o pptp.so -shared dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o
+ $(CC) -fPIC -o pptp.so -shared dirutil.o orckit_quirks.o pptp.o pptp_callmgr.o pptp_ctrl.o pptp_quirks.o util.o vector.o
install: all
$(INSTALL) -d -m 755 $(LIBDIR)

View File

@@ -1,15 +1,16 @@
--- a/pppd/chap-new.c --- a/pppd/chap.c
+++ b/pppd/chap-new.c +++ b/pppd/chap.c
@@ -37,6 +37,8 @@ @@ -42,6 +42,9 @@
#include "chap-new.h" #include "chap.h"
#include "chap-md5.h" #include "chap-md5.h"
+#include <semaphore.h>
+#include "syncppp.h" +#include "syncppp.h"
+ +
#ifdef CHAPMS #ifdef PPP_WITH_CHAPMS
#include "chap_ms.h" #include "chap_ms.h"
#define MDTYPE_ALL (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5) #define MDTYPE_ALL (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5)
@@ -523,6 +525,18 @@ chap_respond(struct chap_client_state *cs, int id, @@ -520,6 +523,18 @@ chap_respond(struct chap_client_state *c
p[2] = len >> 8; p[2] = len >> 8;
p[3] = len; p[3] = len;
@@ -28,40 +29,36 @@
output(0, response, PPP_HDRLEN + len); output(0, response, PPP_HDRLEN + len);
} }
--- a/pppd/Makefile.linux --- a/pppd/Makefile.am
+++ b/pppd/Makefile.linux +++ b/pppd/Makefile.am
@@ -17,16 +17,16 @@ TARGETS = pppd @@ -67,6 +67,7 @@ noinst_HEADERS = \
peap.h \
pppd-private.h \
spinlock.h \
+ syncppp.h \
tls.h \
tdb.h
PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap-new.c md5.c ccp.c \ @@ -85,6 +86,7 @@ pppd_SOURCES = \
ecp.c ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c \ main.c \
- demand.c utils.c tty.c eap.c chap-md5.c session.c options.c \
+ demand.c utils.c tty.c eap.c chap-md5.c session.c syncppp.c session.c \
+ syncppp.c \
tty.c \
upap.c \
utils.c
@@ -95,7 +97,7 @@ BUILT_SOURCE = \
HEADERS = ccp.h session.h chap-new.h ecp.h fsm.h ipcp.h \ pppd_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DPPPD_RUNTIME_DIR='"@PPPD_RUNTIME_DIR@"' -DPPPD_LOGFILE_DIR='"@PPPD_LOGFILE_DIR@"'
ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \ pppd_LDFLAGS =
- upap.h eap.h -pppd_LIBS =
+ upap.h eap.h syncppp.h +pppd_LIBS = -lpthread
MANPAGES = pppd.8 if PPP_WITH_SYSTEM_CA_PATH
PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o \ pppd_CPPFLAGS += -DSYSTEM_CA_PATH='"@SYSTEM_CA_PATH@"'
ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o \
- eap.o chap-md5.o session.o
+ eap.o chap-md5.o session.o syncppp.o
#
# include dependencies if present
@@ -34,7 +34,7 @@ ifeq (.depend,$(wildcard .depend))
include .depend
endif
-LIBS = -lrt
+LIBS = -lpthread
# Uncomment the next line to include support for Microsoft's
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
--- a/pppd/options.c --- a/pppd/options.c
+++ b/pppd/options.c +++ b/pppd/options.c
@@ -127,6 +127,7 @@ bool dump_options; /* print out option values */ @@ -136,6 +136,7 @@ bool show_options; /* print all support
bool dryrun; /* print out option values and exit */ bool dryrun; /* print out option values and exit */
char *domain; /* domain name set by domain option */ char *domain; /* domain name set by domain option */
int child_wait = 5; /* # seconds to wait for children at exit */ int child_wait = 5; /* # seconds to wait for children at exit */
@@ -69,7 +66,7 @@
struct userenv *userenv_list; /* user environment variables */ struct userenv *userenv_list; /* user environment variables */
int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */ int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */
@@ -323,6 +324,9 @@ option_t general_options[] = { @@ -339,6 +340,9 @@ struct option general_options[] = {
"Unset user environment variable", "Unset user environment variable",
OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint }, OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint },
@@ -79,16 +76,16 @@
{ "defaultroute-metric", o_int, &dfl_route_metric, { "defaultroute-metric", o_int, &dfl_route_metric,
"Metric to use for the default route (Linux only; -1 for default behavior)", "Metric to use for the default route (Linux only; -1 for default behavior)",
OPT_PRIV|OPT_LLIMIT|OPT_INITONLY, NULL, 0, -1 }, OPT_PRIV|OPT_LLIMIT|OPT_INITONLY, NULL, 0, -1 },
--- a/pppd/pppd.h --- a/pppd/pppd-private.h
+++ b/pppd/pppd.h +++ b/pppd/pppd-private.h
@@ -335,6 +335,7 @@ extern char *bundle_name; /* bundle name for multilink */ @@ -207,6 +207,7 @@ extern bool dump_options; /* print out o
extern bool dump_options; /* print out option values */ extern bool show_options; /* show all option names and descriptions */
extern bool dryrun; /* check everything, print options, exit */ extern bool dryrun; /* check everything, print options, exit */
extern int child_wait; /* # seconds to wait for children at end */ extern int child_wait; /* # seconds to wait for children at end */
+extern int npppd; /* synchronize between multiple pppd */ +extern int npppd; /* synchronize between multiple pppd */
extern char *current_option; /* the name of the option being parsed */
#ifdef USE_EAPTLS extern int privileged_option; /* set iff the current option came from root */
extern char *crl_dir; extern char *option_source; /* string saying where the option came from */
--- /dev/null --- /dev/null
+++ b/pppd/syncppp.c +++ b/pppd/syncppp.c
@@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
@@ -98,14 +95,14 @@
+#include<stdlib.h> +#include<stdlib.h>
+#include<time.h> +#include<time.h>
+#include<errno.h> +#include<errno.h>
+#include "pppd.h" +#include "pppd-private.h"
+#include "syncppp.h" +#include "syncppp.h"
+ +
+int syncppp(int nproc) +int syncppp(int nproc)
+{ +{
+ int flags; + int flags;
+ int value; + int value;
+ sem_t *block; + sem_t *block;
+ sem_t *count; + sem_t *count;
+ struct timespec ts; + struct timespec ts;
+ +
@@ -169,21 +166,23 @@
+ +
--- /dev/null --- /dev/null
+++ b/pppd/syncppp.h +++ b/pppd/syncppp.h
@@ -0,0 +1,3 @@ @@ -0,0 +1,4 @@
+#define SEM_BLOCK_NAME "block" +#define SEM_BLOCK_NAME "block"
+#define SEM_COUNT_NAME "count" +#define SEM_COUNT_NAME "count"
+#define SYNCPPP_TIMEOUT 5 +#define SYNCPPP_TIMEOUT 5
+extern int syncppp(int nproc);
--- a/pppd/upap.c --- a/pppd/upap.c
+++ b/pppd/upap.c +++ b/pppd/upap.c
@@ -50,6 +50,7 @@ @@ -55,6 +55,8 @@
#include "pppd.h" #include "options.h"
#include "upap.h" #include "upap.h"
+#include <semaphore.h>
+#include "syncppp.h" +#include "syncppp.h"
static bool hide_password = 1; static bool hide_password = 1;
@@ -540,6 +541,18 @@ upap_sauthreq(upap_state *u) @@ -545,6 +547,18 @@ upap_sauthreq(upap_state *u)
PUTCHAR(u->us_passwdlen, outp); PUTCHAR(u->us_passwdlen, outp);
BCOPY(u->us_passwd, outp, u->us_passwdlen); BCOPY(u->us_passwd, outp, u->us_passwdlen);

View File

@@ -1,89 +0,0 @@
From 831dca008699d485f2c8e91749657ef2d0b06166 Mon Sep 17 00:00:00 2001
From: Martin Schiller <ms@dev.tdt.de>
Date: Thu, 6 Dec 2018 08:43:17 +0100
Subject: [PATCH] Revert "pppd: Use openssl for the DES instead of the libcrypt
/ glibc"
For musl and glibc2.27 we can keep linking to crypt; however if we
switch to glibc 2.28 we will have to link to one of the SSL libraries.
This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875.
---
pppd/Makefile.linux | 7 +++----
pppd/pppcrypt.c | 18 +++++++++---------
2 files changed, 12 insertions(+), 13 deletions(-)
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -36,10 +36,10 @@ endif
LIBS = -lpthread
-# Uncomment the next line to include support for Microsoft's
+# Uncomment the next 2 lines to include support for Microsoft's
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
CHAPMS=y
-#USE_CRYPT=y
+USE_CRYPT=y
# Don't use MSLANMAN unless you really know what you're doing.
#MSLANMAN=y
# Uncomment the next line to include support for MPPE. CHAPMS (above) must
@@ -158,8 +158,7 @@ endif
ifdef NEEDDES
ifndef USE_CRYPT
-CFLAGS += -I$(shell $(CC) --print-sysroot)/usr/include/openssl
-NEEDCRYPTOLIB = y
+LIBS += -ldes $(LIBS)
else
CFLAGS += -DUSE_CRYPT=1
endif
--- a/pppd/pppcrypt.c
+++ b/pppd/pppcrypt.c
@@ -62,7 +62,7 @@ MakeKey(u_char *key, u_char *des_key)
des_key[7] = Get7Bits(key, 49);
#ifndef USE_CRYPT
- DES_set_odd_parity((DES_cblock *)des_key);
+ des_set_odd_parity((des_cblock *)des_key);
#endif
}
@@ -147,30 +147,30 @@ DesDecrypt(u_char *cipher, u_char *clear
}
#else /* USE_CRYPT */
-static DES_key_schedule key_schedule;
+static des_key_schedule key_schedule;
bool
DesSetkey(u_char *key)
{
- DES_cblock des_key;
+ des_cblock des_key;
MakeKey(key, des_key);
- DES_set_key(&des_key, &key_schedule);
+ des_set_key(&des_key, key_schedule);
return (1);
}
bool
DesEncrypt(u_char *clear, u_char *cipher)
{
- DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
- &key_schedule, 1);
+ des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
+ key_schedule, 1);
return (1);
}
bool
DesDecrypt(u_char *cipher, u_char *clear)
{
- DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
- &key_schedule, 0);
+ des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
+ key_schedule, 0);
return (1);
}

View File

@@ -1,12 +0,0 @@
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -49,7 +49,8 @@ MPPE=y
# Uncomment the next line to include support for PPP packet filtering.
# This requires that the libpcap library and headers be installed
# and that the kernel driver support PPP packet filtering.
-#FILTER=y
+# libpcap statically linked in OpenWRT, hence disabled here.
+FILTER=
# Support for precompiled filters
PRECOMPILED_FILTER=y

View File

@@ -1,4 +1,4 @@
/* /*
* Taken from fli4l 3.0 * Taken from fli4l 3.0
* Make sure you compile it against the same libpcap version used in OpenWrt * Make sure you compile it against the same libpcap version used in OpenWrt
*/ */

View File

@@ -32,7 +32,7 @@ require (
github.com/metacubex/sing-shadowsocks v0.2.12 github.com/metacubex/sing-shadowsocks v0.2.12
github.com/metacubex/sing-shadowsocks2 v0.2.7 github.com/metacubex/sing-shadowsocks2 v0.2.7
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2
github.com/metacubex/sing-tun v0.4.9 github.com/metacubex/sing-tun v0.4.10-0.20251124160354-85cd06f11a84
github.com/metacubex/sing-vmess v0.2.4 github.com/metacubex/sing-vmess v0.2.4
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f
github.com/metacubex/smux v0.0.0-20251111013112-03f8d12dafc1 github.com/metacubex/smux v0.0.0-20251111013112-03f8d12dafc1

View File

@@ -129,8 +129,8 @@ github.com/metacubex/sing-shadowsocks2 v0.2.7 h1:hSuuc0YpsfiqYqt1o+fP4m34BQz4e6w
github.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE= github.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI= github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=
github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E= github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=
github.com/metacubex/sing-tun v0.4.9 h1:jY0Yyt8nnN3yQRN/jTxgqNCmGi1dsFdxdIi7pQUlVVU= github.com/metacubex/sing-tun v0.4.10-0.20251124160354-85cd06f11a84 h1:PlVO8aCeAnVUsvO9X077iX9wz23nSnbRjtPRdE0GsY8=
github.com/metacubex/sing-tun v0.4.9/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w= github.com/metacubex/sing-tun v0.4.10-0.20251124160354-85cd06f11a84/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w=
github.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I= github.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I=
github.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM= github.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM=
github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU= github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=

View File

@@ -21,22 +21,22 @@ define Download/geoip
HASH:=2445b44d9ae3ab9a867c9d1e0e244646c4c378622e14b9afaf3658ecf46a40b9 HASH:=2445b44d9ae3ab9a867c9d1e0e244646c4c378622e14b9afaf3658ecf46a40b9
endef endef
GEOSITE_VER:=20251123125944 GEOSITE_VER:=20251124114549
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE) FILE:=$(GEOSITE_FILE)
HASH:=83b10b5e81f0c3c423d50af4873993041dbb788bc016478acbf1cdd778ace92a HASH:=1685841ffa39bf684e17704fa79ace0acd6f70c84739def9bfcd214dba6a27ba
endef endef
GEOSITE_IRAN_VER:=202511170041 GEOSITE_IRAN_VER:=202511240043
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER) GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
define Download/geosite-ir define Download/geosite-ir
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/ URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
URL_FILE:=iran.dat URL_FILE:=iran.dat
FILE:=$(GEOSITE_IRAN_FILE) FILE:=$(GEOSITE_IRAN_FILE)
HASH:=aa94b6efc99660838f85d700bbfea38d71321eeb1b3cc6cf92ade1db775d9e25 HASH:=ffea8ddf7d6fd528ad8f7f5e5b9bc365454f5ea16be9353f0864b4baf75ec6c8
endef endef
define Package/v2ray-geodata/template define Package/v2ray-geodata/template

View File

@@ -71,28 +71,25 @@ public class DownloaderHelper
} }
}; };
var totalDatetime = DateTime.Now; var lastUpdateTime = DateTime.Now;
var totalSecond = 0;
var hasValue = false; var hasValue = false;
double maxSpeed = 0; double maxSpeed = 0;
await using var downloader = new Downloader.DownloadService(downloadOpt); await using var downloader = new Downloader.DownloadService(downloadOpt);
//downloader.DownloadStarted += (sender, value) =>
//{
// if (progress != null)
// {
// progress.Report("Start download data...");
// }
//};
downloader.DownloadProgressChanged += (sender, value) => downloader.DownloadProgressChanged += (sender, value) =>
{ {
var ts = DateTime.Now - totalDatetime; if (progress != null && value.BytesPerSecondSpeed > 0)
if (progress != null && ts.Seconds > totalSecond)
{ {
hasValue = true; hasValue = true;
totalSecond = ts.Seconds;
if (value.BytesPerSecondSpeed > maxSpeed) if (value.BytesPerSecondSpeed > maxSpeed)
{ {
maxSpeed = value.BytesPerSecondSpeed; maxSpeed = value.BytesPerSecondSpeed;
}
var ts = DateTime.Now - lastUpdateTime;
if (ts.TotalMilliseconds >= 1000)
{
lastUpdateTime = DateTime.Now;
var speed = (maxSpeed / 1000 / 1000).ToString("#0.0"); var speed = (maxSpeed / 1000 / 1000).ToString("#0.0");
progress.Report(speed); progress.Report(speed);
} }
@@ -102,10 +99,19 @@ public class DownloaderHelper
{ {
if (progress != null) if (progress != null)
{ {
if (!hasValue && value.Error != null) if (hasValue && maxSpeed > 0)
{
var finalSpeed = (maxSpeed / 1000 / 1000).ToString("#0.0");
progress.Report(finalSpeed);
}
else if (value.Error != null)
{ {
progress.Report(value.Error?.Message); progress.Report(value.Error?.Message);
} }
else
{
progress.Report("0");
}
} }
}; };
//progress.Report("......"); //progress.Report("......");

View File

@@ -323,31 +323,28 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
{ {
var responseTime = -1; var responseTime = -1;
if (!IPAddress.TryParse(url, out var ipAddress))
{
var ipHostInfo = await Dns.GetHostEntryAsync(url);
ipAddress = ipHostInfo.AddressList.First();
}
IPEndPoint endPoint = new(ipAddress, port);
using Socket clientSocket = new(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
var timer = Stopwatch.StartNew();
try try
{ {
if (!IPAddress.TryParse(url, out var ipAddress)) using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
{ await clientSocket.ConnectAsync(endPoint, cts.Token).ConfigureAwait(false);
var ipHostInfo = await Dns.GetHostEntryAsync(url); responseTime = (int)timer.ElapsedMilliseconds;
ipAddress = ipHostInfo.AddressList.First();
}
IPEndPoint endPoint = new(ipAddress, port);
using Socket clientSocket = new(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
var timer = Stopwatch.StartNew();
var result = clientSocket.BeginConnect(endPoint, null, null);
if (!result.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(5)))
{
throw new TimeoutException("connect timeout (5s): " + url);
}
timer.Stop();
responseTime = (int)timer.Elapsed.TotalMilliseconds;
clientSocket.EndConnect(result);
} }
catch (Exception ex) catch (OperationCanceledException)
{ {
Logging.SaveLog(_tag, ex); }
finally
{
timer.Stop();
} }
return responseTime; return responseTime;
} }

View File

@@ -11,7 +11,7 @@ require (
github.com/miekg/dns v1.1.68 github.com/miekg/dns v1.1.68
github.com/pelletier/go-toml v1.9.5 github.com/pelletier/go-toml v1.9.5
github.com/pires/go-proxyproto v0.8.1 github.com/pires/go-proxyproto v0.8.1
github.com/quic-go/quic-go v0.56.0 github.com/quic-go/quic-go v0.57.0
github.com/refraction-networking/utls v1.8.1 github.com/refraction-networking/utls v1.8.1
github.com/sagernet/sing v0.5.1 github.com/sagernet/sing v0.5.1
github.com/sagernet/sing-shadowsocks v0.2.7 github.com/sagernet/sing-shadowsocks v0.2.7
@@ -43,7 +43,7 @@ require (
github.com/klauspost/cpuid/v2 v2.0.12 // indirect github.com/klauspost/cpuid/v2 v2.0.12 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/qpack v0.6.0 // indirect
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
github.com/vishvananda/netns v0.0.5 // indirect github.com/vishvananda/netns v0.0.5 // indirect
golang.org/x/mod v0.29.0 // indirect golang.org/x/mod v0.29.0 // indirect

View File

@@ -48,10 +48,10 @@ github.com/pires/go-proxyproto v0.8.1 h1:9KEixbdJfhrbtjpz/ZwCdWDD2Xem0NZ38qMYaAS
github.com/pires/go-proxyproto v0.8.1/go.mod h1:ZKAAyp3cgy5Y5Mo4n9AlScrkCZwUy0g3Jf+slqQVcuU= github.com/pires/go-proxyproto v0.8.1/go.mod h1:ZKAAyp3cgy5Y5Mo4n9AlScrkCZwUy0g3Jf+slqQVcuU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=
github.com/quic-go/quic-go v0.56.0 h1:q/TW+OLismmXAehgFLczhCDTYB3bFmua4D9lsNBWxvY= github.com/quic-go/quic-go v0.57.0 h1:AsSSrrMs4qI/hLrKlTH/TGQeTMY0ib1pAOX7vA3AdqE=
github.com/quic-go/quic-go v0.56.0/go.mod h1:9gx5KsFQtw2oZ6GZTyh+7YEvOxWCL9WZAepnHxgAo6c= github.com/quic-go/quic-go v0.57.0/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s=
github.com/refraction-networking/utls v1.8.1 h1:yNY1kapmQU8JeM1sSw2H2asfTIwWxIkrMJI0pRUOCAo= github.com/refraction-networking/utls v1.8.1 h1:yNY1kapmQU8JeM1sSw2H2asfTIwWxIkrMJI0pRUOCAo=
github.com/refraction-networking/utls v1.8.1/go.mod h1:jkSOEkLqn+S/jtpEHPOsVv/4V4EVnelwbMQl4vCWXAM= github.com/refraction-networking/utls v1.8.1/go.mod h1:jkSOEkLqn+S/jtpEHPOsVv/4V4EVnelwbMQl4vCWXAM=
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=

View File

@@ -23,96 +23,38 @@ from ..utils import (
class NhkBaseIE(InfoExtractor): class NhkBaseIE(InfoExtractor):
_API_URL_TEMPLATE = 'https://nwapi.nhk.jp/nhkworld/%sod%slist/v7b/%s/%s/%s/all%s.json' _API_URL_TEMPLATE = 'https://api.nhkworld.jp/showsapi/v1/{lang}/{content_format}_{page_type}/{m_id}{extra_page}'
_BASE_URL_REGEX = r'https?://www3\.nhk\.or\.jp/nhkworld/(?P<lang>[a-z]{2})/' _BASE_URL_REGEX = r'https?://www3\.nhk\.or\.jp/nhkworld/(?P<lang>[a-z]{2})/'
def _call_api(self, m_id, lang, is_video, is_episode, is_clip): def _call_api(self, m_id, lang, is_video, is_episode, is_clip):
content_format = 'video' if is_video else 'audio'
content_type = 'clips' if is_clip else 'episodes'
if not is_episode:
extra_page = f'/{content_format}_{content_type}'
page_type = 'programs'
else:
extra_page = ''
page_type = content_type
return self._download_json( return self._download_json(
self._API_URL_TEMPLATE % ( self._API_URL_TEMPLATE.format(
'v' if is_video else 'r', lang=lang, content_format=content_format, page_type=page_type,
'clip' if is_clip else 'esd', m_id=m_id, extra_page=extra_page),
'episode' if is_episode else 'program', join_nonempty(m_id, lang))
m_id, lang, '/all' if is_video else ''),
m_id, query={'apikey': 'EJfK8jdS57GqlupFgAfAAwr573q01y6k'})['data']['episodes'] or []
def _get_api_info(self, refresh=True):
if not refresh:
return self.cache.load('nhk', 'api_info')
self.cache.store('nhk', 'api_info', {})
movie_player_js = self._download_webpage(
'https://movie-a.nhk.or.jp/world/player/js/movie-player.js', None,
note='Downloading stream API information')
api_info = {
'url': self._search_regex(
r'prod:[^;]+\bapiUrl:\s*[\'"]([^\'"]+)[\'"]', movie_player_js, None, 'stream API url'),
'token': self._search_regex(
r'prod:[^;]+\btoken:\s*[\'"]([^\'"]+)[\'"]', movie_player_js, None, 'stream API token'),
}
self.cache.store('nhk', 'api_info', api_info)
return api_info
def _extract_stream_info(self, vod_id):
for refresh in (False, True):
api_info = self._get_api_info(refresh)
if not api_info:
continue
api_url = api_info.pop('url')
meta = traverse_obj(
self._download_json(
api_url, vod_id, 'Downloading stream url info', fatal=False, query={
**api_info,
'type': 'json',
'optional_id': vod_id,
'active_flg': 1,
}), ('meta', 0))
stream_url = traverse_obj(
meta, ('movie_url', ('mb_auto', 'auto_sp', 'auto_pc'), {url_or_none}), get_all=False)
if stream_url:
formats, subtitles = self._extract_m3u8_formats_and_subtitles(stream_url, vod_id)
return {
**traverse_obj(meta, {
'duration': ('duration', {int_or_none}),
'timestamp': ('publication_date', {unified_timestamp}),
'release_timestamp': ('insert_date', {unified_timestamp}),
'modified_timestamp': ('update_date', {unified_timestamp}),
}),
'formats': formats,
'subtitles': subtitles,
}
raise ExtractorError('Unable to extract stream url')
def _extract_episode_info(self, url, episode=None): def _extract_episode_info(self, url, episode=None):
fetch_episode = episode is None fetch_episode = episode is None
lang, m_type, episode_id = NhkVodIE._match_valid_url(url).group('lang', 'type', 'id') lang, m_type, episode_id = NhkVodIE._match_valid_url(url).group('lang', 'type', 'id')
is_video = m_type != 'audio' is_video = m_type != 'audio'
if is_video:
episode_id = episode_id[:4] + '-' + episode_id[4:]
if fetch_episode: if fetch_episode:
episode = self._call_api( episode = self._call_api(
episode_id, lang, is_video, True, episode_id[:4] == '9999')[0] episode_id, lang, is_video, is_episode=True, is_clip=episode_id[:4] == '9999')
def get_clean_field(key): video_id = join_nonempty('id', 'lang', from_dict=episode)
return clean_html(episode.get(key + '_clean') or episode.get(key))
title = get_clean_field('sub_title') title = episode.get('title')
series = get_clean_field('title') series = traverse_obj(episode, (('video_program', 'audio_program'), any, 'title'))
thumbnails = []
for s, w, h in [('', 640, 360), ('_l', 1280, 720)]:
img_path = episode.get('image' + s)
if not img_path:
continue
thumbnails.append({
'id': f'{h}p',
'height': h,
'width': w,
'url': 'https://www3.nhk.or.jp' + img_path,
})
episode_name = title episode_name = title
if series and title: if series and title:
@@ -125,37 +67,52 @@ class NhkBaseIE(InfoExtractor):
episode_name = None episode_name = None
info = { info = {
'id': episode_id + '-' + lang, 'id': video_id,
'title': title, 'title': title,
'description': get_clean_field('description'),
'thumbnails': thumbnails,
'series': series, 'series': series,
'episode': episode_name, 'episode': episode_name,
**traverse_obj(episode, {
'description': ('description', {str}),
'release_timestamp': ('first_broadcasted_at', {unified_timestamp}),
'categories': ('categories', ..., 'name', {str}),
'tags': ('tags', ..., 'name', {str}),
'thumbnails': ('images', lambda _, v: v['url'], {
'url': ('url', {urljoin(url)}),
'width': ('width', {int_or_none}),
'height': ('height', {int_or_none}),
}),
'webpage_url': ('url', {urljoin(url)}),
}),
'extractor_key': NhkVodIE.ie_key(),
'extractor': NhkVodIE.IE_NAME,
} }
if is_video: # XXX: We are assuming that 'video' and 'audio' are mutually exclusive
vod_id = episode['vod_id'] stream_info = traverse_obj(episode, (('video', 'audio'), {dict}, any)) or {}
info.update({ if not stream_info.get('url'):
**self._extract_stream_info(vod_id), self.raise_no_formats('Stream not found; it has most likely expired', expected=True)
'id': vod_id,
})
else: else:
if fetch_episode: stream_url = stream_info['url']
if is_video:
formats, subtitles = self._extract_m3u8_formats_and_subtitles(stream_url, video_id)
info.update({
'formats': formats,
'subtitles': subtitles,
**traverse_obj(stream_info, ({
'duration': ('duration', {int_or_none}),
'timestamp': ('published_at', {unified_timestamp}),
})),
})
else:
# From https://www3.nhk.or.jp/nhkworld/common/player/radio/inline/rod.html # From https://www3.nhk.or.jp/nhkworld/common/player/radio/inline/rod.html
audio_path = remove_end(episode['audio']['audio'], '.m4a') audio_path = remove_end(stream_url, '.m4a')
info['formats'] = self._extract_m3u8_formats( info['formats'] = self._extract_m3u8_formats(
f'{urljoin("https://vod-stream.nhk.jp", audio_path)}/index.m3u8', f'{urljoin("https://vod-stream.nhk.jp", audio_path)}/index.m3u8',
episode_id, 'm4a', entry_protocol='m3u8_native', episode_id, 'm4a', entry_protocol='m3u8_native',
m3u8_id='hls', fatal=False) m3u8_id='hls', fatal=False)
for f in info['formats']: for f in info['formats']:
f['language'] = lang f['language'] = lang
else:
info.update({
'_type': 'url_transparent',
'ie_key': NhkVodIE.ie_key(),
'url': url,
})
return info return info
@@ -168,29 +125,29 @@ class NhkVodIE(NhkBaseIE):
# Content available only for a limited period of time. Visit # Content available only for a limited period of time. Visit
# https://www3.nhk.or.jp/nhkworld/en/ondemand/ for working samples. # https://www3.nhk.or.jp/nhkworld/en/ondemand/ for working samples.
_TESTS = [{ _TESTS = [{
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/2049126/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/2049165/',
'info_dict': { 'info_dict': {
'id': 'nw_vod_v_en_2049_126_20230413233000_01_1681398302', 'id': '2049165-en',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Japan Railway Journal - The Tohoku Shinkansen: Full Speed Ahead', 'title': 'Japan Railway Journal - Choshi Electric Railway: Fighting to Get Back on Track',
'description': 'md5:49f7c5b206e03868a2fdf0d0814b92f6', 'description': 'md5:ab57df2fca7f04245148c2e787bb203d',
'thumbnail': r're:https://.+/.+\.jpg', 'thumbnail': r're:https://.+/.+\.jpg',
'episode': 'The Tohoku Shinkansen: Full Speed Ahead', 'episode': 'Choshi Electric Railway: Fighting to Get Back on Track',
'series': 'Japan Railway Journal', 'series': 'Japan Railway Journal',
'modified_timestamp': 1707217907, 'duration': 1680,
'timestamp': 1681428600, 'categories': ['Biz & Tech'],
'release_timestamp': 1693883728, 'tags': ['Akita', 'Chiba', 'Trains', 'Transcript', 'All (Japan Navigator)'],
'duration': 1679, 'timestamp': 1759055880,
'upload_date': '20230413', 'upload_date': '20250928',
'modified_date': '20240206', 'release_timestamp': 1758810600,
'release_date': '20230905', 'release_date': '20250925',
}, },
}, { }, {
# video clip # video clip
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/9999011/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/9999011/',
'md5': '153c3016dfd252ba09726588149cf0e7', 'md5': '153c3016dfd252ba09726588149cf0e7',
'info_dict': { 'info_dict': {
'id': 'lpZXIwaDE6_Z-976CPsFdxyICyWUzlT5', 'id': '9999011-en',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Dining with the Chef - Chef Saito\'s Family recipe: MENCHI-KATSU', 'title': 'Dining with the Chef - Chef Saito\'s Family recipe: MENCHI-KATSU',
'description': 'md5:5aee4a9f9d81c26281862382103b0ea5', 'description': 'md5:5aee4a9f9d81c26281862382103b0ea5',
@@ -198,24 +155,23 @@ class NhkVodIE(NhkBaseIE):
'series': 'Dining with the Chef', 'series': 'Dining with the Chef',
'episode': 'Chef Saito\'s Family recipe: MENCHI-KATSU', 'episode': 'Chef Saito\'s Family recipe: MENCHI-KATSU',
'duration': 148, 'duration': 148,
'upload_date': '20190816', 'categories': ['Food'],
'release_date': '20230902', 'tags': ['Washoku'],
'release_timestamp': 1693619292, 'timestamp': 1548212400,
'modified_timestamp': 1707217907, 'upload_date': '20190123',
'modified_date': '20240206',
'timestamp': 1565997540,
}, },
}, { }, {
# radio # radio
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/audio/livinginjapan-20231001-1/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/audio/livinginjapan-20240901-1/',
'info_dict': { 'info_dict': {
'id': 'livinginjapan-20231001-1-en', 'id': 'livinginjapan-20240901-1-en',
'ext': 'm4a', 'ext': 'm4a',
'title': 'Living in Japan - Tips for Travelers to Japan / Ramen Vending Machines', 'title': 'Living in Japan - Weekend Hiking / Self-protection from crime',
'series': 'Living in Japan', 'series': 'Living in Japan',
'description': 'md5:0a0e2077d8f07a03071e990a6f51bfab', 'description': 'md5:4d0e14ab73bdbfedb60a53b093954ed6',
'thumbnail': r're:https://.+/.+\.jpg', 'thumbnail': r're:https://.+/.+\.jpg',
'episode': 'Tips for Travelers to Japan / Ramen Vending Machines', 'episode': 'Weekend Hiking / Self-protection from crime',
'categories': ['Interactive'],
}, },
}, { }, {
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/2015173/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/2015173/',
@@ -256,96 +212,51 @@ class NhkVodIE(NhkBaseIE):
}, },
'skip': 'expires 2023-10-15', 'skip': 'expires 2023-10-15',
}, { }, {
# a one-off (single-episode series). title from the api is just '<p></p>' # a one-off (single-episode series). title from the api is just null
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/3004952/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/3026036/',
'info_dict': { 'info_dict': {
'id': 'nw_vod_v_en_3004_952_20230723091000_01_1690074552', 'id': '3026036-en',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Barakan Discovers - AMAMI OSHIMA: Isson\'s Treasure Isla', 'title': 'STATELESS: The Japanese Left Behind in the Philippines',
'description': 'md5:5db620c46a0698451cc59add8816b797', 'description': 'md5:9a2fd51cdfa9f52baae28569e0053786',
'thumbnail': r're:https://.+/.+\.jpg', 'duration': 2955,
'release_date': '20230905', 'thumbnail': 'https://www3.nhk.or.jp/nhkworld/en/shows/3026036/images/wide_l_QPtWpt4lzVhm3NzPAMIIF35MCg4CdNwcikPaTS5Q.jpg',
'timestamp': 1690103400, 'categories': ['Documentary', 'Culture & Lifestyle'],
'duration': 2939, 'tags': ['Transcript', 'Documentary 360', 'The Pursuit of PEACE'],
'release_timestamp': 1693898699, 'timestamp': 1758931800,
'upload_date': '20230723', 'upload_date': '20250927',
'modified_timestamp': 1707217907, 'release_timestamp': 1758931800,
'modified_date': '20240206', 'release_date': '20250927',
'episode': 'AMAMI OSHIMA: Isson\'s Treasure Isla',
'series': 'Barakan Discovers',
}, },
}, { }, {
# /ondemand/video/ url with alphabetical character in 5th position of id # /ondemand/video/ url with alphabetical character in 5th position of id
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/9999a07/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/9999a07/',
'info_dict': { 'info_dict': {
'id': 'nw_c_en_9999-a07', 'id': '9999a07-en',
'ext': 'mp4', 'ext': 'mp4',
'episode': 'Mini-Dramas on SDGs: Ep 1 Close the Gender Gap [Director\'s Cut]', 'episode': 'Mini-Dramas on SDGs: Ep 1 Close the Gender Gap [Director\'s Cut]',
'series': 'Mini-Dramas on SDGs', 'series': 'Mini-Dramas on SDGs',
'modified_date': '20240206',
'title': 'Mini-Dramas on SDGs - Mini-Dramas on SDGs: Ep 1 Close the Gender Gap [Director\'s Cut]', 'title': 'Mini-Dramas on SDGs - Mini-Dramas on SDGs: Ep 1 Close the Gender Gap [Director\'s Cut]',
'description': 'md5:3f9dcb4db22fceb675d90448a040d3f6', 'description': 'md5:3f9dcb4db22fceb675d90448a040d3f6',
'timestamp': 1621962360, 'timestamp': 1621911600,
'duration': 189, 'duration': 190,
'release_date': '20230903',
'modified_timestamp': 1707217907,
'upload_date': '20210525', 'upload_date': '20210525',
'thumbnail': r're:https://.+/.+\.jpg', 'thumbnail': r're:https://.+/.+\.jpg',
'release_timestamp': 1693713487, 'categories': ['Current Affairs', 'Entertainment'],
}, },
}, { }, {
'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/9999d17/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/9999d17/',
'info_dict': { 'info_dict': {
'id': 'nw_c_en_9999-d17', 'id': '9999d17-en',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Flowers of snow blossom - The 72 Pentads of Yamato', 'title': 'Flowers of snow blossom - The 72 Pentads of Yamato',
'description': 'Todays focus: Snow', 'description': 'Todays focus: Snow',
'release_timestamp': 1693792402,
'release_date': '20230904',
'upload_date': '20220128',
'timestamp': 1643370960,
'thumbnail': r're:https://.+/.+\.jpg', 'thumbnail': r're:https://.+/.+\.jpg',
'duration': 136, 'duration': 136,
'series': '', 'categories': ['Culture & Lifestyle', 'Science & Nature'],
'modified_date': '20240206', 'tags': ['Nara', 'Temples & Shrines', 'Winter', 'Snow'],
'modified_timestamp': 1707217907, 'timestamp': 1643339040,
}, 'upload_date': '20220128',
}, {
# new /shows/ url format
'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/2032307/',
'info_dict': {
'id': 'nw_vod_v_en_2032_307_20240321113000_01_1710990282',
'ext': 'mp4',
'title': 'Japanology Plus - 20th Anniversary Special Part 1',
'description': 'md5:817d41fc8e54339ad2a916161ea24faf',
'episode': '20th Anniversary Special Part 1',
'series': 'Japanology Plus',
'thumbnail': r're:https://.+/.+\.jpg',
'duration': 1680,
'timestamp': 1711020600,
'upload_date': '20240321',
'release_timestamp': 1711022683,
'release_date': '20240321',
'modified_timestamp': 1711031012,
'modified_date': '20240321',
},
}, {
'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/3020025/',
'info_dict': {
'id': 'nw_vod_v_en_3020_025_20230325144000_01_1679723944',
'ext': 'mp4',
'title': '100 Ideas to Save the World - Working Styles Evolve',
'description': 'md5:9e6c7778eaaf4f7b4af83569649f84d9',
'episode': 'Working Styles Evolve',
'series': '100 Ideas to Save the World',
'thumbnail': r're:https://.+/.+\.jpg',
'duration': 899,
'upload_date': '20230325',
'timestamp': 1679755200,
'release_date': '20230905',
'release_timestamp': 1693880540,
'modified_date': '20240206',
'modified_timestamp': 1707217907,
}, },
}, { }, {
# new /shows/audio/ url format # new /shows/audio/ url format
@@ -373,6 +284,7 @@ class NhkVodProgramIE(NhkBaseIE):
'id': 'sumo', 'id': 'sumo',
'title': 'GRAND SUMO Highlights', 'title': 'GRAND SUMO Highlights',
'description': 'md5:fc20d02dc6ce85e4b72e0273aa52fdbf', 'description': 'md5:fc20d02dc6ce85e4b72e0273aa52fdbf',
'series': 'GRAND SUMO Highlights',
}, },
'playlist_mincount': 1, 'playlist_mincount': 1,
}, { }, {
@@ -381,6 +293,7 @@ class NhkVodProgramIE(NhkBaseIE):
'id': 'japanrailway', 'id': 'japanrailway',
'title': 'Japan Railway Journal', 'title': 'Japan Railway Journal',
'description': 'md5:ea39d93af7d05835baadf10d1aae0e3f', 'description': 'md5:ea39d93af7d05835baadf10d1aae0e3f',
'series': 'Japan Railway Journal',
}, },
'playlist_mincount': 12, 'playlist_mincount': 12,
}, { }, {
@@ -390,6 +303,7 @@ class NhkVodProgramIE(NhkBaseIE):
'id': 'japanrailway', 'id': 'japanrailway',
'title': 'Japan Railway Journal', 'title': 'Japan Railway Journal',
'description': 'md5:ea39d93af7d05835baadf10d1aae0e3f', 'description': 'md5:ea39d93af7d05835baadf10d1aae0e3f',
'series': 'Japan Railway Journal',
}, },
'playlist_mincount': 12, 'playlist_mincount': 12,
}, { }, {
@@ -399,17 +313,9 @@ class NhkVodProgramIE(NhkBaseIE):
'id': 'livinginjapan', 'id': 'livinginjapan',
'title': 'Living in Japan', 'title': 'Living in Japan',
'description': 'md5:665bb36ec2a12c5a7f598ee713fc2b54', 'description': 'md5:665bb36ec2a12c5a7f598ee713fc2b54',
'series': 'Living in Japan',
}, },
'playlist_mincount': 12, 'playlist_mincount': 11,
}, {
# /tv/ program url
'url': 'https://www3.nhk.or.jp/nhkworld/en/tv/designtalksplus/',
'info_dict': {
'id': 'designtalksplus',
'title': 'DESIGN TALKS plus',
'description': 'md5:47b3b3a9f10d4ac7b33b53b70a7d2837',
},
'playlist_mincount': 20,
}, { }, {
'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/10yearshayaomiyazaki/', 'url': 'https://www3.nhk.or.jp/nhkworld/en/shows/10yearshayaomiyazaki/',
'only_matching': True, 'only_matching': True,
@@ -430,9 +336,8 @@ class NhkVodProgramIE(NhkBaseIE):
program_id, lang, m_type != 'audio', False, episode_type == 'clip') program_id, lang, m_type != 'audio', False, episode_type == 'clip')
def entries(): def entries():
for episode in episodes: for episode in traverse_obj(episodes, ('items', lambda _, v: v['url'])):
if episode_path := episode.get('url'): yield self._extract_episode_info(urljoin(url, episode['url']), episode)
yield self._extract_episode_info(urljoin(url, episode_path), episode)
html = self._download_webpage(url, program_id) html = self._download_webpage(url, program_id)
program_title = self._extract_meta_from_class_elements([ program_title = self._extract_meta_from_class_elements([
@@ -446,7 +351,7 @@ class NhkVodProgramIE(NhkBaseIE):
'tAudioProgramMain__info', # /shows/audio/programs/ 'tAudioProgramMain__info', # /shows/audio/programs/
'p-program-description'], html) # /tv/ 'p-program-description'], html) # /tv/
return self.playlist_result(entries(), program_id, program_title, program_description) return self.playlist_result(entries(), program_id, program_title, program_description, series=program_title)
class NhkForSchoolBangumiIE(InfoExtractor): class NhkForSchoolBangumiIE(InfoExtractor):

View File

@@ -1,21 +1,61 @@
from __future__ import annotations from __future__ import annotations
import abc import abc
import dataclasses import dataclasses
import functools import functools
import os.path import os.path
import sys
from ._utils import _get_exe_version_output, detect_exe_version, int_or_none from ._utils import _get_exe_version_output, detect_exe_version, int_or_none
# NOT public API def _runtime_version_tuple(v):
def runtime_version_tuple(v):
# NB: will return (0,) if `v` is an invalid version string # NB: will return (0,) if `v` is an invalid version string
return tuple(int_or_none(x, default=0) for x in v.split('.')) return tuple(int_or_none(x, default=0) for x in v.split('.'))
_FALLBACK_PATHEXT = ('.COM', '.EXE', '.BAT', '.CMD')
def _find_exe(basename: str) -> str:
if os.name != 'nt':
return basename
paths: list[str] = []
# binary dir
if getattr(sys, 'frozen', False):
paths.append(os.path.dirname(sys.executable))
# cwd
paths.append(os.getcwd())
# PATH items
if path := os.environ.get('PATH'):
paths.extend(filter(None, path.split(os.path.pathsep)))
pathext = os.environ.get('PATHEXT')
if pathext is None:
exts = _FALLBACK_PATHEXT
else:
exts = tuple(ext for ext in pathext.split(os.pathsep) if ext)
visited = []
for path in map(os.path.realpath, paths):
normed = os.path.normcase(path)
if normed in visited:
continue
visited.append(normed)
for ext in exts:
binary = os.path.join(path, f'{basename}{ext}')
if os.access(binary, os.F_OK | os.X_OK) and not os.path.isdir(binary):
return binary
return basename
def _determine_runtime_path(path, basename): def _determine_runtime_path(path, basename):
if not path: if not path:
return basename return _find_exe(basename)
if os.path.isdir(path): if os.path.isdir(path):
return os.path.join(path, basename) return os.path.join(path, basename)
return path return path
@@ -52,7 +92,7 @@ class DenoJsRuntime(JsRuntime):
if not out: if not out:
return None return None
version = detect_exe_version(out, r'^deno (\S+)', 'unknown') version = detect_exe_version(out, r'^deno (\S+)', 'unknown')
vt = runtime_version_tuple(version) vt = _runtime_version_tuple(version)
return JsRuntimeInfo( return JsRuntimeInfo(
name='deno', path=path, version=version, version_tuple=vt, name='deno', path=path, version=version, version_tuple=vt,
supported=vt >= self.MIN_SUPPORTED_VERSION) supported=vt >= self.MIN_SUPPORTED_VERSION)
@@ -67,7 +107,7 @@ class BunJsRuntime(JsRuntime):
if not out: if not out:
return None return None
version = detect_exe_version(out, r'^(\S+)', 'unknown') version = detect_exe_version(out, r'^(\S+)', 'unknown')
vt = runtime_version_tuple(version) vt = _runtime_version_tuple(version)
return JsRuntimeInfo( return JsRuntimeInfo(
name='bun', path=path, version=version, version_tuple=vt, name='bun', path=path, version=version, version_tuple=vt,
supported=vt >= self.MIN_SUPPORTED_VERSION) supported=vt >= self.MIN_SUPPORTED_VERSION)
@@ -82,7 +122,7 @@ class NodeJsRuntime(JsRuntime):
if not out: if not out:
return None return None
version = detect_exe_version(out, r'^v(\S+)', 'unknown') version = detect_exe_version(out, r'^v(\S+)', 'unknown')
vt = runtime_version_tuple(version) vt = _runtime_version_tuple(version)
return JsRuntimeInfo( return JsRuntimeInfo(
name='node', path=path, version=version, version_tuple=vt, name='node', path=path, version=version, version_tuple=vt,
supported=vt >= self.MIN_SUPPORTED_VERSION) supported=vt >= self.MIN_SUPPORTED_VERSION)
@@ -100,7 +140,7 @@ class QuickJsRuntime(JsRuntime):
is_ng = 'QuickJS-ng' in out is_ng = 'QuickJS-ng' in out
version = detect_exe_version(out, r'^QuickJS(?:-ng)?\s+version\s+(\S+)', 'unknown') version = detect_exe_version(out, r'^QuickJS(?:-ng)?\s+version\s+(\S+)', 'unknown')
vt = runtime_version_tuple(version.replace('-', '.')) vt = _runtime_version_tuple(version.replace('-', '.'))
if is_ng: if is_ng:
return JsRuntimeInfo( return JsRuntimeInfo(
name='quickjs-ng', path=path, version=version, version_tuple=vt, name='quickjs-ng', path=path, version=version, version_tuple=vt,

View File

@@ -876,13 +876,19 @@ class Popen(subprocess.Popen):
kwargs.setdefault('encoding', 'utf-8') kwargs.setdefault('encoding', 'utf-8')
kwargs.setdefault('errors', 'replace') kwargs.setdefault('errors', 'replace')
if shell and os.name == 'nt' and kwargs.get('executable') is None: if os.name == 'nt' and kwargs.get('executable') is None:
if not isinstance(args, str): # Must apply shell escaping if we are trying to run a batch file
args = shell_quote(args, shell=True) # These conditions should be very specific to limit impact
shell = False if not shell and isinstance(args, list) and args and args[0].lower().endswith(('.bat', '.cmd')):
# Set variable for `cmd.exe` newline escaping (see `utils.shell_quote`) shell = True
env['='] = '"^\n\n"'
args = f'{self.__comspec()} /Q /S /D /V:OFF /E:ON /C "{args}"' if shell:
if not isinstance(args, str):
args = shell_quote(args, shell=True)
shell = False
# Set variable for `cmd.exe` newline escaping (see `utils.shell_quote`)
env['='] = '"^\n\n"'
args = f'{self.__comspec()} /Q /S /D /V:OFF /E:ON /C "{args}"'
super().__init__(args, *remaining, env=env, shell=shell, **kwargs, startupinfo=self._startupinfo) super().__init__(args, *remaining, env=env, shell=shell, **kwargs, startupinfo=self._startupinfo)