add tcp proxy

master
dustoair 3 years ago
commit 8092a617e9

@ -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

@ -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 %}

3
.gitignore vendored

@ -0,0 +1,3 @@
.idea
go.sum
nogit.*

@ -0,0 +1,4 @@
FROM nginx:1.19.8
MAINTAINER me <me@me>
LABEL Description="nginx proxy "
ADD nginx.conf /etc/nginx/nginx.conf

@ -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

@ -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

@ -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;
}
Loading…
Cancel
Save