Conversation
gbip
left a comment
There was a problem hiding this comment.
Sorry for the delay, my github notifications were muted ...
I thinks this is a useful feature, however I can not merge this PR as is.
| .and_then(|v| v.to_str().ok()) | ||
| .and_then(|s| s.split(',').next()) | ||
| .and_then(|s| s.trim().parse::<std::net::IpAddr>().ok()) | ||
| .unwrap_or("0.0.0.0".parse::<std::net::IpAddr>().unwrap()) |
There was a problem hiding this comment.
Maybe we could use the request source IP there ?
It could be useful if you were to investigate a broken chain of reverse-proxy where one of them does not propagate 'X-Forwared-For' correctly.
| // Err(AError::new(BodyError::InvalidNumberOfLines)) | ||
| // } | ||
|
|
||
| // Parse line by line until we find the dsn (Max 10 lines) |
There was a problem hiding this comment.
Can you update this comment to match the range line 156.
| } | ||
| } else { | ||
| Err(AError::new(BodyError::MissingDsnKeyInHeader)) | ||
| } |
There was a problem hiding this comment.
Don't you think that we can keep those error types as a way to provide more insights when debugging sentry tunnels ?
| pub raw_body: Vec<u8>, | ||
| pub dsn: Dsn, | ||
| pub is_safe: bool, | ||
| pub user_ip: String, |
There was a problem hiding this comment.
How about making this an Enum representing the various IP that we can have :
- an ip from x-forwarded-for
- the client IP
| dsn, | ||
| raw_body: fullBody, | ||
| is_safe, | ||
| user_ip: String::from("unknown"), |
There was a problem hiding this comment.
Is "unknown" some kind of special value that is handled later ?
Extracted that part from gbip#8
|
Ah, I was wondering why I got errors like |
Extracted that part from gbip#8
extracted from gbip#8
extracted from gbip#8
|
any updates? |
I am not planning on working on this tool in the future month. |
No description provided.