[+] KMS配置

This commit is contained in:
acgist
2022-12-02 08:45:44 +08:00
parent 90870f997f
commit 4a0e1ebbc7
7 changed files with 146 additions and 48 deletions

View File

@@ -0,0 +1,60 @@
package com.acgist.taoyao.boot.config;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* KMS配置
*
* @author acgist
*/
@Getter
@Setter
@Schema(title = "KMS配置", description = "KMS配置")
public class KmsProperties {
/**
* KMS主机
*/
@Schema(title = "KMS主机", description = "KMS主机")
private String host;
/**
* KMS端口
*/
@Schema(title = "KMS端口", description = "KMS端口")
private Integer port;
/**
* KMS协议
*/
@Schema(title = "KMS协议", description = "KMS协议")
private String schema;
/**
* KMS地址
*/
@Schema(title = "KMS地址", description = "KMS地址")
private String websocket;
/**
* KMS用户
*/
@Schema(title = "KMS用户", description = "KMS用户")
@JsonIgnore
private String username;
/**
* KMS密码
*/
@Schema(title = "KMS密码", description = "KMS密码")
@JsonIgnore
private String password;
/**
* @return 完整KMS地址
*/
@Schema(title = "完整KMS地址", description = "完整KMS地址")
public String getAddress() {
return this.schema + "://" + this.host + ":" + this.port + this.websocket;
}
}

View File

@@ -0,0 +1,46 @@
package com.acgist.taoyao.boot.config;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
/**
* 信令配置
*
* @author acgist
*/
@Getter
@Setter
@Schema(title = "信令配置", description = "信令配置")
public class SignalProperties {
/**
* 信令主机
*/
@Schema(title = "信令主机", description = "信令主机")
private String host;
/**
* 信令端口
*/
@Schema(title = "信令端口", description = "信令端口")
private Integer port;
/**
* 信令协议
*/
@Schema(title = "信令协议", description = "信令协议")
private String schema;
/**
* 信令地址
*/
@Schema(title = "信令地址", description = "信令地址")
private String websocket;
/**
* @return 完整信令地址
*/
@Schema(title = "完整信令地址", description = "完整信令地址")
public String getAddress() {
return this.schema + "://" + this.host + ":" + this.port + this.websocket;
}
}

View File

@@ -44,6 +44,16 @@ public class WebrtcProperties {
*/
@Schema(title = "架构模型", description = "WebRTC架构模型")
private Framework framework;
/**
* 媒体最小端口
*/
@Schema(title = "媒体最小端口", description = "媒体最小端口")
private Integer minPort;
/**
* 媒体最大端口
*/
@Schema(title = "媒体最大端口", description = "媒体最大端口")
private Integer maxPort;
/**
* stun服务器
*/
@@ -55,42 +65,14 @@ public class WebrtcProperties {
@Schema(title = "turn服务器", description = "turn服务器")
private String[] turn;
/**
* 信令主机
* KMS配置
*/
@Schema(title = "信令主机", description = "信令主机")
private String host;
@Schema(title = "KMS配置", description = "KMS配置")
private KmsProperties kms;
/**
* 信令端口
* 信令配置
*/
@Schema(title = "信令端口", description = "信令端口")
private Integer port;
/**
* 信令协议
*/
@Schema(title = "信令协议", description = "信令协议")
private String schema;
/**
* 信令地址
*/
@Schema(title = "信令地址", description = "信令地址")
private String websocket;
/**
* 媒体最小端口
*/
@Schema(title = "媒体最小端口", description = "媒体最小端口")
private Integer minPort;
/**
* 媒体最大端口
*/
@Schema(title = "媒体最大端口", description = "媒体最大端口")
private Integer maxPort;
/**
* 完整信令地址
*/
@Schema(title = "完整信令地址", description = "完整信令地址")
public String getSignalAddress() {
return this.schema + "://" + this.host + ":" + this.port + this.websocket;
}
@Schema(title = "信令配置", description = "信令配置")
private SignalProperties signal;
}