config.conf 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <tars>
  2. <application>
  3. <client>
  4. #tarsregistry locator
  5. locator = tars.tarsregistry.QueryObj@tcp -h 127.0.0.1 -p 17890
  6. #max invoke timeout
  7. sync-invoke-timeout = 5000
  8. #refresh endpoint interval
  9. refresh-endpoint-interval = 10000
  10. #stat obj
  11. stat = tars.tarsstat.StatObj
  12. #max send queue length limit
  13. sendqueuelimit = 100000
  14. #async queue length limit
  15. asyncqueuecap = 100000
  16. #async callback thread num
  17. asyncthread = 3
  18. #net thread
  19. netthread = 1
  20. #merge net and sync thread
  21. mergenetasync = 0
  22. #module name
  23. modulename = TestApp.SSLServer
  24. </client>
  25. <server>
  26. #not cout
  27. closecout = 0
  28. #app name
  29. app = TestApp
  30. #server name
  31. server = SSLServer
  32. #path
  33. basepath = ./
  34. datapath = ./
  35. #log path
  36. logpath = ./
  37. #merge net and imp thread
  38. mergenetimp = 0
  39. #local ip, for tarsnode
  40. # local = tcp -h 127.0.0.1 -p 15001 -t 10000
  41. #tarsnode
  42. # node = ServerObj@tcp -h 127.0.0.1 -p 2345 -t 10000
  43. #config obj
  44. # config = tars.tarsconfig.ConfigObj
  45. #notify obj
  46. # notify = tars.tarsconfig.NotifyObj
  47. #log obj
  48. # log = tars.tarslog.LogObj
  49. #client crt, it can be empty when verifyclient is 0
  50. ca = ../examples/SSLDemo/certs/client.crt
  51. cert = ../examples/SSLDemo/certs/server.crt
  52. key = ../examples/SSLDemo/certs/server.key
  53. #default is 0
  54. verifyclient = 1
  55. <HelloAdapter>
  56. #ip:port:timeout
  57. endpoint = ssl -h 127.0.0.1 -p 9005 -t 10000
  58. #allow ip
  59. allow =
  60. #max connection num
  61. maxconns = 4096
  62. #imp thread num
  63. threads = 5
  64. #servant
  65. servant = TestApp.SSLServer.SSLObj
  66. #queue capacity
  67. queuecap = 1000000
  68. #tars protocol
  69. protocol = tars
  70. </HelloAdapter>
  71. <Hello1Adapter>
  72. #ip:port:timeout
  73. endpoint = ssl -h 127.0.0.1 -p 9006 -t 10000
  74. #allow ip
  75. allow =
  76. #max connection num
  77. maxconns = 4096
  78. #imp thread num
  79. threads = 5
  80. #servant
  81. servant = TestApp.SSLServer.SSL1Obj
  82. #queue capacity
  83. queuecap = 1000000
  84. #tars protocol
  85. protocol = tars
  86. # ca = ../examples/SSLDemo/certs/client1.crt
  87. cert = ../examples/SSLDemo/certs/server1.crt
  88. key = ../examples/SSLDemo/certs/server1.key
  89. #default is 0
  90. verifyclient = 0
  91. </Hello1Adapter>
  92. <Hello2Adapter>
  93. #ip:port:timeout
  94. endpoint = ssl -h 127.0.0.1 -p 9007 -t 10000
  95. #allow ip
  96. allow =
  97. #max connection num
  98. maxconns = 4096
  99. #imp thread num
  100. threads = 5
  101. #servant
  102. servant = TestApp.SSLServer.SSL2Obj
  103. #queue capacity
  104. queuecap = 1000000
  105. #tars protocol
  106. protocol = tars
  107. ca = ../examples/SSLDemo/certs/client1.crt
  108. cert = ../examples/SSLDemo/certs/server1.crt
  109. key = ../examples/SSLDemo/certs/server1.key
  110. #default is 0
  111. verifyclient = 1
  112. </Hello2Adapter>
  113. <Hello3Adapter>
  114. #ip:port:timeout
  115. endpoint = ssl -h 127.0.0.1 -p 9008 -t 10000 -e 1
  116. #allow ip
  117. allow =
  118. #max connection num
  119. maxconns = 4096
  120. #imp thread num
  121. threads = 5
  122. #servant
  123. servant = TestApp.SSLServer.SSL3Obj
  124. #queue capacity
  125. queuecap = 1000000
  126. #tars protocol
  127. protocol = tars
  128. #auth access key
  129. accesskey = tars-test-user
  130. #auth secret key
  131. secretkey = 123456
  132. ca = ../examples/SSLDemo/certs/client1.crt
  133. cert = ../examples/SSLDemo/certs/server1.crt
  134. key = ../examples/SSLDemo/certs/server1.key
  135. #default is 0
  136. verifyclient = 1
  137. </Hello3Adapter>
  138. </server>
  139. </application>
  140. </tars>