Skip to content

Commit

Permalink
only use proxy for tcp in packetgen job
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Mar 31, 2022
1 parent 9ef2c3b commit 0d22de2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions examples/config/advanced/packetgen-udp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
jobs:
- type: packetgen
args:
connection:
type: net
args:
protocol: "udp"
address: "localhost:1234"
packet:
application:
type: raw
data:
payload: "test"
2 changes: 1 addition & 1 deletion src/job/packetgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func parsePacketgenArgs(ctx context.Context, logger *zap.Logger, globalConfig *G
return nil, fmt.Errorf("error parsing packet: %w", err)
}

if globalConfig.ProxyURLs != "" {
if globalConfig.ProxyURLs != "" && jobConfig.Connection.Args["protocol"] == "tcp" {
jobConfig.Connection.Args["proxy_urls"] = templates.ParseAndExecute(logger, globalConfig.ProxyURLs, ctx)
}

Expand Down

0 comments on commit 0d22de2

Please sign in to comment.