Tencent / nohost

基于 Whistle 实现的多账号多环境远程配置及抓包调试平台
https://nohost.pro
Other
1.4k stars 160 forks source link

是不是不能指定非8080端口啊 #84

Closed aogg closed 2 years ago

aogg commented 2 years ago

whistle for Dockerfile

FROM alpine:latest

RUN set -ex && \ apk update && \ apk upgrade && \ apk add --no-cache bash && \ apk add --no-cache nodejs-npm && \ npm i -g @nohost/server --registry=https://r.npm.taobao.org

ENTRYPOINT ["n2", "run"]

这个的docker容器指定别的端口都无法启动

aogg commented 2 years ago

-p 8080

aogg commented 2 years ago

-p 不行

aogg commented 2 years ago

bash-5.1# n2 -p 8898 -o 172.17.0.2 start [i] nohost@0.6.0 started [i] use your device to visit the following URL list, gets the IP of the URL you can access: http://127.0.0.1:8898/ http://172.17.0.2:8898/ Note: If all the above URLs are unable to access, check the firewall settings For help see https://nohost.pro/ bash-5.1# bash-5.1# wget -O - http://172.17.0.2:8898/ Connecting to 172.17.0.2:8898 (172.17.0.2:8898) wget: can't connect to remote host (172.17.0.2): Connection refused

aogg commented 2 years ago

wget -O - http://172.17.0.2:8898/

这个错在哪里, 127.0.0.1是可以的

aogg commented 2 years ago

wget -O - http://172.17.0.2:8898/

这个错在哪里, 127.0.0.1是可以的

aogg commented 2 years ago

wget -O - http://172.17.0.2:8898/

这个错在哪里, 127.0.0.1是可以的

aogg commented 2 years ago

wget -O - http://172.17.0.2:8898/

这个错在哪里, 127.0.0.1是可以的

aogg commented 2 years ago

bash-5.1# n2 start [i] nohost@0.6.0 started [i] use your device to visit the following URL list, gets the IP of the URL you can access: http://127.0.0.1:8080/ http://172.17.0.2:8080/ Note: If all the above URLs are unable to access, check the firewall settings For help see https://nohost.pro/ bash-5.1# bash-5.1# wget -O - http://172.17.0.2:8080/ Connecting to 172.17.0.2:8080 (172.17.0.2:8080) writing to stdout

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
  <link rel="shortcut icon" href="favicon.ico" />

这个成功了,-p果然有bug啊

avwo commented 2 years ago

默认是监听所有网卡,可能172.17.0.2:8080 被占用了,或某些原因监听不上,可以试试:

n2 -p " 172.17.0.2:8898" -o 172.17.0.2 start
avwo commented 2 years ago

Nohost 版本可以更新下

aogg commented 2 years ago

image

aogg commented 2 years ago

估计是版本问题