Skip to content

Commit

Permalink
doc and version
Browse files Browse the repository at this point in the history
  • Loading branch information
lqqyt2423 committed Mar 8, 2023
1 parent fdb15fd commit ecacea4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 344 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Parses HTTP/HTTPS traffic and displays traffic details via a [web interface](#web-interface).
- Supports a [plugin mechanism](#adding-functionality-by-developing-plugins) for easily extending functionality. Various event hooks can be found in the [examples](./examples) directory.
- HTTPS certificate handling is compatible with [mitmproxy](https://mitmproxy.org/) and stored in the `~/.mitmproxy` folder. If the root certificate is already trusted from a previous use of `mitmproxy`, `go-mitmproxy` can use it directly.
- Map Remote and Map Local support.
- Refer to the [configuration documentation](#additional-parameters) for more features.

## Unsupported features
Expand Down Expand Up @@ -60,6 +61,10 @@ Usage of go-mitmproxy:
Read configuration from file by passing in the file path of a JSON configuration file.
-ignore_hosts value
a list of ignore hosts
-map_local string
map local config filename
-map_remote string
map remote config filename
-ssl_insecure
not verify upstream server SSL/TLS certificates.
-version
Expand Down
5 changes: 5 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- 解析 HTTP/HTTPS 流量,可通过 [WEB 界面](#web-界面)查看流量详情。
- 支持[插件机制](#通过开发插件添加功能),方便扩展自己需要的功能。多种事件 HOOK 可参考 [examples](./examples)
- HTTPS 证书相关逻辑与 [mitmproxy](https://mitmproxy.org/) 兼容,并保存在 `~/.mitmproxy` 文件夹中。如果之前已经用过 `mitmproxy` 并安装信任了根证书,则 `go-mitmproxy` 可以直接使用。
- 支持 Map Remote 和 Map Local。
- 更多功能请参考[配置文档](#更多参数)

## 暂未实现的功能
Expand Down Expand Up @@ -60,6 +61,10 @@ Usage of go-mitmproxy:
从文件名读取配置,传入json配置文件地址
-ignore_hosts value
HTTPS解析域名黑名单
-map_local string
map local json配置文件地址
-map_remote string
map remote json配置文件地址
-ssl_insecure
不验证上游服务器的 SSL/TLS 证书
-version
Expand Down
291 changes: 0 additions & 291 deletions addon/mapper.go

This file was deleted.

41 changes: 0 additions & 41 deletions addon/mapper_test.go

This file was deleted.

8 changes: 5 additions & 3 deletions cmd/go-mitmproxy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func loadConfigFromCli() *Config {
flag.IntVar(&config.Debug, "debug", 0, "debug mode: 1 - print debug log, 2 - show debug from")
flag.StringVar(&config.Dump, "dump", "", "dump filename")
flag.IntVar(&config.DumpLevel, "dump_level", 0, "dump level: 0 - header, 1 - header + body")
flag.StringVar(&config.MapperDir, "mapper_dir", "", "mapper files dirpath")
flag.StringVar(&config.MapRemote, "map_remote", "", "map remote config filename")
flag.StringVar(&config.MapLocal, "map_local", "", "map local config filename")
flag.StringVar(&config.filename, "f", "", "read config from the filename")
Expand Down Expand Up @@ -64,8 +63,11 @@ func mergeConfigs(fileConfig, cliConfig *Config) *Config {
if cliConfig.DumpLevel != 0 {
config.DumpLevel = cliConfig.DumpLevel
}
if cliConfig.MapperDir != "" {
config.MapperDir = cliConfig.MapperDir
if cliConfig.MapRemote != "" {
config.MapRemote = cliConfig.MapRemote
}
if cliConfig.MapLocal != "" {
config.MapLocal = cliConfig.MapLocal
}
return config
}
Expand Down
Loading

0 comments on commit ecacea4

Please sign in to comment.