mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-19 11:48:22 +01:00
update apps to new Antunnel frame format
This commit is contained in:
parent
e863fef93d
commit
959d5966af
@ -5,5 +5,6 @@ talk to server side applications via the [`antd-tunnel-pligin`](https://github.c
|
||||
using a single websocket API.
|
||||
|
||||
## Changes log
|
||||
- v0.1.9-b Use the new client size minima frame format (reduces frame overhead)
|
||||
- v0.1.4-a Reduce frame overhead
|
||||
- v0.1.3-a Remove magic number in the frame to reduce frame overhead
|
||||
|
@ -5,5 +5,6 @@ talk to server side applications via the [`antd-tunnel-pligin`](https://github.c
|
||||
using a single websocket API.
|
||||
|
||||
## Changes log
|
||||
- v0.1.9-b Use the new client size minima frame format (reduces frame overhead)
|
||||
- v0.1.4-a Reduce frame overhead
|
||||
- v0.1.3-a Remove magic number in the frame to reduce frame overhead
|
||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@lxsang.me"
|
||||
},
|
||||
"version":"0.1.8-a",
|
||||
"version":"0.1.9-b",
|
||||
"category":"Library",
|
||||
"iconclass":"fa fa-adn",
|
||||
"mimes":["none"],
|
||||
|
Binary file not shown.
@ -12,33 +12,27 @@ class Msg
|
||||
|
||||
|
||||
as_raw:() ->
|
||||
length = 13 + @header.size
|
||||
length = 5 + @header.size
|
||||
arr = new Uint8Array(length)
|
||||
arr.set(Msg.MAGIC_START, 0)
|
||||
arr[2] = @header.type
|
||||
arr[0] = @header.type
|
||||
bytes = Msg.bytes_of @header.cid
|
||||
arr.set(bytes,3)
|
||||
arr.set(bytes,1)
|
||||
bytes = Msg.bytes_of @header.sid
|
||||
arr.set(bytes,5)
|
||||
bytes = Msg.bytes_of @header.size, 4
|
||||
arr.set(bytes,7)
|
||||
arr.set(bytes,3)
|
||||
if @data
|
||||
arr.set(@data, 11)
|
||||
arr.set(Msg.MAGIC_END, @header.size + 11)
|
||||
arr.set(@data, 5)
|
||||
arr.buffer
|
||||
|
||||
Msg.decode = (raw) ->
|
||||
new Promise (resolve, reject) ->
|
||||
msg = new Msg()
|
||||
if(Msg.int_from(Msg.MAGIC_START, 0) != Msg.int_from(raw, 0))
|
||||
return reject("Unmatch message begin magic number")
|
||||
msg.header.type = raw[2]
|
||||
msg.header.cid = Msg.int_from(raw, 3)
|
||||
msg.header.sid = Msg.int_from(raw,5)
|
||||
msg.header.size = Msg.int_from(raw, 7,4)
|
||||
msg.data = raw.slice(11, 11+msg.header.size)
|
||||
if(Msg.int_from(Msg.MAGIC_END, 0) != Msg.int_from(raw, 11+msg.header.size))
|
||||
return reject("Unmatch message end magic number")
|
||||
if(not raw or raw.length < 5)
|
||||
return reject("Invalid message format")
|
||||
msg.header.type = raw[0]
|
||||
msg.header.cid = Msg.int_from(raw, 1)
|
||||
msg.header.sid = Msg.int_from(raw,3)
|
||||
msg.header.size = raw.length - 5
|
||||
msg.data = raw.slice(5, 5+msg.header.size)
|
||||
resolve msg
|
||||
|
||||
|
||||
@ -67,8 +61,6 @@ Msg.SUBSCRIBE = 2
|
||||
Msg.UNSUBSCRIBE = 3
|
||||
Msg.CTRL = 7
|
||||
Msg.PING = 8
|
||||
Msg.MAGIC_END = [0x44, 0x54]
|
||||
Msg.MAGIC_START = [0x4e, 0x41 ]
|
||||
|
||||
class Subscriber
|
||||
constructor: (@channel) ->
|
||||
|
@ -9,7 +9,7 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@lxsang.me"
|
||||
},
|
||||
"version":"0.1.8-a",
|
||||
"version":"0.1.9-b",
|
||||
"category":"Library",
|
||||
"iconclass":"fa fa-adn",
|
||||
"mimes":["none"],
|
||||
|
@ -6,5 +6,6 @@ using Antunnel protocol. Features:
|
||||
* Recording last n log messages
|
||||
|
||||
## Change logs
|
||||
* v0.1.2-b update dependencies to latest
|
||||
* v0.1.1-b minor fix on dialog handling, fix incorrect package version
|
||||
* v0.1.0-b first beta version
|
@ -6,5 +6,6 @@ using Antunnel protocol. Features:
|
||||
* Recording last n log messages
|
||||
|
||||
## Change logs
|
||||
* v0.1.2-b update dependencies to latest
|
||||
* v0.1.1-b minor fix on dialog handling, fix incorrect package version
|
||||
* v0.1.0-b first beta version
|
@ -7,12 +7,12 @@
|
||||
"author": "",
|
||||
"email": ""
|
||||
},
|
||||
"version":"0.1.1-b",
|
||||
"version":"0.1.2-b",
|
||||
"category":"System",
|
||||
"iconclass":"bi bi-receipt-cutoff",
|
||||
"mimes":["none"],
|
||||
"dependencies": [
|
||||
"Antunnel@0.1.8-a"
|
||||
"Antunnel@0.1.9-b"
|
||||
],
|
||||
"locale": {}
|
||||
}
|
Binary file not shown.
@ -7,12 +7,12 @@
|
||||
"author": "",
|
||||
"email": ""
|
||||
},
|
||||
"version":"0.1.1-b",
|
||||
"version":"0.1.2-b",
|
||||
"category":"System",
|
||||
"iconclass":"bi bi-receipt-cutoff",
|
||||
"mimes":["none"],
|
||||
"dependencies": [
|
||||
"Antunnel@0.1.8-a"
|
||||
"Antunnel@0.1.9-b"
|
||||
],
|
||||
"locale": {}
|
||||
}
|
114
SystemControl/build.json
Normal file
114
SystemControl/build.json
Normal file
@ -0,0 +1,114 @@
|
||||
{
|
||||
"name": "SystemControl",
|
||||
"targets": {
|
||||
"init": {
|
||||
"jobs": [
|
||||
{
|
||||
"name": "vfs-mkdir",
|
||||
"data": [
|
||||
"build",
|
||||
"build/debug",
|
||||
"build/release"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"coffee": {
|
||||
"require": [
|
||||
"coffee"
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"name": "coffee-compile",
|
||||
"data": {
|
||||
"src": [
|
||||
"coffees/SysmondService.coffee",
|
||||
"coffees/main.coffee"
|
||||
],
|
||||
"dest": "build/debug/coffee-main.js"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"cat": {
|
||||
"jobs": [
|
||||
{
|
||||
"name": "vfs-cat",
|
||||
"data": {
|
||||
"src": [
|
||||
"build/debug/coffee-main.js",
|
||||
"javascripts/d3.v3.js",
|
||||
"javascripts/epoch.js"
|
||||
],
|
||||
"dest": "build/debug/main.js"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vfs-cat",
|
||||
"data": {
|
||||
"src": [
|
||||
"css/epoch.css",
|
||||
"css/main.css"
|
||||
],
|
||||
"dest": "build/debug/main.css"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vfs-rm",
|
||||
"data": [
|
||||
"build/debug/coffee-main.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"uglify": {
|
||||
"require": [
|
||||
"terser"
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"name": "terser-uglify",
|
||||
"data": [
|
||||
"build/debug/main.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"copy": {
|
||||
"jobs": [
|
||||
{
|
||||
"name": "vfs-cp",
|
||||
"data": {
|
||||
"src": [
|
||||
"assets/scheme.html",
|
||||
"package.json",
|
||||
"README.md"
|
||||
],
|
||||
"dest": "build/debug"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"require": [
|
||||
"zip"
|
||||
],
|
||||
"depend": [
|
||||
"init",
|
||||
"coffee",
|
||||
"cat",
|
||||
"uglify",
|
||||
"copy"
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"name": "zip-mk",
|
||||
"data": {
|
||||
"src": "build/debug",
|
||||
"dest": "build/release/SystemControl.zip"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -11,9 +11,9 @@
|
||||
"email": ""
|
||||
},
|
||||
"dependencies": [
|
||||
"Antunnel@0.1.8-a"
|
||||
"Antunnel@0.1.9-b"
|
||||
],
|
||||
"version":"0.1.9-a",
|
||||
"version":"0.1.10-a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-tachometer",
|
||||
"mimes":["none"],
|
||||
|
Binary file not shown.
@ -11,9 +11,9 @@
|
||||
"email": ""
|
||||
},
|
||||
"dependencies": [
|
||||
"Antunnel@0.1.8-a"
|
||||
"Antunnel@0.1.9-b"
|
||||
],
|
||||
"version":"0.1.9-a",
|
||||
"version":"0.1.10-a",
|
||||
"category":"System",
|
||||
"iconclass":"fa fa-tachometer",
|
||||
"mimes":["none"],
|
||||
|
@ -55,7 +55,7 @@
|
||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Antunnel/README.md",
|
||||
"category": "Library",
|
||||
"author": "Xuan Sang LE",
|
||||
"version": "0.1.8-a",
|
||||
"version": "0.1.9-b",
|
||||
"dependencies": [],
|
||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Antunnel/build/release/Antunnel.zip"
|
||||
},
|
||||
@ -335,8 +335,8 @@
|
||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/ServerLogClient/README.md",
|
||||
"category": "System",
|
||||
"author": "",
|
||||
"version": "0.1.1-b",
|
||||
"dependencies": ["Antunnel@0.1.8-a"],
|
||||
"version": "0.1.2-b",
|
||||
"dependencies": ["Antunnel@0.1.9-b"],
|
||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/ServerLogClient/build/release/ServerLogClient.zip"
|
||||
},
|
||||
{
|
||||
@ -375,8 +375,8 @@
|
||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/SystemControl/README.md",
|
||||
"category": "System",
|
||||
"author": "",
|
||||
"version": "0.1.9-a",
|
||||
"dependencies": ["Antunnel@0.1.8-a"],"version":"0.1.9-a","category":"System","iconclass":"fafa-tachometer","mimes":["none"],
|
||||
"version": "0.1.10-a",
|
||||
"dependencies": ["Antunnel@0.1.9-b"],"version":"0.1.10-a","category":"System","iconclass":"fafa-tachometer","mimes":["none"],
|
||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/SystemControl/build/release/SystemControl.zip"
|
||||
},
|
||||
{
|
||||
@ -415,8 +415,8 @@
|
||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/README.md",
|
||||
"category": "System",
|
||||
"author": "Xuan Sang LE",
|
||||
"version": "0.1.14-a",
|
||||
"dependencies": ["Antunnel@0.1.8-a","xTerm@4.8.1-r"],
|
||||
"version": "0.1.15-a",
|
||||
"dependencies": ["Antunnel@0.1.9-b","xTerm@4.8.1-r"],
|
||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/build/release/vTerm.zip"
|
||||
},
|
||||
{
|
||||
|
@ -12,6 +12,7 @@ VTerm depends on the server side **tunnel** plugin and the AntOS **Antunnel**
|
||||
client side package
|
||||
|
||||
## Change logs
|
||||
-v0.1.15-a update dependencies to latest
|
||||
- v0.1.14-a: Change app icon
|
||||
- v0.1.12-a: Add copy/paste shortcuts (CTRL+SHIFT+C/ CTRL+SHIFT+V)
|
||||
- v0.1.9-a: Update dependencies to latest
|
||||
|
81
vTerm/build.json
Normal file
81
vTerm/build.json
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
"name": "vTerm",
|
||||
"targets": {
|
||||
"init": {
|
||||
"jobs": [
|
||||
{
|
||||
"name": "vfs-mkdir",
|
||||
"data": [
|
||||
"build",
|
||||
"build/debug",
|
||||
"build/release"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"coffee": {
|
||||
"require": [
|
||||
"coffee"
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"name": "coffee-compile",
|
||||
"data": {
|
||||
"src": [
|
||||
"main.coffee"
|
||||
],
|
||||
"dest": "build/debug/main.js"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"uglify": {
|
||||
"require": [
|
||||
"terser"
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"name": "terser-uglify",
|
||||
"data": [
|
||||
"build/debug/main.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"copy": {
|
||||
"jobs": [
|
||||
{
|
||||
"name": "vfs-cp",
|
||||
"data": {
|
||||
"src": [
|
||||
"scheme.html",
|
||||
"package.json",
|
||||
"README.md"
|
||||
],
|
||||
"dest": "build/debug"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"require": [
|
||||
"zip"
|
||||
],
|
||||
"depend": [
|
||||
"init",
|
||||
"coffee",
|
||||
"uglify",
|
||||
"copy"
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"name": "zip-mk",
|
||||
"data": {
|
||||
"src": "build/debug",
|
||||
"dest": "build/release/vTerm.zip"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ VTerm depends on the server side **tunnel** plugin and the AntOS **Antunnel**
|
||||
client side package
|
||||
|
||||
## Change logs
|
||||
-v0.1.15-a update dependencies to latest
|
||||
- v0.1.14-a: Change app icon
|
||||
- v0.1.12-a: Add copy/paste shortcuts (CTRL+SHIFT+C/ CTRL+SHIFT+V)
|
||||
- v0.1.9-a: Update dependencies to latest
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -6,12 +6,12 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.1.14-a",
|
||||
"version":"0.1.15-a",
|
||||
"category":"System",
|
||||
"iconclass":"bi bi-terminal-fill",
|
||||
"mimes":["none"],
|
||||
"dependencies": [
|
||||
"Antunnel@0.1.8-a",
|
||||
"Antunnel@0.1.9-b",
|
||||
"xTerm@4.8.1-r"
|
||||
],
|
||||
"locales":{
|
||||
|
Binary file not shown.
Binary file not shown.
@ -6,12 +6,12 @@
|
||||
"author": "Xuan Sang LE",
|
||||
"email": "xsang.le@gmail.com"
|
||||
},
|
||||
"version":"0.1.14-a",
|
||||
"version":"0.1.15-a",
|
||||
"category":"System",
|
||||
"iconclass":"bi bi-terminal-fill",
|
||||
"mimes":["none"],
|
||||
"dependencies": [
|
||||
"Antunnel@0.1.8-a",
|
||||
"Antunnel@0.1.9-b",
|
||||
"xTerm@4.8.1-r"
|
||||
],
|
||||
"locales":{
|
||||
|
Loading…
Reference in New Issue
Block a user