Skip to content

0-haha/gnet_tls_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples of Golang Kernel TLS

Echo

  • Enable the Kernel TLS on Linux.

    sudo modprobe tls
  • Disable KTLS

    # Disable the tls kernel module
    sudo modprobe -r tls

    Disable KTLS in golang.

    Set env GOKTLS=0, or omit it in the command.

  • Run the server

    GOKTLS=1 go run server.go

    To print out the debug information, run with -tags=debug.

    GOKTLS=1 go run -tags=debug server.go
  • Run the client

    GOKTLS=1 go run client.go

    To print out the debug information, run with -tags=debug.

    GOKTLS=1 go run -tags=debug client.go
  • Run clients to test different ciphersuites and TLS versions.

    GOKTLS=1 go run client_test_tls_config.go

    To print out the debug information, run with -tags=debug.

    GOKTLS=1 go run -tags=debug client_test_tls_config.go

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published