Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thehxdev/xchange
command-line tool to manage Xray-Core's config files from local configs.
https://github.com/thehxdev/xchange
Last synced: about 2 months ago
JSON representation
command-line tool to manage Xray-Core's config files from local configs.
- Host: GitHub
- URL: https://github.com/thehxdev/xchange
- Owner: thehxdev
- Created: 2023-07-08T22:55:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-08T23:16:16.000Z (over 1 year ago)
- Last Synced: 2024-06-20T20:37:53.867Z (7 months ago)
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xChange
[xChange](https://github.com/thehxdev/xchange) is a command-line tool to manage [Xray-Core's](https://github.com/xtls/xray-core) config files from local configs.
## Build form source
The `go` compiler and `git` program must be already installed on your system.
**This tools is only for linux users!**1. Clone the repository
```bash
git clone --depth 1 --branch main https://github.com/thehxdev/xchange.git
cd xchange
```
2. Build source code
```bash
go build .
```## Arguments
- `-dir`: Your Config files directory (default `~/.local/xconfs`)
- `-xconf`: Path to Xray's Config file (default `/etc/xray/config.json`)
- `-myip`: Print you public IP address to `stdout`
- `-tun2socks`: install `tun2socks` executable to `~/.local/bin` (amd64)The default behavior is changing config file. `-myip` and `-tun2socks` are single flags so use one of them at the time.
`-dir` and `-xconf` flags are used to tell the app where local config files are located and where is Xray's main config file. So they are NOT operational flags and you can use them at the same time to specify the correct directory for local configs and correct path for xray config file.### Examples
```bash
xchange -myip #shows your public IP addressxchange -tun2socks #install/update tun2socks (amd64)
# your config pool -> ~/xray-configs
# xray main config -> /etc/xray/config.json
xchange -dir ~/xray-configs -xconf /etc/xray/config.json
```## Roadmap
- [ ] Add VPN-Mode with tun2socks
- [ ] Resolve domain names in Local Configs to IP addresses