Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

脚本怎么用啊,能给个方法吗? #61

Closed
1265578519 opened this issue Aug 18, 2020 · 18 comments
Closed

脚本怎么用啊,能给个方法吗? #61

1265578519 opened this issue Aug 18, 2020 · 18 comments

Comments

@1265578519
Copy link

bash <(curl -L -s https://install.direct/go.sh)

官网这个安装现在不了,从里面的url看到这个项目了

@kslr kslr closed this as completed Aug 18, 2020
@IceCodeNew
Copy link
Collaborator

IceCodeNew commented Aug 18, 2020

有空请多阅读下《提问的智慧》。
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

@IceCodeNew IceCodeNew pinned this issue Aug 18, 2020
@1265578519
Copy link
Author

@IceCodeNew 谢谢,我花点时间研究下它,这改动太糟糕了

@1265578519
Copy link
Author

image

应该是这个,我尝试下
bash <(curl https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

@1265578519
Copy link
Author

1265578519 commented Aug 18, 2020

@IceCodeNew /etc/v2ray/config.json 我安装后找不到配置文件,你能帮帮我吗?
image
/usr/local/etc/ 目录下也是空的
image

可以看到程序成功启用了,但是没有配置文件,安装后没有显示端口和ID,我不知道该如何连接
image

@IceCodeNew
Copy link
Collaborator

IceCodeNew commented Aug 18, 2020

不要把 issue 当成聊天一样的用,还有贴错误日志的时候用 ``` 比截图更加友好。

遇到问题先
journalctl --boot -u v2ray
V2RAY_LOCATION_ASSET=/usr/local/share/v2ray/ v2ray -test -confdir /usr/local/etc/v2ray/
ls -alF --color=auto /usr/local/etc/v2ray
systemd-analyze cat-config /etc/systemd/system/v2ray.service
systemd-analyze verify /etc/systemd/system/v2ray.service
五连,把输出用 ``` 包裹起来发上来。

@1265578519
Copy link
Author

1265578519 commented Aug 18, 2020

我卸载重装了它,还是没找到配置文件无法使用

[root@VM-0-16-centos ~]# journalctl --boot -u v2ray
-- Logs begin at Tue 2020-08-18 21:37:28 CST, end at Tue 2020-08-18 22:28:20 CST. --
Aug 18 22:12:12 VM-0-16-centos systemd[1]: Started V2Ray Service.
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: V2Ray 4.27.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.14.6 linux/amd64)
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: A unified platform for anti-censorship.
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: 2020/08/18 22:12:12 Using confdir from arg: /usr/local/etc/v2ray/
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: 2020/08/18 22:12:12 [Info] v2ray.com/core/common/platform/ctlcmd: <v2ctl message>
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/00_log.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/01_api.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/02_dns.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/03_routing.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/04_policy.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/05_inbounds.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/06_outbounds.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/07_transport.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/08_stats.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: v2ctl> Read config:  /usr/local/etc/v2ray/09_reverse.json
Aug 18 22:12:12 VM-0-16-centos v2ray[4317]: 2020/08/18 22:12:12 [Warning] v2ray.com/core: V2Ray 4.27.0 started
Aug 18 22:26:21 VM-0-16-centos systemd[1]: Stopping V2Ray Service...
Aug 18 22:26:21 VM-0-16-centos systemd[1]: Stopped V2Ray Service.
[root@VM-0-16-centos ~]# V2RAY_LOCATION_ASSET=/usr/local/share/v2ray/ v2ray -test -confdir /usr/local/etc/v2ray/
V2Ray 4.27.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.14.6 linux/amd64)
A unified platform for anti-censorship.
2020/08/18 22:28:21 Using confdir from arg: /usr/local/etc/v2ray/
Configuration OK.
[root@VM-0-16-centos ~]# ls -alF --color=auto /usr/local/etc/v2ray
total 48
drwxr-xr-x  2 root root 4096 Aug 18 22:09 ./
drwxr-xr-x. 3 root root 4096 Aug 18 22:09 ../
-rw-r--r--  1 root root    3 Aug 18 22:09 00_log.json
-rw-r--r--  1 root root    3 Aug 18 22:09 01_api.json
-rw-r--r--  1 root root    3 Aug 18 22:09 02_dns.json
-rw-r--r--  1 root root    3 Aug 18 22:09 03_routing.json
-rw-r--r--  1 root root    3 Aug 18 22:09 04_policy.json
-rw-r--r--  1 root root    3 Aug 18 22:09 05_inbounds.json
-rw-r--r--  1 root root    3 Aug 18 22:09 06_outbounds.json
-rw-r--r--  1 root root    3 Aug 18 22:09 07_transport.json
-rw-r--r--  1 root root    3 Aug 18 22:09 08_stats.json
-rw-r--r--  1 root root    3 Aug 18 22:09 09_reverse.json
[root@VM-0-16-centos ~]# 

@1265578519
Copy link
Author

1265578519 commented Aug 18, 2020

bash <(curl -L -s http://mg.cd-sw.com/v2/go.sh)
群里一位朋友给了我新的v2ray安装url,我成功安装了,已经可以正常连接并使用4.27最新版本,如果你能帮助我解决配置文件问题的话,希望你能回复一下

[root@VM-0-16-centos ~]# bash <(curl -L -s http://mg.cd-sw.com/v2/go.sh)
Installing V2Ray v4.27.0 on x86_64
Downloading V2Ray: http://mg.cd-sw.com/v2/v2ray-linux-64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12.2M  100 12.2M    0     0  2541k      0  0:00:04  0:00:04 --:--:-- 3045k
Archive:  /tmp/v2ray/v2ray.zip
  inflating: /usr/bin/v2ray/geoip.dat  
  inflating: /usr/bin/v2ray/geosite.dat  
  inflating: /usr/bin/v2ray/v2ctl    
  inflating: /usr/bin/v2ray/v2ray    
PORT:21668
UUID:2c51f283-a1d9-4d13-93a5-dd3a2c3101b7
Archive:  /tmp/v2ray/v2ray.zip
  inflating: /etc/systemd/system/v2ray.service  
V2Ray v4.27.0 is installed.
[root@VM-0-16-centos ~]# 

@IceCodeNew
Copy link
Collaborator

[root@VM-0-16-centos ~]# ls -alF --color=auto /usr/local/etc/v2ray
total 48
drwxr-xr-x 2 root root 4096 Aug 18 22:09 ./
drwxr-xr-x. 3 root root 4096 Aug 18 22:09 ../
-rw-r--r-- 1 root root 3 Aug 18 22:09 00_log.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 01_api.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 02_dns.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 03_routing.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 04_policy.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 05_inbounds.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 06_outbounds.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 07_transport.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 08_stats.json
-rw-r--r-- 1 root root 3 Aug 18 22:09 09_reverse.json
[root@VM-0-16-centos ~]#

你说你刚刚卸载重装?可是这输出明显不对劲。
安装脚本已经更新,你新执行安装脚本的时候只会安装单配置文件了。

@IceCodeNew
Copy link
Collaborator

你能帮助我解决配置文件问题的话,希望你能回复一下

配置文件的问题你不应该在这个地方问,这里只管你遇到的安装脚本使用问题。
请转到 v2fly/v2ray-core 提 issue 表述你在配置文件上遇到的问题,并提请您注意遵守问题模板。

@1265578519
Copy link
Author

是,我使用--remove卸载了,重新再次运行了安装命令,还是没有出现配置文件,我购买的服务器是centos 7.6.1810的操作系统

@IceCodeNew
Copy link
Collaborator

fhs-install-v2ray 从一开始创建的配置文件就是空的,不会像现在已经被废除的旧安装脚本那样为用户创建一套开箱即用的配置。
我认为 v2ray 这样的项目确实也没有默认配置可言,请用户不要再将这件事作为 bug 提交上来,你们既然选择自建,就应该自己写自己的配置了。
过程中遇到任何问题,请参阅 v2fly.org。

@1265578519
Copy link
Author

@IceCodeNew 配置文件需要写在哪里路径呢?文档中都没有任何说明,配置文件肯定会写,问题写在哪才能让它生效?如何加载配置文件?

@IceCodeNew
Copy link
Collaborator

@IceCodeNew 配置文件需要写在哪里路径呢?文档中都没有任何说明,配置文件肯定会写,问题写在哪才能让它生效?如何加载配置文件?

有空请多阅读下《提问的智慧》。
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

你的第一、第二个句子语序都有问题,我看不出你到底想说什么。

如何加载配置文件?

v2ray.service 会负责启动程序并加载配置文件。

@1265578519
Copy link
Author

@IceCodeNew 我看完了提问的智慧,求你了,你能告诉我配置文件应该放在哪吗?

@IceCodeNew
Copy link
Collaborator

IceCodeNew commented Aug 18, 2020

@IceCodeNew 我看完了提问的智慧,求你了,你能告诉我配置文件应该放在哪吗?

不能


你遇到的问题是配置文件为空,然后我在 #61 (comment) 这里回复告知你这个默认产生的配置文件本来就是空的。
那现在解决问题的思路不就是自己把这个空的配置文件填充上内容吗?你直接编辑 /usr/local/etc/v2ray/config.json 不就完了。

你说你看完了提问的智慧,那请问你的功课做在哪儿了?

低声下气不能代替你的功课

去掉无意义的提问句

一般来说,避免用 是或否、对或错、有或没有类型的问句,除非你想得到是或否类型的回答。

RTFM

@1265578519
Copy link
Author

1265578519 commented Aug 18, 2020

终于解决了,感谢群里朋友的帮助,提供了配置文件路径在/usr/local/etc/v2ray/config.json 在你提供的v2ray文档中并没有任何说明,之前我尝试/etc/v2ray/config.json 也不生效,/usr/local/etc/ 目录下也不存在
kslr 官方人员说config.json=00_log.json 让我把自己写的config.json配置文件信息重命名成00_log.json 我试了还是不行
现在用/usr/local/etc/v2ray/config.json 终于成功能用了
image

感谢群里这位朋友的帮助 终于解决了这脚本的问题
image

@xqzr
Copy link

xqzr commented Aug 18, 2020

解决就好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants