TarsCloud_TarsCpp/unit-test/server/hello.conf
2021-08-23 15:40:10 +08:00

438 lines
14 KiB
Plaintext
Executable File

<tars>
<application>
#proxy需要的配置
<client>
#地址
locator = TestApp.FrameworkServer.QueryObj@tcp -h 127.0.0.1 -p 11004
#最大超时时间(毫秒)
sync-invoke-timeout = 50000
async-invoke-timeout = 60000
#刷新端口时间间隔(毫秒)
refresh-endpoint-interval = 100000
#模块间调用[可选]
stat = TestApp.FrameworkServer.StatObj
#发送队列长度
sendqueuelimit = 1000000
#异步回调队列个数限制
asyncqueuecap = 1000000
#网络异步回调线程个数
asyncthread = 3
#网络线程个数
netthread = 2
#合并回调线程和网络线程(以网络线程个数为准)
mergenetasync = 0
#模块名称
modulename = TestApp.HelloServer
#server crt
ca = PROJECT_PATH/certs/server.crt
#can be empty
cert = PROJECT_PATH/certs/client.crt
#can be empty
key = PROJECT_PATH/certs/client.key
<TestApp.HelloServer.AuthObj>
#auth access key
accesskey = tars-test-user
#auth secret key
secretkey = 123456
</TestApp.HelloServer.AuthObj>
<TestApp.HelloServer.SSL1Obj>
#server crt
ca = PROJECT_PATH/certs/server1.crt
#can be empty
# cert = PROJECT_PATH/certs/client1.crt
#can be empty
# key = PROJECT_PATH/certs/client1.key
</TestApp.HelloServer.SSL1Obj>
<TestApp.HelloServer.SSL2Obj>
#server crt
ca = PROJECT_PATH/certs/server1.crt
#can be empty
cert = PROJECT_PATH/certs/client1.crt
#can be empty
key = PROJECT_PATH/certs/client1.key
</TestApp.HelloServer.SSL2Obj>
<TestApp.HelloServer.SSL3Obj>
#auth access key
accesskey = tars-test-user
#auth secret key
secretkey = 123456
#server crt
ca = PROJECT_PATH/certs/server1.crt
#can be empty
cert = PROJECT_PATH/certs/client1.crt
#can be empty
key = PROJECT_PATH/certs/client1.key
</TestApp.HelloServer.SSL3Obj>
</client>
#定义所有绑定的IP
<server>
start_output = ERROR
closecout = 0
#应用名称
app = TestApp
#服务名称
server = HelloServer
#服务的数据目录,可执行文件,配置文件等
basepath = .
datapath = .
#日志路径
logpath = .
#网络线程个数
netthread = 1
#合并网络和业务线程(以网络线程个数为准)
mergenetimp = 0
opencoroutine = 0
loglevel=TARS
#本地管理套接字[可选]
local = tcp -h 127.0.0.1 -p 18001 -t 10000
#配置中心的地址[可选]
config = TestApp.FrameworkServer.ConfigObj
#配置中心的地址[可选]
# notify = tars.tarsconfig.NotifyObj
#远程LogServer[可选]
log = TestApp.FrameworkServer.LogObj
# manuallisten = 1
#client crt, it can be empty when verifyclient is 0
# ca = PROJECT_PATH/certs/client.crt
cert = PROJECT_PATH/certs/server.crt
key = PROJECT_PATH/certs/server.key
ciphers =
#default is 0
verifyclient = 1
#配置绑定端口
<HelloAdapter>
#ip:port:timeout
#endpoint = tcp -h harbor.tars.com -p 45460 -t 60000
endpoint = tcp -h 127.0.0.1 -p 25460 -t 10000
#endpoint = udp -h * -p 45460 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.HelloObj
#队列最大包个数
queuecap = 1000000
</HelloAdapter>
<TransAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 15460 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.TransObj
#队列最大包个数
queuecap = 1000000
</TransAdapter>
<TransDstAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 15760 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.TransDstObj
#队列最大包个数
queuecap = 1000000
</TransDstAdapter>
<TransWupAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 15461 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.TransWupObj
#队列最大包个数
queuecap = 1000000
protocol = not-tars
</TransWupAdapter>
<HttpAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 8080 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.HttpObj
#队列最大包个数
queuecap = 1000000
protocol = not-tars
</HttpAdapter>
<HttpsAdapter>
#ip:port:timeout
endpoint = ssl -h 127.0.0.1 -p 8081 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.HttpsObj
#队列最大包个数
queuecap = 1000000
protocol = not-tars
</HttpsAdapter>
<Ipv6Adapter>
#ip:port:timeout
#endpoint = tcp -h fe80::9e5c:8eff:fe95:5cda%enp3s0 -p 25460 -t 10000
#endpoint = tcp -h fe80::9e5c:8eff:fe95:5cda%enp3s0 -p 25460 -t 10000
endpoint = tcp -h ::1 -p 25460 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.Ipv6Obj
#队列最大包个数
queuecap = 1000000
</Ipv6Adapter>
<AuthObjAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 9016 -t 60000 -e 1
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.AuthObj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = tars
accesskey=tars-test-user
secretkey=123456
</AuthObjAdapter>
<SSLHelloAdapter>
#ip:port:timeout
endpoint = ssl -h 127.0.0.1 -p 9005 -t 60000
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.SSLObj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = tars
</SSLHelloAdapter>
<SSLHello1Adapter>
#ip:port:timeout
endpoint = ssl -h 127.0.0.1 -p 9006 -t 60000
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.SSL1Obj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = tars
# ca = PROJECT_PATH/certs/client1.crt
cert = PROJECT_PATH/certs/server1.crt
key = PROJECT_PATH/certs/server1.key
#default is 0
verifyclient = 0
ciphers =
</SSLHello1Adapter>
<SSLHello2Adapter>
#ip:port:timeout
endpoint = ssl -h 127.0.0.1 -p 9007 -t 60000
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.SSL2Obj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = tars
ca = PROJECT_PATH/certs/client1.crt
cert = PROJECT_PATH/certs/server1.crt
key = PROJECT_PATH/certs/server1.key
#default is 0
verifyclient = 1
ciphers =
</SSLHello2Adapter>
<SSLHello3Adapter>
#ip:port:timeout
endpoint = ssl -h 127.0.0.1 -p 9008 -t 60000 -e 1
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.SSL3Obj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = tars
#auth access key
accesskey = tars-test-user
#auth secret key
secretkey = 123456
ca = PROJECT_PATH/certs/client1.crt
cert = PROJECT_PATH/certs/server1.crt
key = PROJECT_PATH/certs/server1.key
#default is 0
verifyclient = 1
ciphers =
</SSLHello3Adapter>
<CustomAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 9400 -t 60000
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.CustomObj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = not_tars
</CustomAdapter>
<UdpObjAdapter>
#ip:port:timeout
endpoint = udp -h 127.0.0.1 -p 9016 -t 60000 -e 1
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.UdpObj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = tars
</UdpObjAdapter>
<UdpIpv6Adapter>
#ip:port:timeout
endpoint = udp -h ::1 -p 25460 -t 60000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 5
#处理对象
servant = TestApp.HelloServer.UdpIpv6Obj
#队列最大包个数
queuecap = 1000000
</UdpIpv6Adapter>
<PushAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 9300 -t 60000
#allow ip
allow =
#max connection num
maxconns = 4096
#imp thread num
threads = 5
#servant
servant = TestApp.HelloServer.PushObj
#queue capacity
queuecap = 1000000
#tars protocol
protocol = not_tars
</PushAdapter>
<HelloTimeoutAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 25860 -t 5000
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 1
#处理对象
servant = TestApp.HelloServer.HelloTimeoutObj
#队列最大包个数
queuecap = 1000000
#protocol = not-tars
</HelloTimeoutAdapter>
<HelloNoTimeoutAdapter>
#ip:port:timeout
endpoint = tcp -h 127.0.0.1 -p 26460 -t 0
#允许的IP地址
allow =
#最大连接数
maxconns = 4096
#当前线程个数
threads = 1
#处理对象
servant = TestApp.HelloServer.HelloNoTimeoutObj
#队列最大包个数
queuecap = 1000000
#protocol = not-tars
</HelloNoTimeoutAdapter>
</server>
</application>
</tars>