admin/home: explanation for proxy warning
Massimo Melina committed
Apr 9, 2023 at 20:25 UTC
939c5ba64d2a3c7f00ba2c6795fd6c15dd24edd1
1 file changed
+8
-3
admin/src/HomePage.ts
+8
-3
@@ -12,6 +12,8 @@ import { isCertError, isKeyError, makeCertAndSave } from './OptionsPage'
12
import { VfsNode } from './VfsPage'
13
import { Account } from './AccountsPage'
14
15
+export const REPO_URL = 'https://github.com/rejetto/hfs/'
16
+
17
interface ServerStatus { listening: boolean, port: number, error?: string, busy?: string }
18
19
export default function HomePage() {
@@ -54,20 +56,23 @@ export default function HomePage() {
56
SOLUTION_SEP, h(InLink, { to:'accounts' }, md("to access from another computer create an account with /admin/ permission")) ),
57
proxyWarning(cfg, status) && entry('warning', "A proxy was detected but none is configured",
58
SOLUTION_SEP, cfgLink("set the number of proxies"),
57
- SOLUTION_SEP, "unless you are sure you can ", h(Button, {
59
+ SOLUTION_SEP, "unless you are sure and you can ", h(Button, {
60
+ size: 'small',
61
async onClick() {
62
if (await confirmDialog("Go on only if you know what you are doing")
63
&& await apiCall('set_config', { values: { ignore_proxies: true } }))
64
reloadCfg()
65
}
63
- }, "ignore this warning")),
66
+ }, "ignore this warning"),
67
+ SOLUTION_SEP, h(Link, { target: 'help', href: REPO_URL + 'wiki/Proxy-warning' }, "Explanation")
68
+ ),
69
status.frpDetected && entry('warning', `FRP is detected. It should not be used with "type = tcp" with HFS. Possible solutions are`,
70
h('ol',{},
71
h('li',{}, `configure FRP with type=http (best solution)`),
72
h('li',{}, md(`configure FRP to connect to HFS _not_ with 127.0.0.1 (safe, but you won't see users' IPs)`)),
73
h('li',{}, `disable "admin access for localhost" in HFS (safe, but you won't see users' IPs)`),
74
)),
70
- entry('', h(Link, { target: 'support', href: 'https://github.com/rejetto/hfs/discussions' }, "Get support")),
75
+ entry('', h(Link, { target: 'support', href: REPO_URL + 'discussions' }, "Get support")),
76
)
77
}
78