mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-14 17:15:24 +03:00
Compare commits
2 Commits
v3.4.2
..
49773c18de
| Author | SHA1 | Date | |
|---|---|---|---|
| 49773c18de | |||
| 427613b308 |
@@ -30,7 +30,8 @@ jobs:
|
|||||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
allowed_non_write_users: "*"
|
allowed_non_write_users: "*"
|
||||||
claude_args: |
|
claude_args: |
|
||||||
--model claude-sonnet-4-6
|
--model claude-sonnet-5
|
||||||
|
--effort xhigh
|
||||||
--max-turns 300
|
--max-turns 300
|
||||||
--allowedTools "Bash(gh:*),Read,Glob,Grep"
|
--allowedTools "Bash(gh:*),Read,Glob,Grep"
|
||||||
prompt: |
|
prompt: |
|
||||||
@@ -282,7 +283,8 @@ jobs:
|
|||||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
allowed_non_write_users: "*"
|
allowed_non_write_users: "*"
|
||||||
claude_args: |
|
claude_args: |
|
||||||
--model claude-opus-4-8
|
--model claude-sonnet-5
|
||||||
|
--effort max
|
||||||
--max-turns 250
|
--max-turns 250
|
||||||
--allowedTools "Bash(gh:*),Bash(git:*),Read,Glob,Grep"
|
--allowedTools "Bash(gh:*),Bash(git:*),Read,Glob,Grep"
|
||||||
prompt: |
|
prompt: |
|
||||||
@@ -500,7 +502,8 @@ jobs:
|
|||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
claude_args: |
|
claude_args: |
|
||||||
--model claude-opus-4-8
|
--model claude-sonnet-5
|
||||||
|
--effort max
|
||||||
--max-turns 250
|
--max-turns 250
|
||||||
--allowedTools "Bash(gh:*),Bash(git:*),Read,Glob,Grep,Edit,Write"
|
--allowedTools "Bash(gh:*),Bash(git:*),Read,Glob,Grep,Edit,Write"
|
||||||
--append-system-prompt "You are replying to an @claude mention in the MHSanaei/3x-ui repository, an open-source web panel for managing Xray-core servers. The full repo source is checked out in the working directory; use Read, Glob and Grep to open and verify the relevant files before stating any default, path, flag, option name, or behavior.
|
--append-system-prompt "You are replying to an @claude mention in the MHSanaei/3x-ui repository, an open-source web panel for managing Xray-core servers. The full repo source is checked out in the working directory; use Read, Glob and Grep to open and verify the relevant files before stating any default, path, flag, option name, or behavior.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
.cursor/
|
.cursor/
|
||||||
.claude/
|
.claude/*
|
||||||
.cache/
|
.cache/
|
||||||
.sync*
|
.sync*
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,10 @@ func diffInbounds(oldCfg, newCfg *Config, diff *HotDiff) bool {
|
|||||||
if oldIb.Tag == apiTag || oldIb.Tag == "api" {
|
if oldIb.Tag == apiTag || oldIb.Tag == "api" {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if exists && (inboundHasReverseClient(oldIb) || inboundHasReverseClient(newIb)) {
|
||||||
|
logger.Debug("hot diff: inbound [", oldIb.Tag, "] carries a reverse-tagged client, forcing a full restart instead of a hot swap")
|
||||||
|
return false
|
||||||
|
}
|
||||||
diff.RemovedInboundTags = append(diff.RemovedInboundTags, oldIb.Tag)
|
diff.RemovedInboundTags = append(diff.RemovedInboundTags, oldIb.Tag)
|
||||||
if exists {
|
if exists {
|
||||||
raw, err := json.Marshal(newIb)
|
raw, err := json.Marshal(newIb)
|
||||||
@@ -134,6 +138,31 @@ func diffInbounds(oldCfg, newCfg *Config, diff *HotDiff) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func inboundHasReverseClient(ib *InboundConfig) bool {
|
||||||
|
if ib == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
var settings struct {
|
||||||
|
Clients []struct {
|
||||||
|
Reverse json.RawMessage `json:"reverse"`
|
||||||
|
} `json:"clients"`
|
||||||
|
}
|
||||||
|
if err := json.Unmarshal(ib.Settings, &settings); err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for _, c := range settings.Clients {
|
||||||
|
if len(c.Reverse) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var tag any
|
||||||
|
if err := json.Unmarshal(c.Reverse, &tag); err != nil || tag == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// diffOutbounds fills diff with outbound removals/additions keyed by tag.
|
// diffOutbounds fills diff with outbound removals/additions keyed by tag.
|
||||||
// The first outbound is xray's default handler and the API can only append,
|
// The first outbound is xray's default handler and the API can only append,
|
||||||
// so any change to its identity or content forces a restart. Reordering of
|
// so any change to its identity or content forces a restart. Reordering of
|
||||||
|
|||||||
Reference in New Issue
Block a user