This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
solutions-tsg-scripts/roles/tfe/templates/tfe.conf.j2

191 lines
4.5 KiB
Plaintext
Raw Normal View History

2019-06-21 13:27:23 +08:00
[system]
nr_worker_threads={{ tfe.nr_threads }}
2020-09-21 18:33:10 +08:00
enable_kni_v1=0
enable_kni_v2=1
2019-06-21 13:27:23 +08:00
2020-09-21 18:33:10 +08:00
# Only when (disable_coredump == 1 || (enable_breakpad == 1 && enable_breakpad_upload == 1)) is satisfied, the core will not be generated locally
disable_coredump=0
enable_breakpad=1
enable_breakpad_upload=1
breakpad_upload_url={{ breakpad_upload_url }}
2020-09-21 18:33:10 +08:00
# must be /run/tfe/crashreportdue to tmpfile limit
breakpad_minidump_dir=/run/tfe/crashreport
# ask for at least (1 + nr_worker_threads) masks
# the first mask for acceptor thread
# the others mask for worker thread
2020-09-23 14:07:56 +08:00
enable_cpu_affinity=0
2020-09-21 18:33:10 +08:00
cpu_affinity_mask=1-9
# LEAST_CONN = 0; ROUND_ROBIN = 1
load_balance=1
2020-07-24 16:06:23 +08:00
2019-06-21 13:27:23 +08:00
[kni]
2020-09-21 18:33:10 +08:00
# kni v1
#uxdomain=/var/run/.tfe_kni_acceptor_handler
# kni v2
#scm_socket_file=/var/run/.tfe_kmod_scm_socket
# send cmsg
send_switch=1
2020-01-17 01:18:04 +08:00
ip=192.168.100.1
2020-07-24 16:06:23 +08:00
cmsg_port=2475
2020-09-21 18:33:10 +08:00
# watch dog
2019-06-21 13:27:23 +08:00
watchdog_switch=1
watchdog_port=2476
[ssl]
ssl_ja3_debug=0
# ssl version Not available, configured via TSG website
# ssl_max_version=tls13
# ssl_min_version=ssl3
2020-09-21 18:33:10 +08:00
ssl_compression=1
no_ssl2=1
no_ssl3=0
no_tls10=0
no_tls11=0
no_tls12=0
default_ciphers=ALL:-aNULL
no_cert_verify=0
# session ticket
2019-06-21 13:27:23 +08:00
no_session_ticket=0
stek_group_num=4096
2020-09-21 18:33:10 +08:00
stek_rotation_time=3600
# session cache
no_session_cache=0
session_cache_slots=4194304
session_cache_expire_seconds=1800
# service cache
service_cache_slots=4194304
service_cache_expire_seconds=300
service_cache_fail_as_pinning_cnt=4
service_cache_fail_as_proto_err_cnt=5
service_cache_succ_as_app_not_pinning_cnt=0
service_cache_fail_time_window=30
# cert
check_cert_crl=0
2020-09-25 12:12:25 +08:00
{% if tsg_running_type == 2 %}
2019-06-21 13:27:23 +08:00
trusted_cert_load_local=1
2020-09-23 14:07:56 +08:00
trusted_cert_file=resource/tfe/tsg_diagnose_ca.pem
2020-09-25 12:12:25 +08:00
{% else %}
trusted_cert_load_local=1
2020-09-25 12:12:25 +08:00
trusted_cert_file=resource/tfe/tls-ca-bundle.pem
{% endif %}
2019-06-21 13:27:23 +08:00
trusted_cert_dir=resource/tfe/trusted_storage
2020-09-21 18:33:10 +08:00
# master key
log_master_key=0
2019-06-21 13:27:23 +08:00
key_log_file=log/sslkeylog.log
2020-09-21 18:33:10 +08:00
# mid cert cache
mc_cache_enable=1
2020-09-23 14:07:56 +08:00
mc_cache_eth={{ nic_mgr.name }}
mc_cache_broker_list={{ log_kafkabrokers.address }}
mc_cache_topic=PXY-EXCH-INTERMEDIA-CERT
2019-06-21 13:27:23 +08:00
[key_keeper]
#Mode: debug - generate cert with ca_path, normal - generate cert with cert store
#0 on cache 1 off cache
no_cache=0
2020-09-21 18:33:10 +08:00
mode=normal
cert_store_host={{ cert_store_server.address }}
cert_store_port={{ cert_store_server.port }}
2019-09-12 14:56:26 +08:00
ca_path=resource/tfe/tango-ca-v3-trust-ca.pem
2019-06-21 13:27:23 +08:00
untrusted_ca_path=resource/tfe/tango-ca-v3-untrust-ca.pem
2020-09-21 18:33:10 +08:00
hash_slot_size=131072
hash_expire_seconds=300
cert_expire_time=24
# health_check only for "mode=normal" default 1
2020-07-24 16:06:23 +08:00
enable_health_check=1
2019-06-21 13:27:23 +08:00
2020-07-24 16:06:23 +08:00
[debug]
2020-09-21 18:33:10 +08:00
# 1 : enforce tcp passthrough
# 0 : Whether to passthrough depends on the tcp_options in cmsg
2019-06-21 13:27:23 +08:00
passthrough_all_tcp=0
[ratelimit]
2020-09-21 18:33:10 +08:00
read_rate=0
read_burst=0
write_rate=0
write_burst=0
2019-06-21 13:27:23 +08:00
[tcp]
2020-09-21 18:33:10 +08:00
# read rcv_buff/snd_buff options from tfe conf
sz_rcv_buffer=-1
sz_snd_buffer=-1
# 1 : use tcp_options in tfe.conf
# 0 : use tcp_options in cmsg
enable_overwrite=0
tcp_nodelay=1
2019-06-21 13:27:23 +08:00
so_keepalive=1
tcp_keepcnt=8
tcp_keepintvl=15
tcp_keepidle=30
tcp_user_timeout=600
2019-06-21 13:27:23 +08:00
tcp_ttl_upstream=75
tcp_ttl_downstream=70
[stat]
statsd_server=127.0.0.1
statsd_port=58100
2020-07-24 16:06:23 +08:00
statsd_cycle=5
2020-09-21 18:33:10 +08:00
# 1:FS_OUTPUT_STATSD; 2:FS_OUTPUT_INFLUX_LINE
2020-07-24 16:06:23 +08:00
statsd_format=2
2020-09-21 18:33:10 +08:00
histogram_bins=0.5,0.8,0.9,0.95
2019-06-21 13:27:23 +08:00
2020-09-21 18:33:10 +08:00
[traffic_mirror]
{% if tsg_running_type != 2 %}
enable={{ tfe.mirror_enable }}
device=lo
# 0:TRAFFIC_MIRROR_ETHDEV_AF_PACKET; 1:TRAFFIC_MIRROR_ETHDEV_MARSIO
type=0
{% else %}
enable={{ tfe.mirror_enable }}
device={{ nic_traffic_mirror.name }}
# 0:TRAFFIC_MIRROR_ETHDEV_AF_PACKET; 1:TRAFFIC_MIRROR_ETHDEV_MARSIO
type=1
{% endif %}
2020-07-24 16:06:23 +08:00
[kafka]
enable=1
2020-09-21 18:33:10 +08:00
NIC_NAME={{ nic_mgr.name }}
2020-07-24 16:06:23 +08:00
kafka_brokerlist={{ log_kafkabrokers.address }}
kafka_topic=PROXY-EVENT-LOG
device_id_filepath=/opt/tsg/etc/tsg_sn.json
[maat]
2020-09-21 18:33:10 +08:00
# 0:json 1:redis 2:iris
2020-07-24 16:06:23 +08:00
maat_input_mode=1
2020-09-21 18:33:10 +08:00
stat_switch=1
perf_switch=1
2020-07-24 16:06:23 +08:00
table_info=resource/pangu/table_info.conf
2020-09-21 18:33:10 +08:00
accept_path=/opt/tsg/etc/tsg_device_tag.json
stat_file=log/pangu_scan.fs2
effect_interval_s=1
deferred_load_on=0
# Pangu uses accept_tags to support the effective range of the device.
# Traffic mirroring does not need to support the effective range of the device,
# but pangu and traffic mirroring use the same maat configuration file.
# Therefore, there is no need to set accept_tags in tfe.conf,
# just set accept_tags in the tfe_resource_init() code
# accept_tags={"tags":[{"tag":"device_id","value":"device_1"}]}
# json mode conf iterm
2020-07-24 16:06:23 +08:00
json_cfg_file=resource/pangu/pangu_http.json
2020-09-21 18:33:10 +08:00
# redis mode conf iterm
2020-07-24 16:06:23 +08:00
maat_redis_server={{ maat_redis_server.address }}
maat_redis_port_range={{ maat_redis_server.port }}
maat_redis_db_index={{ maat_redis_server.db }}
2020-09-21 18:33:10 +08:00
# iris mode conf iterm
full_cfg_dir=pangu_policy/full/index/
inc_cfg_dir=pangu_policy/inc/index/