Compare commits

...

7 Commits

Author SHA1 Message Date
Alireza Ahmadi 44fd5f767b v1.3.2 2025-08-07 12:44:12 +02:00
Alireza Ahmadi 9135033dfd fix s-ui script on oracle linux #680 2025-08-07 10:09:08 +02:00
Alireza Ahmadi b1a61584b1 Merge pull request #712 from alireza0/dependabot/github_actions/actions/download-artifact-5
Bump actions/download-artifact from 4 to 5
2025-08-07 00:44:48 +02:00
Alireza Ahmadi b2a0ccfe02 fix ss in json sub 2025-08-07 00:35:12 +02:00
Alireza Ahmadi 590f6871af fix remark on ss link 2025-08-07 00:34:30 +02:00
Alireza Ahmadi 282a24b8fc add sniff in default routing rule #708 2025-08-07 00:16:58 +02:00
dependabot[bot] af1d34a762 Bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 17:01:52 +00:00
9 changed files with 57 additions and 14 deletions
+1 -1
View File
@@ -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
+19 -3
View File
@@ -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
View File
@@ -1 +1 @@
1.3.1
1.3.2
+1 -1
View File
@@ -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
+3
View File
@@ -26,6 +26,9 @@ var defaultConfig = `{
"route": {
"rules": [
{
"action": "sniff"
},
{
"protocol": [
"dns"
],
+25
View File
@@ -7,6 +7,7 @@ import (
"s-ui/database/model"
"s-ui/service"
"s-ui/util"
"strings"
)
const defaultJson = `
@@ -128,6 +129,29 @@ func (j *JsonService) getOutbounds(clientConfig json.RawMessage, inbounds []*mod
return nil, nil, err
}
protocol, _ := outbound["type"].(string)
// 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) {
@@ -135,6 +159,7 @@ func (j *JsonService) getOutbounds(clientConfig json.RawMessage, inbounds []*mod
}
outbound[key] = value
}
}
var addrs []map[string]interface{}
err = json.Unmarshal(inData.Addrs, &addrs)
+1 -1
View File
@@ -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
}
-1
View File
@@ -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":