Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Mr.恒尘 c-rainstorm

💭
I may be slow to respond.
View GitHub Profile
View localPac.txt
function FindProxyForURL(url, host)
{
return "SOCKS 192.168.0.222:1086";
}
@c-rainstorm
c-rainstorm / AsyncUtil.java
Created Oct 29, 2020
通用的异步执行工具
View AsyncUtil.java
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.*;
@Slf4j
public class AsyncUtil {
/**
* 异步场景 -> 线程池
View localPAC.txt
function FindProxyForURL(url, host)
{
return "SOCKS 192.168.0.107:1086";
}
View BIOServer.java
package me.rainstorm.playground.webserver;
import lombok.SneakyThrows;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.time.LocalDateTime;
/**
View MultiReactorWithMultiWorkThread.java
package me.rainstorm.playground.reactor;
import java.io.IOException;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
/**
View Emperor.java
public class Emperor {
private Emperor() {
}
private static List<Emperor> emperors;
private static final Integer MAX_NUM_OF_EMPEROR = Integer.valueOf(3);
private static AtomicInteger lastUsed = new AtomicInteger(-1);
static {
emperors = new ArrayList<>();
@c-rainstorm
c-rainstorm / gist:1bbd44b388acd35ca6eaf07d1fbd9bc7
Last active May 14, 2020 — forked from sambatyon/gist:3bbd8d5f81b65398c0d0
SSH between Mac OS X host and Virtual Box guest
View gist:1bbd44b388acd35ca6eaf07d1fbd9bc7

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

View gfwlist.action
{+forward-override{forward-socks5 127.0.0.1:8118 .}}
14.102.250.18
14.102.250.19
174.142.105.153
67.220.91.15
67.220.91.18
67.220.91.23
69.65.19.160
72.52.81.22
85.17.73.31