nodelistparser 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,8 @@ interface ShadowSocksConfig extends SharedConfigBase {
31
31
  obfsHost?: string;
32
32
  /** obfs-uri */
33
33
  obfsUri?: string;
34
+ /** udp-port */
35
+ udpPort?: number;
34
36
  }
35
37
  interface TrojanConfig extends SharedConfigBase, TlsSharedConfig {
36
38
  type: 'trojan';
package/dist/cjs/index.js CHANGED
@@ -25,7 +25,8 @@ const isProxyBoolKey = (key)=>boolKeys.has(key);
25
25
  const numKeys = new Set([
26
26
  'version',
27
27
  'download-bandwidth',
28
- 'port-hopping-interval'
28
+ 'port-hopping-interval',
29
+ 'udp-port'
29
30
  ]);
30
31
  const isProxyNumKey = (key)=>numKeys.has(key);
31
32
  const arrKeys = new Set([]);
@@ -118,6 +119,7 @@ function decode$1(raw) {
118
119
  obfs: restDetails.obfs,
119
120
  obfsHost: restDetails['obfs-host'],
120
121
  obfsUri: restDetails['obfs-uri'],
122
+ udpPort: restDetails['udp-port'],
121
123
  ...shared
122
124
  };
123
125
  }
@@ -215,6 +217,7 @@ function encode$1(config) {
215
217
  return joinString([
216
218
  `${config.name} = ss, ${config.server}, ${config.port}, encrypt-method=${config.cipher}, password=${config.password}`,
217
219
  config.udp && 'udp-relay=true',
220
+ config.udpPort && `udp-port=${config.udpPort}`,
218
221
  config.obfs && `obfs=${config.obfs}`,
219
222
  config.obfsHost && `obfs-host=${config.obfsHost}`,
220
223
  config.obfsUri && `obfs-uri=${config.obfsUri}`,
@@ -31,6 +31,8 @@ interface ShadowSocksConfig extends SharedConfigBase {
31
31
  obfsHost?: string;
32
32
  /** obfs-uri */
33
33
  obfsUri?: string;
34
+ /** udp-port */
35
+ udpPort?: number;
34
36
  }
35
37
  interface TrojanConfig extends SharedConfigBase, TlsSharedConfig {
36
38
  type: 'trojan';
package/dist/es/index.mjs CHANGED
@@ -25,7 +25,8 @@ const isProxyBoolKey = (key)=>boolKeys.has(key);
25
25
  const numKeys = new Set([
26
26
  'version',
27
27
  'download-bandwidth',
28
- 'port-hopping-interval'
28
+ 'port-hopping-interval',
29
+ 'udp-port'
29
30
  ]);
30
31
  const isProxyNumKey = (key)=>numKeys.has(key);
31
32
  const arrKeys = new Set([]);
@@ -118,6 +119,7 @@ function decode$1(raw) {
118
119
  obfs: restDetails.obfs,
119
120
  obfsHost: restDetails['obfs-host'],
120
121
  obfsUri: restDetails['obfs-uri'],
122
+ udpPort: restDetails['udp-port'],
121
123
  ...shared
122
124
  };
123
125
  }
@@ -215,6 +217,7 @@ function encode$1(config) {
215
217
  return joinString([
216
218
  `${config.name} = ss, ${config.server}, ${config.port}, encrypt-method=${config.cipher}, password=${config.password}`,
217
219
  config.udp && 'udp-relay=true',
220
+ config.udpPort && `udp-port=${config.udpPort}`,
218
221
  config.obfs && `obfs=${config.obfs}`,
219
222
  config.obfsHost && `obfs-host=${config.obfsHost}`,
220
223
  config.obfsUri && `obfs-uri=${config.obfsUri}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodelistparser",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Surge / Mihomo (Clash.Meta) nodelist / proxy provider parser and generator.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,15 +34,15 @@
34
34
  "author": "Sukka <https://skk.moe>",
35
35
  "license": "MIT",
36
36
  "devDependencies": {
37
- "@eslint-sukka/node": "^6.7.0",
37
+ "@eslint-sukka/node": "^6.8.1",
38
38
  "@swc-node/register": "^1.10.9",
39
39
  "@types/mocha": "^10.0.9",
40
- "@types/node": "^22.7.6",
40
+ "@types/node": "^22.8.1",
41
41
  "bumpp": "^9.7.1",
42
42
  "bunchee": "^5.5.1",
43
- "eslint": "^9.12.0",
44
- "eslint-config-sukka": "^6.7.0",
45
- "eslint-formatter-sukka": "^6.7.0",
43
+ "eslint": "^9.13.0",
44
+ "eslint-config-sukka": "^6.8.1",
45
+ "eslint-formatter-sukka": "^6.8.1",
46
46
  "expect": "^29.7.0",
47
47
  "mocha": "^10.7.3",
48
48
  "typescript": "^5.6.3"