Comments (6)
如果这些固定命令的话,直接使用也没有什么区别的吧
from v2ray-step-by-step.
- 使用 v2ray 用戶的話:
即可,也可直接使用 nobody 用戶。
# useradd -s /usr/sbin/nologin v2ray
- 這個沒有問題。
- 修改為 644 或許可行,使用者擁有讀寫權限,群組和非本群組外的其它人擁有只讀權限。
from v2ray-step-by-step.
使用 v2ray 用戶的話:
# useradd -s /usr/sbin/nologin v2ray
即可,也可直接使用 nobody 用戶。
這個沒有問題。
修改為 644 或許可行,使用者擁有讀寫權限,群組和非本群組外的其它人擁有只讀權限。
nobody是系统用户,等同于使用--system创建的用户,是吧?
from v2ray-step-by-step.
使用 v2ray 用戶的話:
# useradd -s /usr/sbin/nologin v2ray
即可,也可直接使用 nobody 用戶。
這個沒有問題。
修改為 644 或許可行,使用者擁有讀寫權限,群組和非本群組外的其它人擁有只讀權限。
nobody是系统用户,等同于使用--system创建的用户,是吧?
nobody 不是系統賬戶。無需在意是否為系統賬戶,使用 -r, --system
,僅會造成 uid、gid 和 groups 的區別。
from v2ray-step-by-step.
使用 v2ray 用戶的話:
# useradd -s /usr/sbin/nologin v2ray
即可,也可直接使用 nobody 用戶。
這個沒有問題。
修改為 644 或許可行,使用者擁有讀寫權限,群組和非本群組外的其它人擁有只讀權限。
nobody是系统用户,等同于使用--system创建的用户,是吧?
nobody 不是系統賬戶。無需在意是否為系統賬戶,使用
-r, --system
,僅會造成 uid、gid 和 groups 的區別。
了解了,谢谢!
from v2ray-step-by-step.
- 使用腳本生成v2ray.service,可以自動適配不同OS版本的路徑。
ds_service=$(mktemp)
cat > ${ds_service} <<-EOF
[Unit]
Description=V2Ray - A unified platform for anti-censorship
Documentation=https://v2ray.com https://guide.v2fly.org
After=network.target nss-lookup.target
Wants=network-online.target
[Service]
# If the version of systemd is 240 or above, then uncommenting Type=exec and commenting out Type=simple
#Type=exec
Type=simple
# Runs as root or add CAP_NET_BIND_SERVICE ability can bind 1 to 1024 port.
# This service runs as root. You may consider to run it as another user for security concerns.
# By uncommenting User=v2ray and commenting out User=root, the service will run as user v2ray.
# More discussion at https://github.com/v2ray/v2ray-core/issues/1011
#User=root
User=v2ray
CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_NET_RAW
NoNewPrivileges=yes
ExecStartPre=$(which mkdir) -p /tmp/v2ray-ds
ExecStartPre=$(which rm) -rf /tmp/v2ray-ds/*.sock
ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json
ExecStartPost=$(which sleep) 1
ExecStartPost=$(which chmod) 777 /tmp/v2ray-ds/v2ray.sock
Restart=on-failure
# Don't restart in the case of configuration error
RestartPreventExitStatus=23
[Install]
WantedBy=multi-user.target
EOF
# add new user and overwrite v2ray.service
# https://github.com/v2ray/v2ray-core/issues/1011
useradd -d /etc/v2ray/ -M -s /sbin/nologin v2ray
mv ${ds_service} /etc/systemd/system/v2ray.service
chown -R v2ray:v2ray /var/log/v2ray
- 試過將權限改成644,會導致TLS分流器沒有辦法讀寫
/tmp/v2ray-ds/v2ray.sock
。
from v2ray-step-by-step.
Related Issues (20)
- [feature] 增加 gRPC + TLS + Web 配置 HOT 1
- 只在必要时使用代理,怎么设置?
- [bug] 透明代理无法访问内网地址 HOT 4
- [bug]
- [bug] MTPROXY在OUTPUT链上应用规则导致外网无法访问
- [bug] 按步骤配置服务器后客户端连接失败
- [bug] 在最新的 V2ray 版本中,其配置文件里的 AlterID 应被置 0 HOT 1
- 主路由设置透明代理后,从外网不可到达在路由上设置的端口转发。 HOT 4
- [bug] 客户端代理转发配置无效
- 【提问】请问v2能实现 反-反向代理吗(异地局域网代理)?
- [feature] 关于反向代理2里的interconn、tunnel、portal的说明
- [bug] 升级到v5.1.0后traffic.sh运行不了了 HOT 1
- V2ray 只能PC端使用,移动端可以连接,但是无法使用,请问可能是什么问题
- [bug] CI 不再工作 HOT 1
- 建议在“Docker 部署 V2Ray”章节添加提示不要仅监听本机
- V2RAY是否支持把DNS解析转发到服务器,由服务器解析以后把结果发回来? HOT 1
- 为什么转发至tproxy时必须要打标记。 HOT 1
- 启动haproxy后报错ssl-default-bind-ciphersuites未识别的关键字,屏蔽掉后能启动但是客户端无法上网
- 同一个域名解析到多个ip节点后是否支持?
- 请问多台设备能否通过搭建的代理使用不同的vpn节点?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v2ray-step-by-step.