mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-02 11:15:03 +03:00
feat(xray): support the XDRIVE s3 storage service
xray-core 26.10.31 (#7231) added an "s3" XDRIVE service that carries the stream through S3-compatible storage: secrets are AccessKeyID, SecretAccessKey and an optional SessionToken, an "s3" object names the endpoint, region, bucket and pathStyle, and remoteFolder becomes the object prefix. The schema and the shared XDRIVE form offer the service with a field for every S3 key, so an outbound or inbound keeps its storage on save. The save path refused "s3" as an unknown service; it now runs the vendored loader, whose ValidateS3Config would otherwise only fire when the listener starts and stop every inbound. A node refuses a pushed S3 storage like a pushed template one, since its endpoint is any URL the node would dial, including its own panel. Labels in all 14 locales; docs updated in en/fa/ru/zh.
This commit is contained in:
@@ -237,6 +237,17 @@ func ValidateTunWfpBlockLeak(values []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// ValidateXDriveS3 builds an "s3" xdriveSettings object through the vendored loader, which runs
|
||||
// the endpoint, bucket and secret checks xray-core 26.10.31 (#7231) applies to the S3 backend.
|
||||
func ValidateXDriveS3(xdriveSettings []byte) error {
|
||||
c := new(conf.XDriveConfig)
|
||||
if err := json.Unmarshal(xdriveSettings, c); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err := c.Build()
|
||||
return err
|
||||
}
|
||||
|
||||
// validateXhttpDownloadSettings refuses what conf.Build() lets through but the core's XHTTP
|
||||
// dialer panics on at every dial: a downloadSettings block without an address or not on xhttp.
|
||||
func validateXhttpDownloadSettings(settings *serial.TypedMessage) error {
|
||||
|
||||
Reference in New Issue
Block a user