jointhis.proxy 0.3.5 → 0.4.0

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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Jointhis.party proxy client CLI tool.
4
4
 
5
- ## Running in development:
5
+ ## Running in development
6
6
 
7
7
  ```zsh
8
8
  pnpm build > /dev/null && node ./dist/cli.js
@@ -16,7 +16,7 @@ pnpm i -g jointhis.proxy@latest
16
16
 
17
17
  ## CLI
18
18
 
19
- ```
19
+ ```bash
20
20
  Usage
21
21
  $ jointhis.proxy
22
22
 
@@ -33,5 +33,3 @@ Usage
33
33
  For interactive setup, just run:
34
34
  $ jointhis.proxy
35
35
  ```
36
-
37
- Note to self, don't forget to `npm publish`
package/dist/cli.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- export declare const version = "0.3.5";
2
+ export declare const version = "0.4.0";
3
3
  export declare var rtun: any;
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import fs from 'node:fs';
8
8
  import { Spawn } from 'ink-spawn';
9
9
  import { exec } from 'node:child_process';
10
10
  import { clear } from 'node:console';
11
- export const version = `0.3.5`;
11
+ export const version = `0.4.0`;
12
12
  export var rtun;
13
13
  const cli = meow(`
14
14
  Usage
@@ -17,7 +17,8 @@ const cli = meow(`
17
17
  Options
18
18
  --tcp Internal TCP port.
19
19
  --udp Internal UDP port.
20
- --key Authentication key.
20
+ --ott One Time Token.
21
+ You can get this from https://www.jointhis.party/dash
21
22
  --subdomain Jointhis.party subdomain to assign.
22
23
  --service Service to host, for example: minecraft -> mc
23
24
 
@@ -35,7 +36,7 @@ const cli = meow(`
35
36
  tcp: {
36
37
  type: 'number',
37
38
  },
38
- key: {
39
+ ott: {
39
40
  type: 'string',
40
41
  },
41
42
  subdomain: {
@@ -95,9 +96,9 @@ async function main() {
95
96
  if (cli.flags.udp ||
96
97
  cli.flags.tcp ||
97
98
  cli.flags.service ||
98
- cli.flags.key ||
99
+ cli.flags.ott ||
99
100
  cli.flags.subdomain) {
100
- if (!cli.flags.key) {
101
+ if (!cli.flags.ott) {
101
102
  render(React.createElement(Error, { message: "Authentication token missing" }));
102
103
  process.exit(1);
103
104
  }
package/dist/main.js CHANGED
@@ -7,6 +7,7 @@ import { Box } from 'ink';
7
7
  import fs from 'node:fs';
8
8
  import { Spawn } from 'ink-spawn';
9
9
  import { rtun } from './cli.js';
10
+ import Link from 'ink-link';
10
11
  export default function Main({ view }) {
11
12
  const [key, Setkey] = useState('');
12
13
  const [sub, Setsub] = useState('');
@@ -35,8 +36,10 @@ export default function Main({ view }) {
35
36
  case '1': {
36
37
  return (React.createElement(Stepper, { showProgress: false, onComplete: () => process.exit(0), onCancel: () => process.exit(1) },
37
38
  React.createElement(Step, { name: "auth" },
38
- React.createElement(Text, null, "Please input your authentication key:"),
39
- React.createElement(TextInput, { value: key, onChange: Setkey, showCursor: true, mask: "*" })),
39
+ React.createElement(Text, null, "Please input your one time token:"),
40
+ React.createElement(Box, { marginY: 1, borderStyle: "round" },
41
+ React.createElement(TextInput, { value: key, onChange: Setkey, showCursor: true, mask: "*" })),
42
+ React.createElement(Link, { url: "https://www.jointhis.party/dash" }, "You can find this at https://www.jointhis.party/dash.")),
40
43
  React.createElement(Step, { name: "select service" },
41
44
  React.createElement(Text, null, "Select a service:"),
42
45
  React.createElement(SelectInput, { onSelect: handleSelect, items: services }),
@@ -61,7 +64,7 @@ export default function Main({ view }) {
61
64
  }
62
65
  }
63
66
  }
64
- async function getConfig(token, service, Setdownloaded) {
67
+ async function getConfig(ott, service, Setdownloaded) {
65
68
  var tcp;
66
69
  var udp;
67
70
  if (service == '1') {
@@ -80,7 +83,7 @@ async function getConfig(token, service, Setdownloaded) {
80
83
  tcp = `25565`;
81
84
  udp = `19132`;
82
85
  }
83
- const response = await fetch(`https://www.jointhis.party/api/cli/${token}/${tcp}/${udp}`);
86
+ const response = await fetch(`https://www.jointhis.party/api/cli/${ott}/${tcp}/${udp}`);
84
87
  if (!response.ok) {
85
88
  console.error('Error fetching configuration file from remote server.', 'ERROR', response.status);
86
89
  process.exit(1);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "repository": {
4
4
  "url": "https://gitlab.com/tectrixdev/jointhis.proxy"
5
5
  },
6
- "version": "0.3.5",
6
+ "version": "0.4.0",
7
7
  "license": "MIT",
8
8
  "bin": {
9
9
  "jointhis.proxy": "dist/cli.js",
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "fs": "0.0.1-security",
26
25
  "ink": "^6.8.0",
26
+ "ink-link": "^5.0.0",
27
27
  "ink-select-input": "^6.2.0",
28
28
  "ink-spawn": "^0.1.4",
29
29
  "ink-stepper": "^0.2.1",