sohop是一个反向代理,可以选择性地限制对使用OAuth进行身份验证的用户的访问权限。它还提供一个运行状况检查端点,用于报告上游服务的可达性。
sohop可以在保持限制访问的情况下,公开原有的内部应用到公共互联网,而不必在应用本身配置认证/授权。
UsageUsage of sohop: -cofig strig Cofig file (default "cofig.jso") -httpAddr strig Address to bid HTTP server (default ":80") -httpsAddr strig Address to bid HTTPS server (default ":443")配置示例{ "Domai": "example.com", "Cookie": { "Name": "exampleauth", "Secret": "3c0767ada2466a92a59c1214061441713aeafe6d115e29aa376c0f9758cdf0f5" }, "Auth" : { "Type": "github-org", "Cofig": { "ClietID": "12345678", "ClietSecret": "12345678", "OrgID": 12345678} }, "TLS": { "CertFile": "cert.pem", "CertKey": "key.pem" }, "Upstreams": { "itraet": { "URL": "https://10.0.0.16:8888", "HealthCheck": "https://10.0.0.16:8888/logi", "WebSocket": "ws://10.0.0.16:8888", "Auth": true, "Headers": { "X-WEBAUTH-USER":["{{.Sessio.Values.user}}"] } }, "public": { "URL": "https://10.0.0.16:8111", "HealthCheck": "https://10.0.0.16:8111/logi.html", "WebSocket": "ws://10.0.0.16:8111", "Auth": false } }}{ "Domai": "example.com", "Auth" : { "Type": "gmail-regex", "Cofig": { "Credetials": {"web":{"cliet_id":"XXXX-yyyyyy.apps.googleusercotet.com","project_id":"example","auth_uri":"https://accouts.google.com/o/oauth2/auth","toke_uri":"https://accouts.google.com/o/oauth2/toke","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","cliet_secret":"zzzzZZzzZZ","redirect_uris":["https://oauth.example.com/authorized"]}}, "EmailRegex":"^davars@gmail.com$"} }, "Upstreams": {... }}
评论