Giter VIP home page Giter VIP logo

httpsserver's Introduction

httpsServer

一个轻量的https服务器以及client实现,包含证书生成以及本地静态文件,用于测试https的各类需求。

Quick start

Requirments

Go version>=1.15

Installation

git clone https://github.com/Zenger-sun/httpsServer.git

// 根据需要修改配置 
vim cert/ca.conf
vim cert/server.conf

sh cert/gen.sh // 配置了默认值,执行时只需要一路回车

Build & Run

go build -o server.exe

双击启动server.exe,如出现秒退,请检查证书是否生成
打开浏览器访问: https://127.0.0.1:8000/, 就能看到放在web中的index.html
或者通过接*.html的方式: https://127.0.0.1:8000/index.html, 访问到web中的其他静态资源

附上benchmark

goos: windows
goarch: amd64
pkg: github/Zenger-sun/httpsServer/client
cpu: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Benchmark_httpsServer
Benchmark_httpsServer-8 350 4942069 ns/op
PASS

httpsserver's People

Contributors

zenger-sun avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.