mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-17 08:42:02 +03:00
Add OpenAI Codex Multiplexer service
This commit is contained in:
25
service/ocm/credential_darwin.go
Normal file
25
service/ocm/credential_darwin.go
Normal file
@@ -0,0 +1,25 @@
|
||||
//go:build darwin
|
||||
|
||||
package ocm
|
||||
|
||||
func platformReadCredentials(customPath string) (*oauthCredentials, error) {
|
||||
if customPath == "" {
|
||||
var err error
|
||||
customPath, err = getDefaultCredentialsPath()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return readCredentialsFromFile(customPath)
|
||||
}
|
||||
|
||||
func platformWriteCredentials(credentials *oauthCredentials, customPath string) error {
|
||||
if customPath == "" {
|
||||
var err error
|
||||
customPath, err = getDefaultCredentialsPath()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return writeCredentialsToFile(credentials, customPath)
|
||||
}
|
||||
Reference in New Issue
Block a user