forked from KNEMC/KLALB
Compare commits
11
Commits
patch-3
...
52f44335e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52f44335e4
|
||
|
|
a06e1cb5eb | ||
|
|
58913254e0 | ||
|
|
02d7bcd93b | ||
|
|
1e52e82d6d | ||
|
|
3023fe5b2a | ||
|
|
7896ee6638
|
||
|
|
ed94423855
|
||
|
|
c3172a04b1
|
||
|
|
cc803f47a7 | ||
|
|
3bb95988fc |
+3
-1
@@ -4,7 +4,6 @@
|
|||||||
<classpathentry kind="lib" path="lib/gson-2.1.jar"/>
|
<classpathentry kind="lib" path="lib/gson-2.1.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/javassist.jar" sourcepath="C:/Users/ADMINI~1/AppData/Local/Temp/1/.org.sf.feeling.decompiler1686963856070/source/javassist-3.29.2-GA-sources.jar"/>
|
<classpathentry kind="lib" path="lib/javassist.jar" sourcepath="C:/Users/ADMINI~1/AppData/Local/Temp/1/.org.sf.feeling.decompiler1686963856070/source/javassist-3.29.2-GA-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/ini4j.jar"/>
|
<classpathentry kind="lib" path="lib/ini4j.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/JFreeChart1.5.2.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/toml4j-0.7.1.jar"/>
|
<classpathentry kind="lib" path="lib/toml4j-0.7.1.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/pcap4j-core-1.8.2.jar" sourcepath="C:/Users/ADMINI~1/AppData/Local/Temp/1/.org.sf.feeling.decompiler1725520274095/source/pcap4j-core-1.8.2-sources.jar"/>
|
<classpathentry kind="lib" path="lib/pcap4j-core-1.8.2.jar" sourcepath="C:/Users/ADMINI~1/AppData/Local/Temp/1/.org.sf.feeling.decompiler1725520274095/source/pcap4j-core-1.8.2-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/pcap4j-packetfactory-propertiesbased-1.8.2.jar"/>
|
<classpathentry kind="lib" path="lib/pcap4j-packetfactory-propertiesbased-1.8.2.jar"/>
|
||||||
@@ -29,5 +28,8 @@
|
|||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry kind="lib" path="lib/jfreechart-1.5.3.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/jfreechart-1.5.3-javadoc.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/jfreechart-1.5.3-sources.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
@@ -14,3 +14,5 @@ dashboard/.env.*.local
|
|||||||
|
|
||||||
/klalb-config.json
|
/klalb-config.json
|
||||||
/klalbconfig-old.json
|
/klalbconfig-old.json
|
||||||
|
|
||||||
|
/.slim/
|
||||||
Generated
+38
@@ -0,0 +1,38 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="jfreechart-1.5.3">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/jfreechart-1.5.3.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/disruptor-4.0.0.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/gson-2.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/ini4j.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/javassist.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/JavaTUN0.3.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/jctools-core-4.0.6.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/KNElib1.0.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/KNEOptimize.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/pcap4j-core-1.8.2.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/pcap4j-packetfactory-propertiesbased-1.8.2.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/pcap4j-packetfactory-static-1.8.2.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/pcap4j-packettest-1.8.2-tests.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/pcap4j-sample-1.8.2.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-2.0.9.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-2.0.9-tests.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/toml4j-0.7.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/uuid-creator-6.1.1.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/jctools-core-4.0.6-javadoc.jar!/" />
|
||||||
|
</JAVADOC>
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/jfreechart-1.5.3-sources.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/disruptor-4.0.0-sources.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/ini4j.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/JavaTUN0.3.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/jctools-core-4.0.6-sources.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/KNElib1.0.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-2.0.9-sources.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/toml4j-0.7.1.jar!/" />
|
||||||
|
<root url="jar://$PROJECT_DIR$/lib/uuid-creator-6.1.1-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_26" project-jdk-name="jdk-26.0.1" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/classes" />
|
<output url="file://$PROJECT_DIR$/classes" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -39,7 +39,7 @@ No test suite, no CI. Classes named `*Test*` (`nathole/`, `ntp/`) are manual `ma
|
|||||||
|
|
||||||
- Entrypoint `org.kne.cloud.network.klalb.KLALBMain`: load config → build `KLALBProxySystem` → open Swing GUI (`KLALBStateGUI3`) unless `"nogui": true` → start `KLALBWebServer` (if `"webUI": true` or web server enabled, default port `4665`) → interactive console (`help`, `links-state`, `route`, `kperf`, ...).
|
- Entrypoint `org.kne.cloud.network.klalb.KLALBMain`: load config → build `KLALBProxySystem` → open Swing GUI (`KLALBStateGUI3`) unless `"nogui": true` → start `KLALBWebServer` (if `"webUI": true` or web server enabled, default port `4665`) → interactive console (`help`, `links-state`, `route`, `kperf`, ...).
|
||||||
- `org.kne.cloud.network.klalb.web.KLALBWebServer` — built-in HTTP/SSE server (JDK `HttpServer`):
|
- `org.kne.cloud.network.klalb.web.KLALBWebServer` — built-in HTTP/SSE server (JDK `HttpServer`):
|
||||||
- API endpoints: `/api/status`, `/api/events` (SSE stream, 200ms intervals), `/api/links`, `/api/links/action`, `/api/links/reconnect`, `/api/routes`, `/api/nodes` (topology graph), `/api/interfaces`, `/api/config`.
|
- API endpoints: `/api/status`, `/api/events` (SSE stream, 200ms intervals), `/api/links`, `/api/links/action`, `/api/links/reconnect`, `/api/routing-table`, `/api/nodes` (topology graph), `/api/node-info?address=<ipv6>` (on-demand full node info), `/api/config`.
|
||||||
- Static file hosting / SPA fallback: serves `dashboard/dist/` assets directly.
|
- Static file hosting / SPA fallback: serves `dashboard/dist/` assets directly.
|
||||||
- `org.kne.cloud.network` — generic socket framework: `VirtualSocket*` hierarchy, `SocketBridge` port-forwarding proxies, `ProtocolDetector` (multi-protocol mux on one port), `MultiProtocolSocketAddress` = URI-style addresses (`tcp://`, `udp://`, `kltp://`, `ntp://`) dispatched through the `SocketType` registry.
|
- `org.kne.cloud.network` — generic socket framework: `VirtualSocket*` hierarchy, `SocketBridge` port-forwarding proxies, `ProtocolDetector` (multi-protocol mux on one port), `MultiProtocolSocketAddress` = URI-style addresses (`tcp://`, `udp://`, `kltp://`, `ntp://`) dispatched through the `SocketType` registry.
|
||||||
- `...network.klalb` — app core: `KLALBController` (the virtual SRv6 network), `KLALBRemoteLink` (WAN lines), `*Packet` wire-format classes, virtual socket implementations.
|
- `...network.klalb` — app core: `KLALBController` (the virtual SRv6 network), `KLALBRemoteLink` (WAN lines), `*Packet` wire-format classes, virtual socket implementations.
|
||||||
@@ -59,7 +59,7 @@ No test suite, no CI. Classes named `*Test*` (`nathole/`, `ntp/`) are manual `ma
|
|||||||
Located in `dashboard/`:
|
Located in `dashboard/`:
|
||||||
- **Git layout**: `dashboard/` is a separate git repo wired in as a submodule (own origin on `git.code.cq.cn`). Commit frontend changes inside `dashboard/` first, then bump the submodule pointer in the parent repo — parent-repo commits alone do not capture them.
|
- **Git layout**: `dashboard/` is a separate git repo wired in as a submodule (own origin on `git.code.cq.cn`). Commit frontend changes inside `dashboard/` first, then bump the submodule pointer in the parent repo — parent-repo commits alone do not capture them.
|
||||||
- **Stack**: Vite + React 19 + TypeScript + Tailwind CSS v4 + `@base-ui/react` (style: `base-nova`, icons: `lucide-react`, toasts: `@base-ui/react/toast`).
|
- **Stack**: Vite + React 19 + TypeScript + Tailwind CSS v4 + `@base-ui/react` (style: `base-nova`, icons: `lucide-react`, toasts: `@base-ui/react/toast`).
|
||||||
- **Routing**: Hash-based routing (`#/overview`, `#/connections`, `#/topology`, `#/settings`, etc.) for seamless SPA hosting under Java `KLALBWebServer`.
|
- **Routing**: Hash-based routing (`#/overview`, `#/connections`, `#/routing-table`, `#/topology`, `#/settings`) for seamless SPA hosting under Java `KLALBWebServer`.
|
||||||
- **Package Manager**: `pnpm` (run all commands from `dashboard/` directory).
|
- **Package Manager**: `pnpm` (run all commands from `dashboard/` directory).
|
||||||
- **Component installation**: **Must** use CLI via `pnpm dlx shadcn@latest add <component>` (e.g. `pnpm dlx shadcn@latest add alert card badge toast`). Never create or fake shadcn components manually. Non-shadcn libs (`@xyflow/react`, `d3-force`) are installed via plain `pnpm add`.
|
- **Component installation**: **Must** use CLI via `pnpm dlx shadcn@latest add <component>` (e.g. `pnpm dlx shadcn@latest add alert card badge toast`). Never create or fake shadcn components manually. Non-shadcn libs (`@xyflow/react`, `d3-force`) are installed via plain `pnpm add`.
|
||||||
- **Commands**:
|
- **Commands**:
|
||||||
@@ -69,7 +69,9 @@ Located in `dashboard/`:
|
|||||||
- **Pages & data flow**:
|
- **Pages & data flow**:
|
||||||
- Overview / Connections read the SSE stream (`use-klalb-sse.ts`, 200ms pushes of status + links).
|
- Overview / Connections read the SSE stream (`use-klalb-sse.ts`, 200ms pushes of status + links).
|
||||||
- Settings loads/saves `/api/config` (`use-klalb-config.ts`); save payload must keep legacy field aliases alongside new names for compatibility.
|
- Settings loads/saves `/api/config` (`use-klalb-config.ts`); save payload must keep legacy field aliases alongside new names for compatibility.
|
||||||
|
- Routing table polls `/api/routing-table` every 1s (`use-routing-table.ts`); `cost` is delay-derived and displayed in milliseconds.
|
||||||
- Topology polls `/api/nodes` every 1s (`use-topology.ts`) — SSE does NOT carry topology.
|
- Topology polls `/api/nodes` every 1s (`use-topology.ts`) — SSE does NOT carry topology.
|
||||||
|
- Selecting a topology node queries `/api/node-info`; remote node descriptions require a full SRv6 node-info request and can time out after 3s.
|
||||||
- Topology layout: `d3-force` headless simulation (recomputed only when node/edge structure changes) rendered by `@xyflow/react` with custom `device-node` / `link-edge` components in `src/components/topology/`.
|
- Topology layout: `d3-force` headless simulation (recomputed only when node/edge structure changes) rendered by `@xyflow/react` with custom `device-node` / `link-edge` components in `src/components/topology/`.
|
||||||
- React hooks lint rule forbids `setState` synchronously inside effects — initialize form state via component `key` remount + lazy `useState(() => ...)` initializers (see `SettingsForm` pattern).
|
- React hooks lint rule forbids `setState` synchronously inside effects — initialize form state via component `key` remount + lazy `useState(() => ...)` initializers (see `SettingsForm` pattern).
|
||||||
|
|
||||||
|
|||||||
@@ -249,5 +249,6 @@
|
|||||||
</library>
|
</library>
|
||||||
</orderEntry>
|
</orderEntry>
|
||||||
<orderEntry type="jdk" jdkName="jdk-26.0.1" jdkType="JavaSDK" />
|
<orderEntry type="jdk" jdkName="jdk-26.0.1" jdkType="JavaSDK" />
|
||||||
|
<orderEntry type="library" name="jfreechart-1.5.3" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
//加速线路
|
|
||||||
{KLALBRemote}->43.248.189.107:35000
|
|
||||||
{KLALBRemote}->cn-bj-bgp-3.openfrp.top:65529
|
|
||||||
{KLALBRemote}->180.76.147.250:65529
|
|
||||||
{KLALBRemote}->cn-ah-dx-1.natfrp.cloud:65529
|
|
||||||
{KLALBRemote}->cn-nn-dx-1.natfrp.cloud:65529
|
|
||||||
{KLALBRemote}->cn-wh-dx-1.natfrp.cloud:65529
|
|
||||||
{KLALBRemote}->cn-zz-bgp-10.natfrp.cloud:23330
|
|
||||||
{KLALBRemote}->cn-zz-bgp-7.natfrp.cloud:33336
|
|
||||||
{KLALBRemote}->43.143.109.64:49965
|
|
||||||
{KLALBRemote}->frp.104300.xyz:49965
|
|
||||||
{KLALBRemote}->us.afrps.cn:49966
|
|
||||||
{KLALBRemote}->hk.afrps.cn:49966
|
|
||||||
{KLALBRemote}->la.afrps.cn:49966
|
|
||||||
{KLALBRemote}->frp.freefrp.net:49965
|
|
||||||
{KLALBRemote}->frp1.freefrp.net:49965
|
|
||||||
{KLALBRemote}->frp2.freefrp.net:49965
|
|
||||||
{KLALBRemote}->frp4.freefrp.net:49965
|
|
||||||
|
|
||||||
0.0.0.0:25565->{KLALBVirtual}[171d:a999:e697:4b23:ae52:9f29:4532:e1ee]:25565
|
|
||||||
+1
-1
Submodule dashboard updated: f38d640ac4...885a0c2d89
@@ -1,79 +0,0 @@
|
|||||||
[
|
|
||||||
{"Type":"KLALBController" ,
|
|
||||||
"TCPListen" : "0.0.0.0:4565",
|
|
||||||
"UDPListen" : "{UDP}0.0.0.0:4572",
|
|
||||||
"VirtualSocketName" : "KLALB_Stream",
|
|
||||||
"LineTable":["43.248.189.107:65529",
|
|
||||||
"cn-bj-bgp-3.openfrp.top:65529",
|
|
||||||
"180.76.147.250:65529",
|
|
||||||
"cn-ah-dx-1.natfrp.cloud:65529",
|
|
||||||
"cn-nn-dx-1.natfrp.cloud:65529",
|
|
||||||
"cn-wh-dx-1.natfrp.cloud:65529",
|
|
||||||
"cn-zz-bgp-10.natfrp.cloud:23330",
|
|
||||||
"cn-zz-bgp-7.natfrp.cloud:33336",
|
|
||||||
"43.143.109.64:49965",
|
|
||||||
"frp.104300.xyz:49965",
|
|
||||||
"us.afrps.cn:49966",
|
|
||||||
"hk.afrps.cn:49966",
|
|
||||||
"la.afrps.cn:49966",
|
|
||||||
"frp.freefrp.net:49965",
|
|
||||||
"frp1.freefrp.net:49965",
|
|
||||||
"frp2.freefrp.net:49965",
|
|
||||||
"frp4.freefrp.net:49965",
|
|
||||||
"cn-he-plc-2.openfrp.top:4572",
|
|
||||||
"{UDP}cn-he-plc-2.openfrp.top:4572",
|
|
||||||
"frp-mom.top:22226",
|
|
||||||
"frp-man.top:36555",
|
|
||||||
"us-sjc-bgp-2.openfrp.top:36555",
|
|
||||||
"us-sjc-bgp-1.openfrp.top:36555",
|
|
||||||
"[240e:340:d856:b700:6d02:6a6a:f9fc:865b]:4572"]
|
|
||||||
},
|
|
||||||
{"Type":"SocketBridge" ,
|
|
||||||
"Listen" : "0.0.0.0:4572",
|
|
||||||
"Bridge":{
|
|
||||||
"KLALB" : "SocketBridge",
|
|
||||||
"RDP":"SocketBridge",
|
|
||||||
"HTTP":"SocketBridge",
|
|
||||||
"HTTPS":"SocketBridge",
|
|
||||||
"DEFAULT":"MinecraftSocketBridge23332"
|
|
||||||
} ,
|
|
||||||
"Connect" : {
|
|
||||||
"KLALB" : "127.0.0.1:4565",
|
|
||||||
"RDP":"127.0.0.1:3389",
|
|
||||||
"HTTP":"127.0.0.1:5212",
|
|
||||||
"HTTPS":"192.168.1.235:443",
|
|
||||||
"DEFAULT":"127.0.0.1:36555"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{"Type":"SocketBridge" ,
|
|
||||||
"Listen" : "{KLALB_Stream}[::0]:23332",
|
|
||||||
"Bridge":"MinecraftSocketBridge23332",
|
|
||||||
"Connect" : "127.0.0.1:36555"
|
|
||||||
},
|
|
||||||
{ "Type":"SocketBridge" ,
|
|
||||||
"Listen" : "{KLALB_Stream}[::0]:23333",
|
|
||||||
"Bridge":"SocketBridge",
|
|
||||||
"Connect" : "127.0.0.1:5212"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{"Type":"SocketBridge" ,
|
|
||||||
"Listen" : "0.0.0.0:25561",
|
|
||||||
"Bridge":{
|
|
||||||
"KLALB" : "SocketBridge",
|
|
||||||
"DEFAULT":"MinecraftSocketBridge23330"
|
|
||||||
} ,
|
|
||||||
"Connect" : {
|
|
||||||
"KLALB" : "127.0.0.1:4565",
|
|
||||||
"DEFAULT":"127.0.0.1:25562"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{"Type":"SocketBridge" ,
|
|
||||||
"Listen" : "{KLALB_Stream}[::0]:23330",
|
|
||||||
"Bridge":"MinecraftSocketBridge23330",
|
|
||||||
"Connect" : "127.0.0.1:25562"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,29 +0,0 @@
|
|||||||
0.0.0.0:35000(RDP)->192.168.1.233:3389
|
|
||||||
0.0.0.0:35000(HTTPS)->192.168.1.233:8444
|
|
||||||
0.0.0.0:35000(HTTP)->192.168.1.233:5212
|
|
||||||
0.0.0.0:35000(SSH)->192.168.1.236:22
|
|
||||||
0.0.0.0:35000(KLALB)->{KLALBRemote}
|
|
||||||
0.0.0.0:35000->127.0.0.1:35001 //Winds服(普通线路)
|
|
||||||
|
|
||||||
{KLALBVirtual}[::0]:25565->127.0.0.1:35001 //Winds服(加速线路)
|
|
||||||
|
|
||||||
//加速线路
|
|
||||||
{KLALBRemote}->43.248.189.107:35000
|
|
||||||
{KLALBRemote}->cn-bj-bgp-3.openfrp.top:65529
|
|
||||||
{KLALBRemote}->180.76.147.250:65529
|
|
||||||
{KLALBRemote}->cn-ah-dx-1.natfrp.cloud:65529
|
|
||||||
{KLALBRemote}->cn-nn-dx-1.natfrp.cloud:65529
|
|
||||||
{KLALBRemote}->cn-wh-dx-1.natfrp.cloud:65529
|
|
||||||
{KLALBRemote}->cn-zz-bgp-10.natfrp.cloud:23330
|
|
||||||
{KLALBRemote}->cn-zz-bgp-7.natfrp.cloud:33336
|
|
||||||
{KLALBRemote}->43.143.109.64:49965
|
|
||||||
{KLALBRemote}->frp.104300.xyz:49965
|
|
||||||
{KLALBRemote}->us.afrps.cn:49966
|
|
||||||
{KLALBRemote}->hk.afrps.cn:49966
|
|
||||||
{KLALBRemote}->la.afrps.cn:49966
|
|
||||||
{KLALBRemote}->frp.freefrp.net:49965
|
|
||||||
{KLALBRemote}->frp1.freefrp.net:49965
|
|
||||||
{KLALBRemote}->frp2.freefrp.net:49965
|
|
||||||
{KLALBRemote}->frp4.freefrp.net:49965
|
|
||||||
|
|
||||||
0.0.0.0:25565->{KLALBVirtual}[171d:a999:e697:4b23:ae52:9f29:4532:e1ee]:25565
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
43.248.189.107:65529
|
|
||||||
cn-bj-bgp-3.openfrp.top:65529
|
|
||||||
180.76.147.250:65529
|
|
||||||
cn-ah-dx-1.natfrp.cloud:65529
|
|
||||||
cn-nn-dx-1.natfrp.cloud:65529
|
|
||||||
cn-wh-dx-1.natfrp.cloud:65529
|
|
||||||
cn-zz-bgp-10.natfrp.cloud:23330
|
|
||||||
cn-zz-bgp-7.natfrp.cloud:33336
|
|
||||||
43.143.109.64:49965
|
|
||||||
frp.104300.xyz:49965
|
|
||||||
us.afrps.cn:49966
|
|
||||||
hk.afrps.cn:49966
|
|
||||||
la.afrps.cn:49966
|
|
||||||
frp.freefrp.net:49965
|
|
||||||
frp1.freefrp.net:49965
|
|
||||||
frp2.freefrp.net:49965
|
|
||||||
frp4.freefrp.net:49965
|
|
||||||
cn-he-plc-2.openfrp.top:4569
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
0.0.0.0:35000(RDP)->192.168.1.233:3389
|
|
||||||
0.0.0.0:35000(HTTPS)->192.168.1.233:8444
|
|
||||||
0.0.0.0:35000(HTTP)->192.168.1.233:5212
|
|
||||||
0.0.0.0:35000(SSH)->192.168.1.236:22
|
|
||||||
0.0.0.0:35000(KLALB)->{KLALBRemote}
|
|
||||||
0.0.0.0:35000->127.0.0.1:35001 //Winds服(普通线路)
|
|
||||||
|
|
||||||
{KLALBVirtual}[::0]:25565->127.0.0.1:35001 //Winds服(加速线路)
|
|
||||||
@@ -115,4 +115,5 @@ multiscatter=Multi-Core - Spread Load Evenly (Optimized for multi-socket NUMA ar
|
|||||||
webapisettings=Web API settings
|
webapisettings=Web API settings
|
||||||
enablewebapi=Enable Web API
|
enablewebapi=Enable Web API
|
||||||
weblistenaddr=Web API listen address
|
weblistenaddr=Web API listen address
|
||||||
invaildweblistenaddr=Invalid Web API listen address
|
invaildweblistenaddr=Invalid Web API listen address
|
||||||
|
enabletun=Enable TUN adapter
|
||||||
|
|||||||
@@ -116,3 +116,4 @@ webapisettings=Web API 设置
|
|||||||
enablewebapi=启用 Web API
|
enablewebapi=启用 Web API
|
||||||
weblistenaddr=Web API 监听地址:端口
|
weblistenaddr=Web API 监听地址:端口
|
||||||
invaildweblistenaddr=无效的 Web API 监听地址:端口
|
invaildweblistenaddr=无效的 Web API 监听地址:端口
|
||||||
|
enabletun=启用TUN虚拟网卡
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
package org.kne.cloud.network.ipv6;
|
package org.kne.cloud.network.ipv6;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArraySet;
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
@@ -8,10 +11,17 @@ import org.kne.cloud.network.srv6.SRv6Router;
|
|||||||
|
|
||||||
public abstract class AbstractIPv6NetworkLink implements IPv6NetworkLink {
|
public abstract class AbstractIPv6NetworkLink implements IPv6NetworkLink {
|
||||||
private CopyOnWriteArraySet<IPv6LinkStateListener> listeners = new CopyOnWriteArraySet<>();
|
private CopyOnWriteArraySet<IPv6LinkStateListener> listeners = new CopyOnWriteArraySet<>();
|
||||||
|
|
||||||
private SRv6Router srv6Router;
|
private SRv6Router srv6Router;
|
||||||
|
private final boolean loopback;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public AbstractIPv6NetworkLink(boolean loopback) {
|
||||||
|
super();
|
||||||
|
this.loopback = loopback;
|
||||||
|
}
|
||||||
|
|
||||||
public SRv6Router getSrv6Router() {
|
public SRv6Router getSrv6Router() {
|
||||||
return srv6Router;
|
return srv6Router;
|
||||||
}
|
}
|
||||||
@@ -57,4 +67,35 @@ public abstract class AbstractIPv6NetworkLink implements IPv6NetworkLink {
|
|||||||
public void setReceiveConsumer(BiConsumer<IPv6NetworkLink,Supplier< IPv6Packet>> receiveConsumer) {
|
public void setReceiveConsumer(BiConsumer<IPv6NetworkLink,Supplier< IPv6Packet>> receiveConsumer) {
|
||||||
this.receiveConsumer = receiveConsumer;
|
this.receiveConsumer = receiveConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isLoopBack() {
|
||||||
|
return loopback;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RouteItem> getRouteItems() {
|
||||||
|
List<RouteItem> rlist = new ArrayList<>();
|
||||||
|
if(isLoopBack()) {
|
||||||
|
for(IPv6AddressGroup group:getAddressGroups()) {
|
||||||
|
rlist.add(new RouteItem(new IPv6AddressGroup(group.getAddress(), 128),
|
||||||
|
group.getAddress(), this, RouteItem.DIRECT, 0, 0, null, "D"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isUp()) {
|
||||||
|
for (Iterator<Neighbor> iteratorx = getNeighborsInfo().iterator(); iteratorx.hasNext();) {
|
||||||
|
Neighbor addresses = (Neighbor) iteratorx.next();
|
||||||
|
RouteItem ri = new RouteItem(new IPv6AddressGroup(addresses.getAddress().getAddress(), 128),
|
||||||
|
addresses.getAddress().getAddress(), this,RouteItem.SRv6_ENDXSID, 0, 128, null, "D");
|
||||||
|
rlist.add(ri);
|
||||||
|
|
||||||
|
RouteItem ris = new RouteItem(addresses.getLocator(),
|
||||||
|
addresses.getLocator().getAddress(), this, RouteItem.SRv6_ENDSID, 13, 128,
|
||||||
|
null, "D");
|
||||||
|
rlist.add(ris);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rlist;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class IPv6TUNLoopbackNetworkLink extends AbstractIPv6NetworkLink
|
|||||||
private Lock slok = new SpinLock();
|
private Lock slok = new SpinLock();
|
||||||
|
|
||||||
public IPv6TUNLoopbackNetworkLink(String name,IPv6AddressGroup hostAddress, int mtu, List<InetAddress> dns) throws IOException {
|
public IPv6TUNLoopbackNetworkLink(String name,IPv6AddressGroup hostAddress, int mtu, List<InetAddress> dns) throws IOException {
|
||||||
|
super(true);
|
||||||
if (tun != null)
|
if (tun != null)
|
||||||
throw new IllegalStateException("already open!");
|
throw new IllegalStateException("already open!");
|
||||||
try {
|
try {
|
||||||
@@ -204,13 +205,6 @@ public class IPv6TUNLoopbackNetworkLink extends AbstractIPv6NetworkLink
|
|||||||
LockSupport.unpark(tr);
|
LockSupport.unpark(tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isLoopBack() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Neighbor> getNeighborsInfo() {
|
public List<Neighbor> getNeighborsInfo() {
|
||||||
List<Neighbor> hs = new ArrayList<>();
|
List<Neighbor> hs = new ArrayList<>();
|
||||||
@@ -219,10 +213,6 @@ public class IPv6TUNLoopbackNetworkLink extends AbstractIPv6NetworkLink
|
|||||||
return hs;
|
return hs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @Override public boolean isCongress(IPv6Packet iPv6Packet,double scale) {
|
|
||||||
* return sendQueue.size() > 1000*scale; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@@ -255,27 +245,4 @@ public class IPv6TUNLoopbackNetworkLink extends AbstractIPv6NetworkLink
|
|||||||
return List.of(hostAddress);
|
return List.of(hostAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<RouteItem> getRouteItems() {
|
|
||||||
List<RouteItem> rlist = new ArrayList<>();
|
|
||||||
|
|
||||||
for (IPv6AddressGroup grp : getAddressGroups()) {
|
|
||||||
rlist.add(new RouteItem(new IPv6AddressGroup(grp.getAddress(), 128), grp.getAddress(), this, "Direct", 0, 1,
|
|
||||||
null, "D", true));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Iterator<Neighbor> iteratorx = getNeighborsInfo().iterator(); iteratorx.hasNext();) {
|
|
||||||
Neighbor addresses = (Neighbor) iteratorx.next();
|
|
||||||
RouteItem ri = new RouteItem(new IPv6AddressGroup(addresses.getAddress().getAddress(), 128),
|
|
||||||
addresses.getAddress().getAddress(), this, "Direct", 0, 128, null, "D", false);
|
|
||||||
rlist.add(ri);
|
|
||||||
|
|
||||||
RouteItem ris = new RouteItem(addresses.getLocator(), addresses.getLocator().getAddress(), this,
|
|
||||||
"KLALB SRv6", 13, 128, null, "D", false);
|
|
||||||
rlist.add(ris);
|
|
||||||
|
|
||||||
}
|
|
||||||
return rlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class LoopbackIPv6NetworkLink extends AbstractIPv6NetworkLink implements
|
|||||||
|
|
||||||
//new Inet6AddressGroup(loopbackAddress, 128) new Inet6AddressGroup((Inet6Address) Inet6Address.getByName("::1"), 128)
|
//new Inet6AddressGroup(loopbackAddress, 128) new Inet6AddressGroup((Inet6Address) Inet6Address.getByName("::1"), 128)
|
||||||
public LoopbackIPv6NetworkLink(List<IPv6AddressGroup> addressGroupsx,SRv6Router router) {
|
public LoopbackIPv6NetworkLink(List<IPv6AddressGroup> addressGroupsx,SRv6Router router) {
|
||||||
|
super(true);
|
||||||
this.addressGroups .addAll( addressGroupsx);
|
this.addressGroups .addAll( addressGroupsx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,10 +55,7 @@ public class LoopbackIPv6NetworkLink extends AbstractIPv6NetworkLink implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isLoopBack() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Neighbor> getNeighborsInfo() {
|
public List<Neighbor> getNeighborsInfo() {
|
||||||
@@ -93,29 +91,6 @@ public class LoopbackIPv6NetworkLink extends AbstractIPv6NetworkLink implements
|
|||||||
return rerouteConsumer;
|
return rerouteConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<RouteItem> getRouteItems() {
|
|
||||||
List<RouteItem> rlist = new ArrayList<>();
|
|
||||||
for(IPv6AddressGroup group:addressGroups) {
|
|
||||||
rlist.add(new RouteItem(new IPv6AddressGroup(group.getAddress(), 128),
|
|
||||||
group.getAddress(), this, "Direct", 0, 0, null, "D", true));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Iterator<Neighbor> iteratorx = getNeighborsInfo().iterator(); iteratorx.hasNext();) {
|
|
||||||
Neighbor addresses = (Neighbor) iteratorx.next();
|
|
||||||
RouteItem ri = new RouteItem(new IPv6AddressGroup(addresses.getAddress().getAddress(), 128),
|
|
||||||
addresses.getAddress().getAddress(), this, "Direct", 0, 128, null, "D",
|
|
||||||
false);
|
|
||||||
rlist.add(ri);
|
|
||||||
|
|
||||||
RouteItem ris = new RouteItem(addresses.getLocator(),
|
|
||||||
addresses.getLocator().getAddress(), this, "KLALB SRv6", 13, 128,
|
|
||||||
null, "D", false);
|
|
||||||
rlist.add(ris);
|
|
||||||
|
|
||||||
}
|
|
||||||
return rlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public SRv6Router getRouter() {
|
public SRv6Router getRouter() {
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import java.util.Objects;
|
|||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
||||||
|
public static final String DIRECT="Direct";
|
||||||
|
public static final String SRv6_ENDSID="SRv6 ENDSID";
|
||||||
|
public static final String SRv6_ENDXSID="SRv6 ENDXSID";
|
||||||
|
|
||||||
private IPv6AddressGroup destination;
|
private IPv6AddressGroup destination;
|
||||||
private IPv6Address nexthop;
|
private IPv6Address nexthop;
|
||||||
private IPv6NetworkLink destlink;
|
private IPv6NetworkLink destlink;
|
||||||
@@ -12,7 +16,6 @@ public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
|||||||
private long cost;
|
private long cost;
|
||||||
private String flag;
|
private String flag;
|
||||||
private Supplier<Long> costSupplier;
|
private Supplier<Long> costSupplier;
|
||||||
private boolean isLoopback;
|
|
||||||
public String getFlag() {
|
public String getFlag() {
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
@@ -34,7 +37,7 @@ public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
|||||||
&& pre == other.pre && Objects.equals(proto, other.proto);
|
&& pre == other.pre && Objects.equals(proto, other.proto);
|
||||||
}
|
}
|
||||||
public RouteItem(IPv6AddressGroup destination, IPv6Address nexthop, IPv6NetworkLink destlink, String proto, int pre,
|
public RouteItem(IPv6AddressGroup destination, IPv6Address nexthop, IPv6NetworkLink destlink, String proto, int pre,
|
||||||
long cost,String flag,boolean isLoopback) {
|
long cost,String flag) {
|
||||||
super();
|
super();
|
||||||
this.destination = destination;
|
this.destination = destination;
|
||||||
this.nexthop = nexthop;
|
this.nexthop = nexthop;
|
||||||
@@ -43,10 +46,9 @@ public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
|||||||
this.pre = pre;
|
this.pre = pre;
|
||||||
this.cost = cost;
|
this.cost = cost;
|
||||||
this.flag=flag;
|
this.flag=flag;
|
||||||
this.isLoopback=isLoopback;
|
|
||||||
}
|
}
|
||||||
public RouteItem(IPv6AddressGroup destination, IPv6Address nexthop, IPv6NetworkLink destlink, String proto, int pre,
|
public RouteItem(IPv6AddressGroup destination, IPv6Address nexthop, IPv6NetworkLink destlink, String proto, int pre,
|
||||||
long cost,Supplier<Long> costSupplier,String flag,boolean isLoopback) {
|
long cost,Supplier<Long> costSupplier,String flag) {
|
||||||
super();
|
super();
|
||||||
this.destination = destination;
|
this.destination = destination;
|
||||||
this.nexthop = nexthop;
|
this.nexthop = nexthop;
|
||||||
@@ -56,7 +58,6 @@ public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
|||||||
this.cost = cost;
|
this.cost = cost;
|
||||||
this.costSupplier=costSupplier;
|
this.costSupplier=costSupplier;
|
||||||
this.flag=flag;
|
this.flag=flag;
|
||||||
this.isLoopback=isLoopback;
|
|
||||||
}
|
}
|
||||||
public IPv6AddressGroup getDestination() {
|
public IPv6AddressGroup getDestination() {
|
||||||
return destination;
|
return destination;
|
||||||
@@ -73,9 +74,6 @@ public class RouteItem implements Comparable<RouteItem>,Cloneable{
|
|||||||
public int getPre() {
|
public int getPre() {
|
||||||
return pre;
|
return pre;
|
||||||
}
|
}
|
||||||
public boolean isLoopback() {
|
|
||||||
return isLoopback;
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getDestination()+"\t"+getProto()+"\t"+getPre()+"\t"+getCost()+"\t"+getFlag()+"\t"+getNexthop()+"\t"+getDestlink().getName();
|
return getDestination()+"\t"+getProto()+"\t"+getPre()+"\t"+getCost()+"\t"+getFlag()+"\t"+getNexthop()+"\t"+getDestlink().getName();
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ import org.kne.cloud.network.ipv6.RouteItem;
|
|||||||
|
|
||||||
public abstract class AbstractControlledIPv6NetworkLink extends AbstractIPv6NetworkLink implements ControlledIPv6NetworkLink{
|
public abstract class AbstractControlledIPv6NetworkLink extends AbstractIPv6NetworkLink implements ControlledIPv6NetworkLink{
|
||||||
|
|
||||||
|
public AbstractControlledIPv6NetworkLink(boolean loopback) {
|
||||||
|
super(loopback);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class CONST {
|
|||||||
|
|
||||||
public static final String KLALB_S_RV6 = "KLALB_SRv6";
|
public static final String KLALB_S_RV6 = "KLALB_SRv6";
|
||||||
|
|
||||||
|
public static final String KLTP_VIRTUAL_SOCKET_NAME="kltp";
|
||||||
|
|
||||||
public static final int itemwidth = 1000;
|
public static final int itemwidth = 1000;
|
||||||
public static final int linepanelheight = 41;
|
public static final int linepanelheight = 41;
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ public class KLALBController {
|
|||||||
// System.out.println(context);
|
// System.out.println(context);
|
||||||
try {
|
try {
|
||||||
NTPv4Protocol nvc = new NTPv4Protocol(context,
|
NTPv4Protocol nvc = new NTPv4Protocol(context,
|
||||||
new MultiProtocolSocketAddress(iproxyname + "_Datagram","0.0.0.0",123));
|
new MultiProtocolSocketAddress(iproxyname + "datagram","0.0.0.0",123));
|
||||||
srv6Router.addSRv6RouterListener(new SRv6RouterListener() {
|
srv6Router.addSRv6RouterListener(new SRv6RouterListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -698,7 +698,7 @@ public class KLALBController {
|
|||||||
for (Neighbor neighbor : nb) {
|
for (Neighbor neighbor : nb) {
|
||||||
if (neighbor.getLocator() != null)
|
if (neighbor.getLocator() != null)
|
||||||
sp.add(new NTPPeer(
|
sp.add(new NTPPeer(
|
||||||
new MultiProtocolSocketAddress(iproxyname + "_Datagram",
|
new MultiProtocolSocketAddress(iproxyname + "datagram",
|
||||||
neighbor.getLocator().getAddress().toString(), 123),
|
neighbor.getLocator().getAddress().toString(), 123),
|
||||||
NTPv4Packet.NTP_SYMMETRIC_ACTIVE));
|
NTPv4Packet.NTP_SYMMETRIC_ACTIVE));
|
||||||
|
|
||||||
@@ -978,8 +978,8 @@ public class KLALBController {
|
|||||||
|
|
||||||
|
|
||||||
public void registerToProxyTypeAs(String proxyname) {
|
public void registerToProxyTypeAs(String proxyname) {
|
||||||
MultiProtocolSocketAddress.getSocketTypeRegister().put(proxyname + "_Stream", streamSocketType);
|
MultiProtocolSocketAddress.getSocketTypeRegister().put(proxyname + "stream", streamSocketType);
|
||||||
MultiProtocolSocketAddress.getSocketTypeRegister().put(proxyname + "_Datagram", datagramSocketType);
|
MultiProtocolSocketAddress.getSocketTypeRegister().put(proxyname + "datagram", datagramSocketType);
|
||||||
// ProxyProfileEntry.getRegister().put(proxyname, this);
|
// ProxyProfileEntry.getRegister().put(proxyname, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ import org.kne.cloud.network.klalb.ui.UIEnv;
|
|||||||
import org.kne.cloud.network.perf.Kperf;
|
import org.kne.cloud.network.perf.Kperf;
|
||||||
import org.kne.cloud.network.perf.NodeBenchmark;
|
import org.kne.cloud.network.perf.NodeBenchmark;
|
||||||
import org.kne.debug.TimeDebugger;
|
import org.kne.debug.TimeDebugger;
|
||||||
import org.kne.membandboost.MembandBenchmark;
|
import org.kne.membandboost.benchmark.*;;
|
||||||
import org.kne.membandboost.ObjectPoolBandwidthTest;
|
|
||||||
|
|
||||||
public class KLALBMain {
|
public class KLALBMain {
|
||||||
public static KLALBStateGUI3 ksg;
|
public static KLALBStateGUI3 ksg;
|
||||||
@@ -239,10 +238,6 @@ public class KLALBMain {
|
|||||||
case "membandbenchmark":
|
case "membandbenchmark":
|
||||||
MembandBenchmark.main(args);
|
MembandBenchmark.main(args);
|
||||||
break;
|
break;
|
||||||
case "memqueuebenchmark":
|
|
||||||
|
|
||||||
ObjectPoolBandwidthTest.main(args);
|
|
||||||
break;
|
|
||||||
//case "$$SYSTEM:":
|
//case "$$SYSTEM:":
|
||||||
//System.out.println();
|
//System.out.println();
|
||||||
//break;
|
//break;
|
||||||
|
|||||||
@@ -168,9 +168,11 @@ public class KLALBProxySystem {
|
|||||||
|
|
||||||
|
|
||||||
String vsne=kcci.getVirtualSocketName();
|
String vsne=kcci.getVirtualSocketName();
|
||||||
//if(vsne!=null) {
|
if(vsne!=null) {
|
||||||
MultiProtocolSocketAddress.getSocketTypeRegister().put(vsne, klalbController.getStreamSocketType());
|
MultiProtocolSocketAddress.getSocketTypeRegister().put(vsne, klalbController.getStreamSocketType());
|
||||||
//}
|
}else{
|
||||||
|
MultiProtocolSocketAddress.getSocketTypeRegister().put(CONST.KLTP_VIRTUAL_SOCKET_NAME, klalbController.getStreamSocketType());
|
||||||
|
}
|
||||||
MultiProtocolSocketAddress tcple=kcci.getTCPListen();
|
MultiProtocolSocketAddress tcple=kcci.getTCPListen();
|
||||||
if(tcple!=null) {
|
if(tcple!=null) {
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public class KLALBRemoteLink extends AbstractControlledIPv6NetworkLink implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
public KLALBRemoteLink(KLALBController controller,KLALBPacketLink kpl, IPv6AddressGroup address) {
|
public KLALBRemoteLink(KLALBController controller,KLALBPacketLink kpl, IPv6AddressGroup address) {
|
||||||
|
super(false);
|
||||||
this.klalbController=controller;
|
this.klalbController=controller;
|
||||||
sysclk = klalbController.getClock();
|
sysclk = klalbController.getClock();
|
||||||
this.kplink = kpl;
|
this.kplink = kpl;
|
||||||
@@ -151,6 +152,7 @@ public class KLALBRemoteLink extends AbstractControlledIPv6NetworkLink implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
private KLALBRemoteLink(KLALBController controller, MultiProtocolSocketAddress mpa, MultiProtocolSocketAddress bindaddr, IPv6AddressGroup address) {
|
private KLALBRemoteLink(KLALBController controller, MultiProtocolSocketAddress mpa, MultiProtocolSocketAddress bindaddr, IPv6AddressGroup address) {
|
||||||
|
super(false);
|
||||||
this.klalbController=controller;
|
this.klalbController=controller;
|
||||||
sysclk = klalbController.getClock();
|
sysclk = klalbController.getClock();
|
||||||
this.socketAddress = mpa;
|
this.socketAddress = mpa;
|
||||||
@@ -854,10 +856,6 @@ public class KLALBRemoteLink extends AbstractControlledIPv6NetworkLink implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isLoopBack() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
BandwidthDistributer bandwidthDistributer=new BandwidthDistributer<>();
|
BandwidthDistributer bandwidthDistributer=new BandwidthDistributer<>();
|
||||||
@Override
|
@Override
|
||||||
public List<Neighbor> getNeighborsInfo() {
|
public List<Neighbor> getNeighborsInfo() {
|
||||||
@@ -946,31 +944,28 @@ public class KLALBRemoteLink extends AbstractControlledIPv6NetworkLink implement
|
|||||||
return (!isClosed()) && (status.getState() == LinkStatus.UP) ;
|
return (!isClosed()) && (status.getState() == LinkStatus.UP) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/*@Override
|
||||||
public List<RouteItem> getRouteItems() {
|
public List<RouteItem> getRouteItems() {
|
||||||
List<RouteItem> rlist = new ArrayList<>();
|
List<RouteItem> rlist = new ArrayList<>();
|
||||||
|
|
||||||
if(isUp()) {
|
if(isUp()) {
|
||||||
IPv6AddressGroup adg = addressGroup;
|
|
||||||
/*if (adg != null)
|
|
||||||
rlist.add(new RouteItem(new IPv6AddressGroup(adg.getAddress(), 128), adg.getAddress(), this, "Direct", 0, 0,
|
|
||||||
null, "D", true));*/
|
|
||||||
|
|
||||||
for (Iterator<Neighbor> iteratorx = getNeighborsInfo().iterator(); iteratorx.hasNext(); ) {
|
for (Iterator<Neighbor> iteratorx = getNeighborsInfo().iterator(); iteratorx.hasNext(); ) {
|
||||||
Neighbor addresses = (Neighbor) iteratorx.next();
|
Neighbor addresses = (Neighbor) iteratorx.next();
|
||||||
RouteItem ri = new RouteItem(new IPv6AddressGroup(addresses.getAddress().getAddress(), 128),
|
RouteItem ri = new RouteItem(new IPv6AddressGroup(addresses.getAddress().getAddress(), 128),
|
||||||
addresses.getAddress().getAddress(), this, "Direct", 0, 128, CostSupplierFactory.expectedDelaySupplier((DelayMonitorData) addresses.getMonitor(), status, algorithm::getRTO), "D", false);
|
addresses.getAddress().getAddress(), this, RouteItem.SRv6_ENDXSID, 0, 128, CostSupplierFactory.expectedDelaySupplier((DelayMonitorData) addresses.getMonitor(), status, algorithm::getRTO), "D");
|
||||||
rlist.add(ri);
|
rlist.add(ri);
|
||||||
|
|
||||||
if (addresses.getLocator() != null) {
|
if (addresses.getLocator() != null) {
|
||||||
RouteItem ris = new RouteItem(addresses.getLocator(), addresses.getLocator().getAddress(), this,
|
RouteItem ris = new RouteItem(addresses.getLocator(), addresses.getLocator().getAddress(), this,
|
||||||
"KLALB SRv6", 13, 128, CostSupplierFactory.expectedDelaySupplier((DelayMonitorData) addresses.getMonitor(), status, algorithm::getRTO), "D", false);
|
RouteItem.SRv6_ENDSID, 13, 128, CostSupplierFactory.expectedDelaySupplier((DelayMonitorData) addresses.getMonitor(), status, algorithm::getRTO), "D");
|
||||||
rlist.add(ris);
|
rlist.add(ris);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rlist;
|
return rlist;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCongressCondition(Lock lock, Condition condition) {
|
public void setCongressCondition(Lock lock, Condition condition) {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public class KLALBStateGUI3 extends XFrame {
|
|||||||
private JTextField addressField; // 地址显示框
|
private JTextField addressField; // 地址显示框
|
||||||
private JTextField addressFieldSet; // 地址设置框
|
private JTextField addressFieldSet; // 地址设置框
|
||||||
private JTextField asnFieldSet; // ASN设置框
|
private JTextField asnFieldSet; // ASN设置框
|
||||||
|
private JCheckBox enableTUN; // 虚拟网卡启用禁用
|
||||||
private JTextField tunDeviceName; // 虚拟网卡名称设置框
|
private JTextField tunDeviceName; // 虚拟网卡名称设置框
|
||||||
private JTextField webListenSet; // Web API 监听地址设置框
|
private JTextField webListenSet; // Web API 监听地址设置框
|
||||||
private NetworkGraphPanel graph; // 网络图面板
|
private NetworkGraphPanel graph; // 网络图面板
|
||||||
@@ -822,6 +823,12 @@ public class KLALBStateGUI3 extends XFrame {
|
|||||||
asnFieldSet = asn.getTextField();
|
asnFieldSet = asn.getTextField();
|
||||||
settings.getView().add(asn);
|
settings.getView().add(asn);
|
||||||
|
|
||||||
|
//虚拟网卡
|
||||||
|
CheckBoxSettingItem enableTUNs = new CheckBoxSettingItem(UIEnv.getRsb().getString("enabletun"),
|
||||||
|
CONST.itemwidth, CONST.settingheight);
|
||||||
|
enableTUN=enableTUNs.getCheckBox();
|
||||||
|
settings.getView().add(enableTUNs);
|
||||||
|
|
||||||
TextSettingItem tunName = new TextSettingItem(UIEnv.getRsb().getString("tunname"),
|
TextSettingItem tunName = new TextSettingItem(UIEnv.getRsb().getString("tunname"),
|
||||||
CONST.itemwidth, CONST.settingheight);
|
CONST.itemwidth, CONST.settingheight);
|
||||||
tunDeviceName = tunName.getTextField();
|
tunDeviceName = tunName.getTextField();
|
||||||
@@ -1151,6 +1158,8 @@ public class KLALBStateGUI3 extends XFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kck.setEnableTUN( enableTUN.isSelected());
|
||||||
|
|
||||||
String tunNameText=tunDeviceName.getText().trim();
|
String tunNameText=tunDeviceName.getText().trim();
|
||||||
if(tunNameText.equals("") || tunNameText.equalsIgnoreCase("null")) {
|
if(tunNameText.equals("") || tunNameText.equalsIgnoreCase("null")) {
|
||||||
kck.setTUNName(null);
|
kck.setTUNName(null);
|
||||||
@@ -1571,9 +1580,14 @@ public class KLALBStateGUI3 extends XFrame {
|
|||||||
Long vasn = kck.getVirtualASN();
|
Long vasn = kck.getVirtualASN();
|
||||||
asnFieldSet.setText(vasn != null ? vasn.toString() : "");
|
asnFieldSet.setText(vasn != null ? vasn.toString() : "");
|
||||||
|
|
||||||
|
enableTUN.setSelected(kck.isEnableTUN());
|
||||||
|
|
||||||
|
|
||||||
String tunname=kck.getTUNName();
|
String tunname=kck.getTUNName();
|
||||||
tunDeviceName.setText(tunname!=null?tunname:"");
|
tunDeviceName.setText(tunname!=null?tunname:"");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 加载Web API设置
|
// 加载Web API设置
|
||||||
webApiEnabled.setSelected(kck.isWebUI());
|
webApiEnabled.setSelected(kck.isWebUI());
|
||||||
webListenSet.setText(kck.getWebListen() != null ? kck.getWebListen().toString()
|
webListenSet.setText(kck.getWebListen() != null ? kck.getWebListen().toString()
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ public class NetworkGraphPanel extends GraphPanel {
|
|||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
KperfGUI kpfg=new KperfGUI();
|
KperfGUI kpfg=new KperfGUI();
|
||||||
kpfg.setVisible(true);
|
kpfg.setVisible(true);
|
||||||
MultiProtocolSocketAddress source=new MultiProtocolSocketAddress("KLALB_Stream",controller.getIpv6Router().getLocator().getAddress().toString(),0);
|
MultiProtocolSocketAddress source=new MultiProtocolSocketAddress("kltp",controller.getIpv6Router().getLocator().getAddress().toString(),0);
|
||||||
MultiProtocolSocketAddress target=new MultiProtocolSocketAddress("KLALB_Stream", address.toString(), 4564);
|
MultiProtocolSocketAddress target=new MultiProtocolSocketAddress("kltp", address.toString(), 4564);
|
||||||
kpfg.setTarget(target,source);
|
kpfg.setTarget(target,source);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -164,7 +164,7 @@ public class NetworkGraphPanel extends GraphPanel {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private double nsPerPixel=1000L;
|
private double nsPerPixel=5000L;
|
||||||
private class InetGraphEdgeGroup extends GraphEdgeGroup{
|
private class InetGraphEdgeGroup extends GraphEdgeGroup{
|
||||||
public InetGraphEdgeGroup(GraphNode nodeA, GraphNode nodeB) {
|
public InetGraphEdgeGroup(GraphNode nodeA, GraphNode nodeB) {
|
||||||
super(nodeA, nodeB);
|
super(nodeA, nodeB);
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ import org.kne.cloud.network.ipv6.IPv6NetworkLink;
|
|||||||
import org.kne.cloud.network.ipv6.RouteItem;
|
import org.kne.cloud.network.ipv6.RouteItem;
|
||||||
import org.kne.cloud.network.klalb.*;
|
import org.kne.cloud.network.klalb.*;
|
||||||
import org.kne.cloud.network.monitor.LinkStatus;
|
import org.kne.cloud.network.monitor.LinkStatus;
|
||||||
|
import org.kne.cloud.network.srv6.KLALBNodeInformation;
|
||||||
import org.kne.cloud.network.srv6.KLALBRoutingProtocol;
|
import org.kne.cloud.network.srv6.KLALBRoutingProtocol;
|
||||||
import org.kne.cloud.network.srv6.KLALBRoutingProtocol.LinkDirection;
|
import org.kne.cloud.network.srv6.KLALBRoutingProtocol.LinkDirection;
|
||||||
|
import org.kne.cloud.network.srv6.KLALBRoutingProtocolAPIClient;
|
||||||
import org.kne.cloud.network.srv6.NeighborInfo;
|
import org.kne.cloud.network.srv6.NeighborInfo;
|
||||||
import org.kne.cloud.network.srv6.RouterInfo;
|
import org.kne.cloud.network.srv6.RouterInfo;
|
||||||
import org.kne.cloud.network.srv6.SRv6Router;
|
import org.kne.cloud.network.srv6.SRv6Router;
|
||||||
@@ -66,9 +68,9 @@ public class KLALBWebServer {
|
|||||||
server.createContext("/api/links", this::handleLinks);
|
server.createContext("/api/links", this::handleLinks);
|
||||||
server.createContext("/api/links/action", this::handleLinkAction);
|
server.createContext("/api/links/action", this::handleLinkAction);
|
||||||
server.createContext("/api/links/reconnect", this::handleReconnectAll);
|
server.createContext("/api/links/reconnect", this::handleReconnectAll);
|
||||||
server.createContext("/api/routes", this::handleRoutes);
|
server.createContext("/api/routing-table", this::handleRoutingTable);
|
||||||
server.createContext("/api/nodes", this::handleNodes);
|
server.createContext("/api/nodes", this::handleNodes);
|
||||||
server.createContext("/api/interfaces", this::handleInterfaces);
|
server.createContext("/api/node-info", this::handleNodeInfo);
|
||||||
server.createContext("/api/config", this::handleConfig);
|
server.createContext("/api/config", this::handleConfig);
|
||||||
|
|
||||||
// Static Files / SPA Fallback Handler
|
// Static Files / SPA Fallback Handler
|
||||||
@@ -426,7 +428,7 @@ public class KLALBWebServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleRoutes(HttpExchange exchange) throws IOException {
|
private void handleRoutingTable(HttpExchange exchange) throws IOException {
|
||||||
if (handleCorsPreflight(exchange)) return;
|
if (handleCorsPreflight(exchange)) return;
|
||||||
if (!"GET".equalsIgnoreCase(exchange.getRequestMethod())) {
|
if (!"GET".equalsIgnoreCase(exchange.getRequestMethod())) {
|
||||||
sendError(exchange, 405, "Method not allowed");
|
sendError(exchange, 405, "Method not allowed");
|
||||||
@@ -453,6 +455,119 @@ public class KLALBWebServer {
|
|||||||
sendJsonResponse(exchange, 200, routesArray);
|
sendJsonResponse(exchange, 200, routesArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private KLALBRoutingProtocolAPIClient nodeInfoClient;
|
||||||
|
|
||||||
|
private synchronized KLALBRoutingProtocolAPIClient getNodeInfoClient(KLALBController kc) {
|
||||||
|
if (nodeInfoClient == null) {
|
||||||
|
nodeInfoClient = new KLALBRoutingProtocolAPIClient(kc.getIpv6Router().getKlalbRouteProtol());
|
||||||
|
}
|
||||||
|
return nodeInfoClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleNodeInfo(HttpExchange exchange) throws IOException {
|
||||||
|
if (handleCorsPreflight(exchange)) return;
|
||||||
|
if (!"GET".equalsIgnoreCase(exchange.getRequestMethod())) {
|
||||||
|
sendError(exchange, 405, "Method not allowed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, String> params = parseQuery(exchange.getRequestURI().getRawQuery());
|
||||||
|
String addressStr = params.get("address");
|
||||||
|
if (addressStr == null || addressStr.trim().isEmpty()) {
|
||||||
|
sendError(exchange, 400, "address parameter is required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
KLALBController kc = proxySystem.getKlalbController();
|
||||||
|
if (kc == null || kc.getIpv6Router() == null || kc.getIpv6Router().getKlalbRouteProtol() == null) {
|
||||||
|
sendError(exchange, 503, "Controller not ready");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IPv6Address target;
|
||||||
|
try {
|
||||||
|
target = new IPv6Address((Inet6Address) InetAddress.getByName(addressStr.trim()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
sendError(exchange, 400, "Invalid IPv6 address: " + addressStr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SRv6Router router = kc.getIpv6Router();
|
||||||
|
boolean isSelf = router.getLocator().getAddress().equals(target);
|
||||||
|
|
||||||
|
JsonObject resp = new JsonObject();
|
||||||
|
resp.addProperty("address", target.toString());
|
||||||
|
|
||||||
|
if (isSelf) {
|
||||||
|
// 本机:描述直接取本地控制器配置
|
||||||
|
KLALBControllerConfigItem cfg = proxySystem.getControllerConfig();
|
||||||
|
resp.addProperty("isSelf", true);
|
||||||
|
String dname = router.getDeviceName() != null ? router.getDeviceName()
|
||||||
|
: (cfg != null && cfg.getDeviceName() != null ? cfg.getDeviceName() : "");
|
||||||
|
resp.addProperty("deviceName", dname);
|
||||||
|
resp.addProperty("deviceDescription",
|
||||||
|
cfg != null && cfg.getDeviceDescription() != null ? cfg.getDeviceDescription() : "");
|
||||||
|
JsonArray lines = new JsonArray();
|
||||||
|
for (MultiProtocolSocketAddress mpsa : kc.getExternalEndpoints()) {
|
||||||
|
lines.add(new JsonPrimitive(mpsa.toString()));
|
||||||
|
}
|
||||||
|
resp.add("openLines", lines);
|
||||||
|
sendJsonResponse(exchange, 200, resp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 远端节点:经 SRv6 虚拟网络发送完整节点信息查询(异步回调,限时等待)
|
||||||
|
resp.addProperty("isSelf", false);
|
||||||
|
CompletableFuture<KLALBNodeInformation> future = new CompletableFuture<>();
|
||||||
|
try {
|
||||||
|
getNodeInfoClient(kc).requestNodeInfoFull(
|
||||||
|
new InetSocketAddress(target.toInet6Address(), KLALBRoutingProtocol.DEFAULT_PORT),
|
||||||
|
info -> future.complete(info));
|
||||||
|
|
||||||
|
KLALBNodeInformation info;
|
||||||
|
try {
|
||||||
|
info = future.get(3, TimeUnit.SECONDS);
|
||||||
|
} catch (TimeoutException te) {
|
||||||
|
info = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String dname = info != null && info.getDeviceName() != null && !info.getDeviceName().isEmpty()
|
||||||
|
? info.getDeviceName()
|
||||||
|
: router.getKlalbRouteProtol().getDeviceName(target);
|
||||||
|
resp.addProperty("deviceName", dname != null ? dname : "");
|
||||||
|
resp.addProperty("deviceDescription",
|
||||||
|
info != null && info.getDeviceDescription() != null ? info.getDeviceDescription() : "");
|
||||||
|
resp.addProperty("reachable", info != null);
|
||||||
|
JsonArray lines = new JsonArray();
|
||||||
|
if (info != null && info.getOpenLines() != null) {
|
||||||
|
for (MultiProtocolSocketAddress mpsa : info.getOpenLines()) {
|
||||||
|
lines.add(new JsonPrimitive(mpsa.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resp.add("openLines", lines);
|
||||||
|
} catch (Exception e) {
|
||||||
|
resp.addProperty("deviceName", "");
|
||||||
|
resp.addProperty("deviceDescription", "");
|
||||||
|
resp.addProperty("reachable", false);
|
||||||
|
resp.add("openLines", new JsonArray());
|
||||||
|
}
|
||||||
|
sendJsonResponse(exchange, 200, resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> parseQuery(String rawQuery) {
|
||||||
|
Map<String, String> params = new HashMap<>();
|
||||||
|
if (rawQuery == null || rawQuery.isEmpty()) return params;
|
||||||
|
for (String pair : rawQuery.split("&")) {
|
||||||
|
int idx = pair.indexOf('=');
|
||||||
|
if (idx <= 0) continue;
|
||||||
|
try {
|
||||||
|
params.put(URLDecoder.decode(pair.substring(0, idx), StandardCharsets.UTF_8),
|
||||||
|
URLDecoder.decode(pair.substring(idx + 1), StandardCharsets.UTF_8));
|
||||||
|
} catch (Exception ignored) {}
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
private void handleNodes(HttpExchange exchange) throws IOException {
|
private void handleNodes(HttpExchange exchange) throws IOException {
|
||||||
if (handleCorsPreflight(exchange)) return;
|
if (handleCorsPreflight(exchange)) return;
|
||||||
if (!"GET".equalsIgnoreCase(exchange.getRequestMethod())) {
|
if (!"GET".equalsIgnoreCase(exchange.getRequestMethod())) {
|
||||||
@@ -517,33 +632,6 @@ public class KLALBWebServer {
|
|||||||
sendJsonResponse(exchange, 200, result);
|
sendJsonResponse(exchange, 200, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleInterfaces(HttpExchange exchange) throws IOException {
|
|
||||||
if (handleCorsPreflight(exchange)) return;
|
|
||||||
if (!"GET".equalsIgnoreCase(exchange.getRequestMethod())) {
|
|
||||||
sendError(exchange, 405, "Method not allowed");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
KLALBController kc = proxySystem.getKlalbController();
|
|
||||||
JsonArray ifacesArray = new JsonArray();
|
|
||||||
if (kc != null && kc.getNetworkInterfaceManager() != null) {
|
|
||||||
List<NetworkInterface> ifaces = kc.getNetworkInterfaceManager().getAllAvaliableNetworkInterface();
|
|
||||||
for (NetworkInterface nif : ifaces) {
|
|
||||||
JsonObject obj = new JsonObject();
|
|
||||||
obj.addProperty("name", nif.getName());
|
|
||||||
obj.addProperty("displayName", nif.getDisplayName());
|
|
||||||
JsonArray ips = new JsonArray();
|
|
||||||
List<InetAddress> addrs = kc.getNetworkInterfaceManager().getNetworkInterfaceAddress(nif);
|
|
||||||
for (InetAddress a : addrs) {
|
|
||||||
ips.add(new JsonPrimitive(a.getHostAddress()));
|
|
||||||
}
|
|
||||||
obj.add("addresses", ips);
|
|
||||||
ifacesArray.add(obj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sendJsonResponse(exchange, 200, ifacesArray);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleConfig(HttpExchange exchange) throws IOException {
|
private void handleConfig(HttpExchange exchange) throws IOException {
|
||||||
if (handleCorsPreflight(exchange)) return;
|
if (handleCorsPreflight(exchange)) return;
|
||||||
String method = exchange.getRequestMethod();
|
String method = exchange.getRequestMethod();
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public class KLALBRoutingProtocol extends Thread{
|
|||||||
while(true) {
|
while(true) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
byte[]ca=MembandBoost.allocateUninitializedArray(65535);
|
byte[]ca=MembandBoost.allocateUninitializedByteArray(65535);
|
||||||
DatagramPacket dgp=new DatagramPacket(ca, ca.length);
|
DatagramPacket dgp=new DatagramPacket(ca, ca.length);
|
||||||
ds.receive(dgp);
|
ds.receive(dgp);
|
||||||
//System.out.println(Arrays.toString( Arrays.copyOf( dgp.getData(),dgp.getLength())));
|
//System.out.println(Arrays.toString( Arrays.copyOf( dgp.getData(),dgp.getLength())));
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user