Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44fd5f767b | |||
| 9135033dfd | |||
| b1a61584b1 | |||
| b2a0ccfe02 | |||
| 590f6871af | |||
| 282a24b8fc | |||
| af1d34a762 |
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Download frontend build artifact
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: frontend_dist
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
name: Release S-UI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
- '**.sh'
|
||||
- '**.go'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 's-ui.service'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -102,8 +111,15 @@ jobs:
|
||||
- name: Package
|
||||
run: tar -zcvf s-ui-linux-${{ matrix.platform }}.tar.gz s-ui
|
||||
|
||||
- name: Upload files to Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: s-ui-linux-${{ matrix.platform }}
|
||||
path: ./s-ui-linux-${{ matrix.platform }}.tar.gz
|
||||
|
||||
- name: Upload
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.ref }}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.3.1
|
||||
1.3.2
|
||||
+1
-1
Submodule frontend updated: 3893bc1933...7d3af4a0dd
@@ -69,7 +69,7 @@ elif [[ "${release}" == "rocky" ]]; then
|
||||
if [[ ${os_version} -lt 9 ]]; then
|
||||
echo -e "${red} Please use Rocky Linux 9 or higher ${plain}\n" && exit 1
|
||||
fi
|
||||
elif [[ "${release}" == "oracle" ]]; then
|
||||
elif [[ "${release}" == "ol" ]]; then
|
||||
if [[ ${os_version} -lt 8 ]]; then
|
||||
echo -e "${red} Please use Oracle Linux 8 or higher ${plain}\n" && exit 1
|
||||
fi
|
||||
|
||||
@@ -25,6 +25,9 @@ var defaultConfig = `{
|
||||
},
|
||||
"route": {
|
||||
"rules": [
|
||||
{
|
||||
"action": "sniff"
|
||||
},
|
||||
{
|
||||
"protocol": [
|
||||
"dns"
|
||||
|
||||
+30
-5
@@ -7,6 +7,7 @@ import (
|
||||
"s-ui/database/model"
|
||||
"s-ui/service"
|
||||
"s-ui/util"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const defaultJson = `
|
||||
@@ -128,12 +129,36 @@ func (j *JsonService) getOutbounds(clientConfig json.RawMessage, inbounds []*mod
|
||||
return nil, nil, err
|
||||
}
|
||||
protocol, _ := outbound["type"].(string)
|
||||
config, _ := configs[protocol].(map[string]interface{})
|
||||
for key, value := range config {
|
||||
if key == "name" || key == "alterId" || (key == "flow" && inData.TlsId == 0) {
|
||||
continue
|
||||
|
||||
// Shadowsocks
|
||||
if protocol == "shadowsocks" {
|
||||
var userPass []string
|
||||
var inbOptions map[string]interface{}
|
||||
err = json.Unmarshal(inData.Options, &inbOptions)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
method, _ := inbOptions["method"].(string)
|
||||
if strings.HasPrefix(method, "2022") {
|
||||
inbPass, _ := inbOptions["password"].(string)
|
||||
userPass = append(userPass, inbPass)
|
||||
}
|
||||
var pass string
|
||||
if method == "2022-blake3-aes-128-gcm" {
|
||||
pass, _ = configs["shadowsocks16"].(map[string]interface{})["password"].(string)
|
||||
} else {
|
||||
pass, _ = configs["shadowsocks"].(map[string]interface{})["password"].(string)
|
||||
}
|
||||
userPass = append(userPass, pass)
|
||||
outbound["password"] = strings.Join(userPass, ":")
|
||||
} else { // Other protocols
|
||||
config, _ := configs[protocol].(map[string]interface{})
|
||||
for key, value := range config {
|
||||
if key == "name" || key == "alterId" || (key == "flow" && inData.TlsId == 0) {
|
||||
continue
|
||||
}
|
||||
outbound[key] = value
|
||||
}
|
||||
outbound[key] = value
|
||||
}
|
||||
|
||||
var addrs []map[string]interface{}
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ func shadowsocksLink(
|
||||
var links []string
|
||||
for _, addr := range addrs {
|
||||
port, _ := addr["server_port"].(float64)
|
||||
links = append(links, fmt.Sprintf("%s@%s:%d", uriBase, addr["server"].(string), uint(port)))
|
||||
links = append(links, fmt.Sprintf("%s@%s:%d#%s", uriBase, addr["server"].(string), uint(port), addr["remark"].(string)))
|
||||
}
|
||||
return links
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ func FillOutJson(i *model.Inbound, hostname string) error {
|
||||
case "http", "socks", "mixed", "anytls":
|
||||
case "shadowsocks":
|
||||
shadowsocksOut(&outJson, *inbound)
|
||||
return nil
|
||||
case "shadowtls":
|
||||
shadowTlsOut(&outJson, *inbound)
|
||||
case "hysteria":
|
||||
|
||||
Reference in New Issue
Block a user