commit 8092a617e9178dac29023ee9770ee93379e2d756 Author: dustoair <107600816+dustoair@users.noreply.github.com> Date: Fri Aug 12 09:44:24 2022 +0800 add tcp proxy diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..193b512 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,21 @@ +kind: pipeline +type: ssh # 使用SSH +name: default + + +server: + host: 172.16.0.1 + user: root + password: 111111111111111111 + +clone: + disable: true + +steps: + - name: test + commands: + - echo Drone start + - date + - /root/sre/build_nginx_proxy_prod.sh + - date + - echo Drone end diff --git a/.drone.yml-bak b/.drone.yml-bak new file mode 100644 index 0000000..1afb0e9 --- /dev/null +++ b/.drone.yml-bak @@ -0,0 +1,43 @@ +kind: pipeline +type: ssh # 使用SSH +name: nginx-proxy-pipeline + + +server: + host: 172.16.0.1 + user: root + #password: 1111111111111111111111 + password: + from_secret: 11password # Secrets保存的密码 + +clone: + disable: true + +steps: + - name: build-img + commands: + - echo Drone start + - date + - /root/sre/build_nginx_proxy_prod.sh + - date + - echo Drone end + + - name: wechat + image: lizheming/drone-wechat + settings: + corpid: 111111111111111111111111 + corp_secret: 111111111111111111111111111 + agent_id: 1000002 + to_user: 11111111111111111111111111111 + to_party: 112 + to_tag: ${DRONE_REPO_NAME} + msg_url: ${DRONE_BUILD_LINK} + safe: 1 + btn_txt: more + title: ${DRONE_REPO_NAME} + message: > + {%if success %} + build {{build.number}} succeeded. Good job. + {% else %} + build {{build.number}} failed. Fix me please. + {% endif %} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f1f236 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +go.sum +nogit.* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e112b5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.19.8 +MAINTAINER me +LABEL Description="nginx proxy " +ADD nginx.conf /etc/nginx/nginx.conf diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..c3be2ea --- /dev/null +++ b/README.MD @@ -0,0 +1,7 @@ +[![Build Status](https://ci.sre.ink/api/badges/sre/nginx-proxy/status.svg?ref=refs/heads/master)](https://ci.sre.ink/sre/nginx-proxy) + + +nginx proxy from eth mining port 8080 + + +443 for okex pool \ No newline at end of file diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..f14b4e6 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: eth-nginx + namespace: sre +spec: + selector: + matchLabels: + app: eth-nginx + template: + metadata: + annotations: + k8s.aliyun.com/pod-with-eip: "true" + k8s.aliyun.com/pod-eip-instanceid: "eip-11111111111111111111111111111" + labels: + app: eth-nginx + spec: + containers: + - name: eth-nginx + image: registry-vpc.cn-hongkong.aliyuncs.com/ssssssssssssssss/nginx-proxy:2 + ports: + - name: eth + containerPort: 8080 + imagePullPolicy: IfNotPresent diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..224e879 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,56 @@ + user nginx; + worker_processes auto; + + error_log /var/log/nginx/error.log notice; + pid /var/run/nginx.pid; + + + events { + worker_connections 1024; + } + + + + + + + stream { + + allow 27.16.214.87; + deny all; + + proxy_timeout 1d; + proxy_connect_timeout 30; + + server { + listen 8080; + proxy_connect_timeout 28800; + proxy_timeout 86400; + #asia2.ethermine.org + #proxy_pass 172.65.239.73:14444; + proxy_pass 172.65.239.73:5555; + } + + + } + + + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; + } \ No newline at end of file