├── webui.jpg ├── webui ├── api │ ├── response.go │ ├── cfg.go │ └── pool.go ├── assets │ ├── font │ │ ├── cyrillic.woff2 │ │ └── cyrillic-ext.woff2 │ ├── plugins │ │ ├── fontawesome-free │ │ │ └── webfonts │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ ├── fa-solid-900.woff2 │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ └── fa-v4compatibility.woff2 │ │ ├── jquery-ui │ │ │ ├── images │ │ │ │ ├── ui-icons_444444_256x240.png │ │ │ │ ├── ui-icons_555555_256x240.png │ │ │ │ ├── ui-icons_777620_256x240.png │ │ │ │ ├── ui-icons_777777_256x240.png │ │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ └── jquery-ui.theme.min.css │ │ ├── datatables-buttons │ │ │ ├── js │ │ │ │ ├── buttons.bootstrap4.min.js │ │ │ │ ├── buttons.print.min.js │ │ │ │ └── buttons.colVis.min.js │ │ │ └── css │ │ │ │ └── buttons.bootstrap4.min.css │ │ ├── datatables-responsive │ │ │ ├── js │ │ │ │ └── responsive.bootstrap4.min.js │ │ │ └── css │ │ │ │ └── responsive.bootstrap4.min.css │ │ └── datatables-bs4 │ │ │ ├── js │ │ │ └── dataTables.bootstrap4.min.js │ │ │ └── css │ │ │ └── dataTables.bootstrap4.min.css │ ├── css │ │ └── font.css │ └── js │ │ └── api.js ├── assets.go ├── template │ ├── page │ │ ├── code_404.gohtml │ │ ├── cfg_edit.gohtml │ │ ├── pool_manager.gohtml │ │ ├── pool_worker_list.gohtml │ │ └── dashboard.gohtml │ ├── layout │ │ └── base.gohtml │ └── root.gohtml ├── page_cfg_edit.go ├── page.go ├── page_pool_create.go ├── page_pool_manger.go ├── page_pool_edit.go ├── pool_worker_list.go ├── middleware │ └── basic_auth.go ├── page_dashboard.go ├── server.go └── template_func.go ├── config ├── build.go ├── config.example.yml ├── config_self.go └── config.go ├── .gitignore ├── util ├── slice.go ├── random.go └── validator │ └── validator.go ├── main_publish.go ├── connection ├── util.go ├── error_handler.go ├── miner_protocol.go ├── upstream_injector.go ├── downstream_injector.go ├── downstream.go ├── miner_fee_control.go ├── pool_server.go ├── miner.go └── upstream.go ├── stratumproxy.service ├── injector ├── eth │ ├── down_99_injector_eth_forward.go │ ├── down_2_record_get_work_id.go │ ├── down_0_drop_unauth_client.go │ ├── up_5_injector_send_job.go │ ├── down_3_eth_submit_hashrate.go │ ├── protocol.go │ ├── down_4_submit_work.go │ └── down_1_injector_eth_submit_login.go ├── eth-stratum │ ├── up_2_set_extranonce.go │ ├── down_4_extranonce.go │ ├── down_1_drop_unauth_client.go │ ├── up_1_injector_send_job.go │ ├── down_0_subscribe.go │ ├── down_3_submit_work.go │ ├── protocol.go │ └── down_2_authorize.go └── eth-common │ └── fee_control.go ├── README.md ├── protocol ├── eth-stratum │ ├── downstream.go │ └── upstream.go └── eth │ ├── upstream.go │ └── downstream.go ├── main.go ├── go.mod └── install.sh /webui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui.jpg -------------------------------------------------------------------------------- /webui/api/response.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | type ResponseAPI struct { 4 | Result bool 5 | Msg string 6 | } 7 | -------------------------------------------------------------------------------- /config/build.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | var ProjectName = "StratumProxy" 4 | 5 | var GitTag string 6 | var BuildTime string 7 | -------------------------------------------------------------------------------- /webui/assets/font/cyrillic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/font/cyrillic.woff2 -------------------------------------------------------------------------------- /webui/assets/font/cyrillic-ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/font/cyrillic-ext.woff2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | makefile 2 | main_debug.go 3 | config/config_develop.go 4 | stratumproxy.spec 5 | config.yml 6 | .gitlab-ci.yml 7 | .idea/ 8 | bin/ 9 | -------------------------------------------------------------------------------- /config/config.example.yml: -------------------------------------------------------------------------------- 1 | pools: [] 2 | 3 | # WebUI 设置 4 | webui: 5 | bind: "0.0.0.0:8444" 6 | auth: 7 | username: "" 8 | passwd: "" 9 | -------------------------------------------------------------------------------- /webui/assets/plugins/fontawesome-free/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/fontawesome-free/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /webui/assets/plugins/fontawesome-free/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/fontawesome-free/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /webui/assets/plugins/jquery-ui/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/jquery-ui/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /webui/assets/plugins/jquery-ui/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/jquery-ui/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /webui/assets/plugins/jquery-ui/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/jquery-ui/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /webui/assets/plugins/jquery-ui/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/jquery-ui/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /webui/assets/plugins/jquery-ui/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/jquery-ui/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /webui/assets/plugins/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /webui/assets/plugins/fontawesome-free/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/fontawesome-free/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /webui/assets/plugins/fontawesome-free/webfonts/fa-v4compatibility.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethpoolproxy/stratumproxy/HEAD/webui/assets/plugins/fontawesome-free/webfonts/fa-v4compatibility.woff2 -------------------------------------------------------------------------------- /webui/assets.go: -------------------------------------------------------------------------------- 1 | package webui 2 | 3 | import ( 4 | "embed" 5 | _ "embed" 6 | ) 7 | 8 | //go:embed assets/* 9 | var assets embed.FS 10 | 11 | //go:embed template/* 12 | var pageTemplate embed.FS 13 | -------------------------------------------------------------------------------- /util/slice.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | func StringSliceContain(slice []string, s string) bool { 4 | for _, s2 := range slice { 5 | if s == s2 { 6 | return true 7 | } 8 | } 9 | return false 10 | } 11 | -------------------------------------------------------------------------------- /main_publish.go: -------------------------------------------------------------------------------- 1 | // +build publish_log 2 | 3 | package main 4 | 5 | import log "github.com/sirupsen/logrus" 6 | 7 | func InitMain() { 8 | log.SetLevel(log.InfoLevel) 9 | } 10 | 11 | func DeferMain() { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /util/random.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "fmt" 5 | "math/rand" 6 | ) 7 | 8 | func GetRandomString2(n int) string { 9 | randBytes := make([]byte, n/2) 10 | rand.Read(randBytes) 11 | return fmt.Sprintf("%x", randBytes) 12 | } 13 | -------------------------------------------------------------------------------- /webui/template/page/code_404.gohtml: -------------------------------------------------------------------------------- 1 | {{ define "title" }} Not Found {{ end }} 2 | 3 | {{ define "header_page" }} 4 | {{ end }} 5 | 6 | {{ define "section_title" }} 找不到此页 {{ end }} 7 | 8 | {{ define "section" }} 9 |