()
| 19 | } |
| 20 | |
| 21 | public static void init() { |
| 22 | try { |
| 23 | Class<?> clz = Class.forName("com.github.catvod.Proxy"); |
| 24 | port = (int) clz.getMethod("getPort").invoke(null); |
| 25 | method = clz.getMethod("getUrl", boolean.class); |
| 26 | SpiderDebug.log("本地代理端口:" + port); |
| 27 | } catch (Throwable e) { |
| 28 | findPort(); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | public static int getPort() { |
| 33 | return port; |