pub enum Action {
Show 30 variants
Drop,
Abort,
Delay {
ms: u64,
},
Throttle {
kbps: u64,
},
Tag {
key: String,
value: String,
},
Inspect,
SetVariable {
name: String,
value: String,
},
RateLimit {
key: String,
limit: u32,
window_ms: u64,
},
RedirectIp {
target: String,
},
SetTtl {
ttl: u8,
},
ForwardPort {
target_host: String,
target_port: u16,
},
MockResponse {
status: u16,
headers: HashMap<String, String>,
body: Option<BodySource>,
},
MapLocal {
path: String,
content_type: Option<String>,
},
MapRemote {
url: String,
preserve_host: bool,
},
Redirect {
location: String,
status: u16,
},
AddRequestHeader {
name: String,
value: String,
},
UpdateRequestHeader {
name: String,
value: String,
add_if_missing: bool,
},
DeleteRequestHeader {
name: String,
},
AddResponseHeader {
name: String,
value: String,
},
UpdateResponseHeader {
name: String,
value: String,
add_if_missing: bool,
},
DeleteResponseHeader {
name: String,
},
SetRequestMethod {
method: String,
},
SetRequestUrl {
url: String,
},
SetRequestBody {
body: BodySource,
},
SetResponseStatus {
status: u16,
},
SetResponseBody {
body: BodySource,
},
TransformRequestBody {
transform: BodyTransform,
},
TransformResponseBody {
transform: BodyTransform,
},
MockWebSocketMessage {
direction: WebSocketDirection,
message: String,
},
DropWebSocketMessage,
}Variants§
Drop
Drop the connection immediately
Abort
Abort the connection (RST)
Delay
Delay execution (Latency Simulation)
Throttle
Throttle bandwidth
Tag
Tag for subsequent processing/stats
Inspect
Pause the flow for manual inspection/intervention (e.g., in GUI)
SetVariable
Set a variable for use in subsequent actions (Fluxzy-style)
RateLimit
Rate limit traffic based on a key
Fields
RedirectIp
SetTtl
ForwardPort
MockResponse
MapLocal
MapRemote
Redirect
AddRequestHeader
Add a header (Appends if exists, useful for multi-value headers like Set-Cookie)
UpdateRequestHeader
Update an existing header (Supports {{previous}} variable) If add_if_missing is true, creates it if not found.
DeleteRequestHeader
Delete a header
AddResponseHeader
UpdateResponseHeader
DeleteResponseHeader
SetRequestMethod
SetRequestUrl
SetRequestBody
Fields
§
body: BodySourceSetResponseStatus
SetResponseBody
Fields
§
body: BodySourceTransformRequestBody
Fields
§
transform: BodyTransformTransformResponseBody
Fields
§
transform: BodyTransformMockWebSocketMessage
DropWebSocketMessage
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more