https://github.com/gui-for-cores/gui-sync
sync configuration
https://github.com/gui-for-cores/gui-sync
Last synced: about 1 month ago
JSON representation
sync configuration
- Host: GitHub
- URL: https://github.com/gui-for-cores/gui-sync
- Owner: GUI-for-Cores
- License: gpl-3.0
- Created: 2024-04-09T06:26:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-02T14:06:13.000Z (3 months ago)
- Last Synced: 2025-04-12T20:52:38.262Z (about 1 month ago)
- Language: Go
- Size: 23.4 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gui-sync
Synchronization configuration, supports `GUI.for.Clash` and `GUI.for.SingBox`.
## How to use
Prerequisites: A server: Windows or Linux
1、Download the program from the Release page to the server.
2、Run
```bash
# http
GUI-Sync --address 0.0.0.0 --port 8080 --token "A unique string"# https
openssl req -new -nodes -x509 -out server.crt -keyout server.key -days 3650 -subj "/C=CN/ST=SH/L=SH/O=GUI.for.Cores/OU=GUI.for.Cores Software/CN=127.0.0.1/emailAddress=gui-for-cores.github.io"
GUI-Sync --address 0.0.0.0 --port 8080 --token "A unique string" --cert serer.crt --key server.key
```Note: The `token` needs to be consistent with the client.
## Directory Structure
The file storage structure is as follows:
```bash
data/
├── gfc
│ ├── id1.json
│ └── id2.json
└── gfs
└── id1.json
```## API
1、Query backup list using tag
```bash
GET /backup?tag=tag1Authorization: Bearer token
User-Agent: GUI.for.Cores
```Return data format
```json
["id1", "id2", "id3"]
```2、Delete backup using tag and ids
```bash
DELETE /backup?tag=tag1&ids=id1,id2,id3Authorization: Bearer token
User-Agent: GUI.for.Cores
```3、Add backup using tag, id and files
```bash
POST /backupAuthorization: Bearer token
User-Agent: GUI.for.Cores{
"id": "id1",
"tag": "tag1",
"files": {
"file1": "file content",
"file2": "file content",
"file3": "file content"
}
}
```4、Query backup details using tag and id
```bash
GET /sync?tag=tag1&id=id1Authorization: Bearer token
User-Agent: GUI.for.Cores
```Return data format
```json
{
"id": "id1",
"tag": "tag1",
"files": {
"file1": "file content",
"file2": "file content",
"file3": "file content"
}
}
```