-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize change proxy Optimize network check Fix fallback issues Optimize lots of details
- Loading branch information
Showing
96 changed files
with
5,782 additions
and
2,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Clash.Meta
updated
5 files
+4 −0 | adapter/adapter.go | |
+5 −0 | adapter/patch.go | |
+0 −3 | adapter/provider/healthcheck.go | |
+0 −4 | adapter/provider/patch.go | |
+1 −8 | hub/route/server.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//go:build !cgo | ||
|
||
package main | ||
|
||
import ( | ||
"encoding/json" | ||
) | ||
|
||
func (action Action) Json() ([]byte, error) { | ||
data, err := json.Marshal(action) | ||
return data, err | ||
} | ||
|
||
func (action Action) callback(data interface{}) bool { | ||
if conn == nil { | ||
return false | ||
} | ||
sendAction := Action{ | ||
Id: action.Id, | ||
Method: action.Method, | ||
Data: data, | ||
} | ||
res, err := sendAction.Json() | ||
if err != nil { | ||
return false | ||
} | ||
_, err = conn.Write(append(res, []byte("\n")...)) | ||
if err != nil { | ||
return false | ||
} | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.