Compare commits

...

5 Commits

Author SHA1 Message Date
阿斌
e093618e37
Pre Merge pull request !36 from 阿斌/N/A 2025-05-15 02:24:48 +00:00
lin
bb5018c7f4 调整接入信息页面 2025-05-15 10:24:35 +08:00
lin
91d571d8d4 增加设置,支持屏蔽频繁注册不段开关tcp连接的设备 2025-05-15 09:55:37 +08:00
lin
697ba10016 更新Readme 2025-05-14 09:15:15 +08:00
阿斌
da98101aac
update src/main/resources/civilCode.csv.
行政规划错误。江苏南通海门市,修改为海门区,浙江杭州删除下城区、江干区,新增钱塘区,临平区

Signed-off-by: 阿斌 <38912748@qq.com>
2024-12-15 08:58:42 +00:00
7 changed files with 41 additions and 13 deletions

View File

@ -125,14 +125,12 @@ https://gitee.com/pan648540858/wvp-GB28181-pro.git
- [X] 支持跨域请求,支持前后端分离部署
- [X] 支持MysqlPostgresql金仓等数据库
- [X] 支持录制计划, 根据设定的时间对通道进行录制. 暂不支持将录制的内容转发到国标上级
- [X] 支持Onvif, 目前付费提供, 永久免费试用包在知识星球获取
- [X] 支持国标28181-2022协议, 目前付费提供, 永久免费试用包在知识星球获取
- [X] 支持国标信令集群
# 闭源内容
- [X] ONVIF设备的接入,支持点播,云台控制,国标级联点播,自动点播。
- [X] 支持部标1078+808协议支持点播云台控制录像回放位置上报自动点播。
- [X] 支持ONVIF协议设备检索,支持点播,云台控制,国标级联点播,自动点播
- [X] 支持部标1078+808协议支持点播云台控制录像回放位置上报自动点播
- [X] 支持国标28181-2022协议支持巡航轨迹查询PTZ精准控制存储卡格式化设备软件升级OSD配置h265+aac支持辅码流录像倒放等。

View File

@ -195,6 +195,15 @@ public class UserSetting {
*/
private boolean sendPositionOnDemand = true;
/**
* 部分设备会在短时间内发送大量注册 导致协议栈内存溢出 开启此项可以防止这部分设备注册 避免服务崩溃但是会降低系统性能 描述如下
* 默认值为 true
* 将此设置为 false 会使 Stack Server Transaction 进入 TERMINATED 状态后关闭服务器套接字
* 这允许服务器防止客户端发起的基于 TCP 的拒绝服务攻击即发起数百个客户端事务
* 如果为 true默认作则堆栈将保持套接字打开以便以牺牲线程和内存资源为代价来最大化性能 - 使自身容易受到 DOS 攻击
*/
private boolean sipCacheServerConnections = true;
}

View File

@ -98,7 +98,7 @@ public class SipLayer implements CommandLineRunner {
private void addListeningPoint(String monitorIp, int port){
SipStackImpl sipStack;
try {
sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties("GB28181_SIP", userSetting.getSipLog()));
sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties("GB28181_SIP", userSetting.getSipLog(), userSetting.isSipCacheServerConnections()));
sipStack.setMessageParserFactory(new GbStringMsgParserFactory());
} catch (PeerUnavailableException e) {
log.error("[SIP SERVER] SIP服务启动失败 监听地址{}失败,请检查ip是否正确", monitorIp);

View File

@ -12,19 +12,19 @@ import java.util.Properties;
*/
public class DefaultProperties {
public static Properties getProperties(String name, boolean sipLog) {
public static Properties getProperties(String name, boolean sipLog, boolean sipCacheServerConnections) {
Properties properties = new Properties();
properties.setProperty("javax.sip.STACK_NAME", name);
// properties.setProperty("javax.sip.IP_ADDRESS", ip);
// 关闭自动会话
properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off");
/**
* 完整配置参考 gov.nist.javax.sip.SipStackImpl需要下载源码
* gov/nist/javax/sip/SipStackImpl.class
* sip消息的解析在 gov.nist.javax.sip.stack.UDPMessageChannel的processIncomingDataPacket方法
*/
// * gov/nist/javax/sip/SipStackImpl.class
// 接收所有notify请求即使没有订阅
properties.setProperty("gov.nist.javax.sip.DELIVER_UNSOLICITED_NOTIFY", "true");
properties.setProperty("gov.nist.javax.sip.AUTOMATIC_DIALOG_ERROR_HANDLING", "false");
@ -44,6 +44,13 @@ public class DefaultProperties {
// 定义应用程序打算多久审计一次 SIP 堆栈了解其内部线程的健康状况该属性指定连续审计之间的时间以毫秒为单位
properties.setProperty("gov.nist.javax.sip.THREAD_AUDIT_INTERVAL_IN_MILLISECS", "30000");
// 部分设备会在短时间内发送大量注册 导致协议栈内存溢出 开启此项可以防止这部分设备注册 避免服务崩溃但是会降低系统性能 描述如下
// 默认值为 true
// 将此设置为 false 会使 Stack Server Transaction 进入 TERMINATED 状态后关闭服务器套接字
// 这允许服务器防止客户端发起的基于 TCP 的拒绝服务攻击即发起数百个客户端事务
// 如果为 true默认作则堆栈将保持套接字打开以便以牺牲线程和内存资源为代价来最大化性能 - 使自身容易受到 DOS 攻击
properties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS", String.valueOf(sipCacheServerConnections));
properties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", "gov.nist.javax.sip.stack.NioMessageProcessorFactory");
/**

View File

@ -861,7 +861,7 @@
320623,如东县,3206
320681,启东市,3206
320682,如皋市,3206
320684,海门,3206
320684,海门,3206
320685,海安市,3206
3207,连云港市,32
320703,连云区,3207
@ -918,8 +918,6 @@
33,浙江省,
3301,杭州市,33
330102,上城区,3301
330103,下城区,3301
330104,江干区,3301
330105,拱墅区,3301
330106,西湖区,3301
330108,滨江区,3301
@ -927,6 +925,8 @@
330110,余杭区,3301
330111,富阳区,3301
330112,临安区,3301
330113,临平区,3301
330114,钱塘区,3301
330122,桐庐县,3301
330127,淳安县,3301
330182,建德市,3301

1 编号 名称 上级
861 320623 如东县 3206
862 320681 启东市 3206
863 320682 如皋市 3206
864 320684 海门市 海门区 3206
865 320685 海安市 3206
866 3207 连云港市 32
867 320703 连云区 3207
918 33 浙江省
919 3301 杭州市 33
920 330102 上城区 3301
330103 下城区 3301
330104 江干区 3301
921 330105 拱墅区 3301
922 330106 西湖区 3301
923 330108 滨江区 3301
925 330110 余杭区 3301
926 330111 富阳区 3301
927 330112 临安区 3301
928 330113 临平区 3301
929 330114 钱塘区 3301
930 330122 桐庐县 3301
931 330127 淳安县 3301
932 330182 建德市 3301

View File

@ -255,6 +255,12 @@ user-settings:
auto-register-platform: true
# 按需发送位置, 默认发送移动位置订阅时如果位置不变则不发送, 设置为false按照国标间隔持续发送
send-position-on-demand: true
# 部分设备会在短时间内发送大量注册, 导致协议栈内存溢出, 开启此项可以防止这部分设备注册, 避免服务崩溃,但是会降低系统性能, 描述如下
# 默认值为 true。
# 将此设置为 false 会使 Stack 在 Server Transaction 进入 TERMINATED 状态后关闭服务器套接字。
# 这允许服务器防止客户端发起的基于 TCP 的拒绝服务攻击(即发起数百个客户端事务)。
# 如果为 true默认作则堆栈将保持套接字打开以便以牺牲线程和内存资源为代价来最大化性能 - 使自身容易受到 DOS 攻击。
sip-cache-server-connections: true
# 关闭在线文档(生产环境建议关闭)
springdoc:

View File

@ -2,7 +2,7 @@
<div id="configInfo">
<el-dialog
v-el-drag-dialog
title="系统信息"
title="接入信息"
width="=80%"
top="2rem"
:close-on-click-modal="false"
@ -11,7 +11,7 @@
@close="close()"
>
<div id="shared" style="margin-top: 1rem;margin-right: 100px;">
<el-descriptions v-if="configInfoData.sip" title="国标服务信息" :span="2">
<el-descriptions v-if="(!key || key === 'sip') && configInfoData.sip" title="国标服务信息" :span="2">
<el-descriptions-item label="编号">{{ configInfoData.sip.id }}</el-descriptions-item>
<el-descriptions-item label="域">{{ configInfoData.sip.domain }}</el-descriptions-item>
<el-descriptions-item label="IP">{{ configInfoData.sip.showIp }}</el-descriptions-item>
@ -20,6 +20,12 @@
<el-tag size="small">{{ configInfoData.sip.password }}</el-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="key === 'jt1078Config' && configInfoData.jt1078Config" title="部标服务信息" :span="2">
<el-descriptions-item label="端口">{{ configInfoData.jt1078Config.port }}</el-descriptions-item>
<el-descriptions-item label="密码">
<el-tag size="small">{{ configInfoData.jt1078Config.password }}</el-tag>
</el-descriptions-item>
</el-descriptions>
</div>
</el-dialog>
</div>
@ -36,6 +42,7 @@ export default {
data() {
return {
showDialog: false,
key: null,
configInfoData: {
sip: {}
@ -45,9 +52,10 @@ export default {
computed: {},
created() {},
methods: {
openDialog: function(data) {
openDialog: function(data, key) {
console.log(data)
this.showDialog = true
this.key = key
this.configInfoData = data
},
close: function() {