Simple golang webservice to reply the http request including headers

Echo

This is a simple Golang webserver which replies the current HTTP request including its headers.

I wrote this little app to test Microsoft Azure Application Proxy Header-based SSO.

Usage

Usage of ./echo:
  -Help
        Print help
  -Port int
        Listen on this port (default 8090)

AAD App Proxy Configuration

AAD Config

Sample Response

GET / HTTP/1.1 
[Headers]
Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9]
Accept-Encoding=[gzip, deflate, br]
Accept-Language=[de,en-US;q=0.9,en;q=0.8]
Cache-Control=[no-cache]
Connection=[Keep-Alive]
Dnt=[1]
Front-End-Https=[on]
Pragma=[no-cache]
Referer=[https://login.microsoftonline.com/]
Sec-Ch-Ua=[" Not A;Brand";v="99", "Chromium";v="96", "Microsoft Edge";v="96"]
Sec-Ch-Ua-Mobile=[?0]
Sec-Ch-Ua-Platform=["Windows"]
Sec-Fetch-Dest=[document]
Sec-Fetch-Mode=[navigate]
Sec-Fetch-Site=[cross-site]
Upgrade-Insecure-Requests=[1]
User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36 Edg/96.0.1054.43]

X-Auth-Displayname=[pri]
X-Auth-Email=[pri@*******.ch]
X-Auth-Groups=[DOMAIN\Z-ServerAdmin,DOMAIN\Z-CloudUsers,DOMAIN\Z-RDPAdmin,DOMAIN\Z-ClientAdmin]
X-Auth-Username=[pri]

X-Forwarded-For=[194.***.***.***]
X-Ms-Proxy=[AzureAD-Application-Proxy]
Host = "echo.******.ch:8090"
RemoteAddr= "***.***.***.***:62656"

License

MIT License

Copyright (c) 2021 Philipp Ritter

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Owner
Similar Resources

A command-line interface for the Riak database through its HTTP API

A command-line interface for the Riak database through its HTTP API

Riakg Description Is a development oriented command line tool that enables navigation on buckets, keys and values of a Riak KV data store using it's H

Dec 31, 2022

This CLI tool sends HTTP GET requests and print MD5 hash values of the response's body

HTTP Body Hash Generator This CLI (Command Line Interface) tool sends HTTP GET requests and print MD5 hash values of the response's body. Usage You ne

Feb 10, 2022

CLi tools helping to forge HTTP smuggling attack and others

CLi tools helping to forge HTTP smuggling attack and others

HTTPCustomHouse CLi tools helping to forge HTTP smuggling attack and others (httpcustomhouse) Analyze smuggled request without interacting with remote

Sep 23, 2022

Go-test-app - Test application to verify environment deployment and reachability over HTTP

Test app Test application to verify environment deployment and reachability over

May 23, 2022

Got: Simple golang package and CLI tool to download large files faster 🏃 than cURL and Wget!

Got. Simple and fast concurrent downloader. Installation ❘ CLI Usage ❘ Module Usage ❘ License Comparison Comparison in cloud server: [root@centos-nyc-

Dec 29, 2022

Lynx is a command line application that build simple golang project

Lynx is a command line application that build simple golang project

Lynx Lynx is a Golang application for easily creating simple Go project Install Just run below commands for install lynx in your system go get -u gith

Oct 1, 2021

a simple golang program that shows the time in asci art.

a simple golang program that shows the time in asci art.

Curtime a simple golang program that shows the time in asci art. Installing Other For other distros you can grab a executable file from the releases.

Oct 8, 2021

Simple trie based auto-completion engine implementation in golang.

Simple trie based auto-completion engine implementation in golang.

Simple auto-complete engine implementation in golang. Quick start $ git clone https://github.com/benbarron/trie-auto-completion-engine $ cd trie-auto-

Jul 12, 2022

Golang-based simple file server to serve files of the current working directory

fileserve Golang-based simple file server to serve static files of the current working directory File sharing in LAN or home network Web application t

Jan 9, 2022
Related tags
Libraries and CLIs for my personal all-in-one productivity system including components like bookmarks, notes, todos, projects, etc.

bntp.go Libraries and CLIs for my personal all-in-one productivity system including components like bookmarks, notes, todos, projects, etc. Neovim int

Sep 13, 2022
Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)

go2struct-tool Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command und

Dec 16, 2021
Viper: a complete configuration solution for Go applications including 12-Factor apps
Viper: a complete configuration solution for Go applications including 12-Factor apps

Viper v2 feedback Viper is heading towards v2 and we would love to hear what you would like to see in it. Share your thoughts here: https://forms.gle/

Dec 6, 2021
A command-line to create a pull request to review the entire content of a Github repository.

Pull Request Me Pull Request Me (PRMe) creates a pull request for the entire content of a Github repository. This is useful to solicit review comments

Nov 2, 2021
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022
Command line, offline, access to HTTP references

This is a handy little helper that puts HTTP reference at your fingertips, when you're on the CLI, when you need it.

Dec 9, 2022
Interactive cli tool for HTTP inspection
Interactive cli tool for HTTP inspection

Wuzz command line arguments are similar to cURL's arguments, so it can be used to inspect/modify requests copied from the browser's network inspector with the "copy as cURL" feature.

Dec 27, 2022
A command line http test tool. Maintain the case via git and pure text
A command line http test tool. Maintain the case via git and pure text

httptest A command line http test tool Maintain the api test cases via git and pure text We want to test the APIs via http requests and assert the res

Dec 16, 2022
rj is a command line tool show the HTTP Response as JSON
rj is a command line tool show the HTTP Response as JSON

rj rj is a command line tool show the HTTP Response as JSON Installation

Dec 31, 2022
Parse .har files to create Go http requests

HAR-Parser Parse .har files to create Go http requests Usage $ ./HAR-Parser myfi

Jul 14, 2022