2021-06-24 11:28:08 -04:00
|
|
|
package environment
|
|
|
|
|
|
|
|
import (
|
2022-01-02 10:16:23 -05:00
|
|
|
"github.com/v2fly/v2ray-core/v5/common/environment/filesystemcap"
|
2022-02-06 16:53:15 -05:00
|
|
|
"github.com/v2fly/v2ray-core/v5/features/extension/storage"
|
2022-01-02 10:16:23 -05:00
|
|
|
"github.com/v2fly/v2ray-core/v5/transport/internet"
|
|
|
|
"github.com/v2fly/v2ray-core/v5/transport/internet/tagged"
|
2021-06-24 11:28:08 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
type BaseEnvironmentCapabilitySet interface {
|
|
|
|
FeaturesLookupCapabilitySet
|
|
|
|
LogCapabilitySet
|
|
|
|
}
|
|
|
|
|
|
|
|
type BaseEnvironment interface {
|
|
|
|
BaseEnvironmentCapabilitySet
|
|
|
|
doNotImpl()
|
|
|
|
}
|
|
|
|
|
|
|
|
type SystemNetworkCapabilitySet interface {
|
|
|
|
Dialer() internet.SystemDialer
|
|
|
|
Listener() internet.SystemListener
|
|
|
|
}
|
|
|
|
|
|
|
|
type InstanceNetworkCapabilitySet interface {
|
|
|
|
OutboundDialer() tagged.DialFunc
|
|
|
|
}
|
|
|
|
|
|
|
|
type FeaturesLookupCapabilitySet interface {
|
2022-02-07 17:39:02 -05:00
|
|
|
RequireFeatures() interface{}
|
2021-06-24 11:28:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type LogCapabilitySet interface {
|
2022-02-07 17:39:02 -05:00
|
|
|
RecordLog() interface{}
|
2021-06-24 11:28:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type FileSystemCapabilitySet interface {
|
2021-09-05 10:36:57 -04:00
|
|
|
filesystemcap.FileSystemCapabilitySet
|
2021-06-24 11:28:08 -04:00
|
|
|
}
|
2022-02-06 16:53:15 -05:00
|
|
|
|
|
|
|
type PersistentStorageCapabilitySet interface {
|
|
|
|
PersistentStorage() storage.ScopedPersistentStorage
|
|
|
|
}
|
|
|
|
type TransientStorageCapabilitySet interface {
|
|
|
|
TransientStorage() storage.ScopedTransientStorage
|
|
|
|
}
|