Giter Club home page Giter Club logo

sharingan-go's Introduction

golang定制版本,适合流量录制回放

修改golang源码,Hook相关调用,并对外暴露接口,如:OnAccept、OnConnect、OnRead、OnWrite等等。

所有的源码修改都通过了golang官方的测试,详见1.3源码安装分支。「 测试方法:cd src && ./all.bash 」

目前支持的版本如下,不定期会同步官方最新release版本。

  • go1.10【基于官方go1.10.8 源码修改】
  • go1.11【基于官方go1.11.13源码修改】
  • go1.12【基于官方go1.12.17源码修改】
  • go1.13【基于官方go1.13.9 源码修改】
  • go1.14【基于官方go1.14.1 源码修改】
  • go1.15【基于官方go1.15.7 源码修改】

流量录制和回放,参考:https://github.com/didi/sharingan

一、安装方法

1.1、脚本安装【推荐】

  • 默认安装目录:/tmp/recorder-${GO-VERSION},如:/tmp/recorder-go1.10。
  • 包含远程版本对比、本地自动升级等等,目前只支持linux和mac下面的64位系统。
  • /tmp是临时目录,如有需要可以cp到有权限的目录方便长期使用。
  • github国内下载不稳定,经常出现超时,可以试试科学上网的方法。。
## go1.10版本安装
curl https://raw.githubusercontent.com/didi/sharingan-go/recorder/install/go1.10 | sh
export GOROOT=/tmp/recorder-go1.10
export PATH=$GOROOT/bin:$PATH

## go1.11版本安装
curl https://raw.githubusercontent.com/didi/sharingan-go/recorder/install/go1.11 | sh
export GOROOT=/tmp/recorder-go1.11
export PATH=$GOROOT/bin:$PATH

## go1.12版本安装
curl https://raw.githubusercontent.com/didi/sharingan-go/recorder/install/go1.12 | sh
export GOROOT=/tmp/recorder-go1.12
export PATH=$GOROOT/bin:$PATH

## go1.13版本安装
curl https://raw.githubusercontent.com/didi/sharingan-go/recorder/install/go1.13 | sh
export GOROOT=/tmp/recorder-go1.13
export PATH=$GOROOT/bin:$PATH

## go1.14版本安装
curl https://raw.githubusercontent.com/didi/sharingan-go/recorder/install/go1.14 | sh
export GOROOT=/tmp/recorder-go1.14
export PATH=$GOROOT/bin:$PATH

## go1.15版本安装
curl https://raw.githubusercontent.com/didi/sharingan-go/recorder/install/go1.15 | sh
export GOROOT=/tmp/recorder-go1.15
export PATH=$GOROOT/bin:$PATH

1.2、二进制安装

支持的二进制安装包如下:

1.3、源码安装

如果以上安装方法不支持您的系统,可以考虑使用源码安装,支持的源码git分支如下:

源码安装参考:https://golang.org/doc/install/source

常见问题

  • 1、Failed to connect to raw.githubusercontent.com port 443: Connection refused

A:github国内下载不稳定,经常出现超时,可以试试科学上网的方法。或者手工设置域名解析,参考

sharingan-go's People

Contributors

rsc avatar griesemer avatar robpike avatar bradfitz avatar ianlancetaylor avatar aclements avatar josharian avatar adg avatar randall77 avatar minux avatar dvyukov avatar mdempsky avatar alexbrainman avatar cixtor avatar cherrymui avatar agl avatar ken avatar davecheney avatar nigeltao avatar crawshaw avatar dsymonds avatar remyoudompheng avatar mvdan avatar mwhudson avatar mundaym avatar altree avatar tklauser avatar martisch avatar dr2chase avatar 0intro 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.