This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # 15/5/21 | |
| # create by: snower | |
| import sys | |
| import socket | |
| import struct | |
| from sevent import udp | |
| from sevent import current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> //strlen | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> //inet_addr | |
| #include <pthread.h> | |
| #include <time.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # 2020/3/4 | |
| # create by: snower | |
| import sys | |
| import time | |
| import logging | |
| import struct | |
| import socket | |
| import traceback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # 2020/7/8 | |
| # create by: snower | |
| import sys | |
| import time | |
| import struct | |
| import socket | |
| import logging | |
| import traceback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| #14-6-6 | |
| # create by: snower | |
| import struct | |
| from collections import defaultdict | |
| import socket | |
| default_networds = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # 2021/8/19 | |
| # create by: snower | |
| import argparse | |
| import logging | |
| import sevent | |
| from sevent.helpers import tcp2proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| init_worker_by_lua_block { | |
| local slock = require "slock" | |
| slock:connect("server1", "127.0.0.1", 5658) | |
| } | |
| server { | |
| listen 8081; | |
| default_type application/json; | |
| location /poll/event { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # 2020/7/10 | |
| # create by: snower | |
| from sevent.helpers.tcp2proxy import * | |
| def check_host(forward_host, allow_hosts): | |
| for host in allow_hosts: | |
| if forward_host == host or forward_host.endswith(host): | |
| return True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "encoding/binary" | |
| "fmt" | |
| "math/rand" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # 2023/2/7 | |
| # create by: snower | |
| import sevent | |
| PORT = 80 | |
| SSH_ADDRES = ("127.0.0.1", 2222) | |
| HTTP_ADDRES = ("127.0.0.1", 8080) | |
| HTTPS_ADDRES = ("127.0.0.1", 4443) |