mirror of
https://github.com/XTLS/Xray-install.git
synced 2025-12-10 02:09:52 +00:00
Add Alpine Linux (#86)
* Initial commit * Testable * Add description * Instruction revision * Fix wrong content * Fix environment variables * Correct variable location * Content adjustment * More precise content * Replace '[[' with '[' * Fix mistakes * Correct the output * Fix case conversion * Basically available * Variable correction * Complete basic revision * Fix mistakes * Fix the source of log files * Make script more compatible and fails fast * Update download link to v2fly and fix #2 Issue (#3) * Update download link to v2fly. * Update "Identify architecture" * Fix Line 56 variable name * Try to fix verification_v2ray * improve detect arm without vfp * feat: install Xray-core * docs: add English and Chinese Simplified * Fix SHA * Update install-release.sh 修改路径,跟https://github.com/XTLS/Xray-install保持一致 * Update xray * Rewrite OpenRC * cap: daemon with ambient and inheritable * Fix README * Use tab * Fix README * respawn period * Fix README * daemon: 3 panic in 10 minutes stops service * README: rename files * README: rename * Migration: modify the path to fit this repo * Migration: merge license * Alpine: Fix shebang * Alpine: check alpine * Alpine: check root * Alpine: refactor code related to architecture identification * Alpine: shellcheck * Alpine: shellcheck SC2181 * Alpine: shellcheck SC2002 * Alpine: Move global variable to main function to fix runtime error after refactoring * Alpine: Hide debug information * Alpine: Enhance script usability - Add necessary user prompts for better feedback - Exit on failure of rc service installation - Reduce permissions for geoip and geosite files - Rename install_software to install_dependencies * Alpine: Add HTTP error handling to all curl commands * README.md: Add Chinese translations * README.md: Add link to Alpine Linux README for specific instructions * Alpine README.md: Clarify content to remove ambiguity --------- Co-authored-by: Dct Mei <dctxmei@gmail.com> Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Co-authored-by: Kslr <kslrwang@gmail.com> Co-authored-by: Elvis Wang <me@elvisw.com> Co-authored-by: 秋のかえで <autmaple@protonmail.com> Co-authored-by: Markson Hon <50002150+MarksonHon@users.noreply.github.com> Co-authored-by: winds365 <winds365@live.com>
This commit is contained in:
78
alpinelinux/README.md
Normal file
78
alpinelinux/README.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# Xray-install for Alpine Linux
|
||||
|
||||
English | [简体中文](README_zh-Hans.md) | [繁體中文](README_zh-Hant.md)
|
||||
|
||||
## Install Xray
|
||||
|
||||
#### Install cURL
|
||||
|
||||
```sh
|
||||
apk add curl
|
||||
```
|
||||
|
||||
#### Download Installation Script
|
||||
|
||||
```sh
|
||||
curl -O https://raw.githubusercontent.com/XTLS/Xray-install/main/alpinelinux/install-release.sh
|
||||
```
|
||||
|
||||
#### Run Installation Script
|
||||
|
||||
```sh
|
||||
ash install-release.sh
|
||||
```
|
||||
|
||||
## Management Commands
|
||||
|
||||
#### Enable Xray Service (Auto-start on Boot)
|
||||
|
||||
```sh
|
||||
rc-update add xray
|
||||
```
|
||||
|
||||
#### Disable Xray Service (Remove from Auto-start)
|
||||
|
||||
```sh
|
||||
rc-update del xray
|
||||
```
|
||||
|
||||
#### Start Xray
|
||||
|
||||
```sh
|
||||
rc-service xray start
|
||||
```
|
||||
|
||||
#### Stop Xray
|
||||
|
||||
```sh
|
||||
rc-service xray stop
|
||||
```
|
||||
|
||||
#### Restart Xray
|
||||
|
||||
```sh
|
||||
rc-service xray restart
|
||||
```
|
||||
|
||||
## Breaking Changes at 2025-04-09
|
||||
|
||||
#### Path Change: Original path `/usr/local/lib/xray/` has been updated to new path `/usr/local/share/xray/`
|
||||
|
||||
- This directory contains `geosite.dat` and `geoip.dat`
|
||||
- If you have scripts to automatically update these files, please adjust them accordingly
|
||||
- Regular users can ignore this change
|
||||
|
||||
#### Watchdog: Xray process will now automatically restart indefinitely (every 5 seconds) upon panic, unless it panic 3 times in 10 minutes
|
||||
|
||||
- Advanced users no longer need to manually modify `/etc/init.d/xray` or write custom daemon scripts
|
||||
- Regular users can ignore this change
|
||||
|
||||
#### No `root` Required: Xray now retains privileges (capabilities) to support `tproxy` and `sockopt` even when running as `nobody`
|
||||
|
||||
- Advanced users **should not** (and need not) run Xray as `root` anymore — it already has all required network privileges
|
||||
- If you run Xray as a **server** (not client), you _may_ optionally run the command below to reduce capabilities. This theoretically minimizes attack surface but has negligible practical impact
|
||||
- Regular users can ignore this change
|
||||
|
||||
```sh
|
||||
sed -i 's/^capabilities="^cap_net_bind_service,^cap_net_admin,^cap_net_raw"$/capabilities="^cap_net_bind_service"/g' /etc/init.d/xray
|
||||
```
|
||||
Reference in New Issue
Block a user