Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display remote address in metadata #348

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

zuisong
Copy link
Contributor

@zuisong zuisong commented Jan 17, 2024

implement proposal #347

example output

❯ cargo run -- httpbin.org/get -vv
   Compiling xh v0.20.1 (/Users/chen/mydata/xh)
    Finished dev [unoptimized + debuginfo] target(s) in 2.20s
     Running `/Users/chen/.rust-target/debug/xh httpbin.org/get -vv`
GET /get HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Host: httpbin.org
User-Agent: xh/0.20.1

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 295
Content-Type: application/json
Date: Wed, 17 Jan 2024 04:45:33 GMT
Server: gunicorn/19.9.0

{
    "args": {},
    "headers": {
        "Accept": "*/*",
        "Accept-Encoding": "gzip, deflate, br",
        "Host": "httpbin.org",
        "User-Agent": "xh/0.20.1",
        "X-Amzn-Trace-Id": "Root=1-65a75b6d-787ccc48646e40ce75195807"
    },
    "origin": "47.242.3.58",
    "url": "http://httpbin.org/get"
}



Elapsed time: 0.67198s
Remote address: 3.224.157.95:80

@zuisong zuisong force-pushed the display-remote-addr branch 2 times, most recently from 086a864 to 0f5e032 Compare January 17, 2024 04:48
@zuisong zuisong changed the title display remote IP address in metadata display remote address in metadata Jan 17, 2024
Copy link
Owner

@ducaale ducaale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ducaale ducaale merged commit 7c7b1e0 into ducaale:master Jan 17, 2024
8 checks passed
@zuisong zuisong deleted the display-remote-addr branch January 18, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants