summaryrefslogtreecommitdiff
path: root/beinc_config_sample.json.readme
blob: 1bfd2d7d62d90f756b1ee2c37a9d1094a86da25d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
N.B. This file is not a legitimate .json file!!
You should use beinc_config_sample.json as a base config file for your setup

Since the JSON format doesn't offer support for comments, this file is only used
to illustrate the BEINC config format and describe all available options.

Unless specified otherwise, the values assigned to the given options are their
default values. 

Although the #-character is not a legal JSON comment, it is used in this
documentation to better illustrate the comments.


{
    "server": {  # This whole section is used by the server only. 
                 # It is only used by beinc_server.py and ignored by all other
                 # components

        "general": {  # Applies to the whole server

            # The filename of the private key to use with SSL.
            "ssl_private_key": "/home/user/keys/key.pem",  # default: None

            # The filename of the SSL certificate to use
            "ssl_certificate": "/home/user/certs/cert.crt",  # default: None

			# A list of allowed ciphers in the format of 'openssl ciphers'
			# "auto" - use the Twisted / OpenSSL defaults
			"ssl_ciphers": "auto",  # default: "auto"

			# Encryption method for the BEINC server
			# Possible values:
			# "" or "auto" - Let the server decide
            #                (use the newest possible method)
			# "TLSv1" - TLSv1.0
			# "TLSv1_1" - TLSv1.1
			# "TLSv1_2" - TLSv1.2 (most secure, but requires OpenSSL >= 1.0.1e)
			"ssl_version": "auto",  # default: "auto"

        },

        # A list of instances. Check README for general information about them!
        "instances": [
            {
                # A *unique* name that identifies the instance
                "name": "beinc_name",

                # The password that the client must provide in order to be able
                # to push to / pull from the instance
                "password": "beincpasswd",

                # Possible values:
                # "none" - the instance will serve for queueing
                # "pynotify" - OSD implemented using pynotify (libnotify)
                "osd_system": "pynotify",

                # OSD timeout in seconds
                # The amount of time the OSD message will remain in the screen
                "osd_timeout": 5,

                # How many entries to be kept in the queue
                # (when "osd_system": "none")
                "queue_size": 4
            }
        ]
    },
    "irc_client": {  # This whole section is used by the weechat client only
                     # It is used only by beinc_weechat.py and ignored by all
                     # other components
        "use_current_buffer": 0,  # Show weechat-message in the current buffer
                                  # instead of the system-buffer
        # A list of targets. Check README for general information about them!
        "targets": [
            {
                # Unique name for the defined target
                # Default: "" (making the target useless)
                # The name should match the name of the server instance you
                # want to connect to
                "name": "weechat_main",
                
                # Target URL.
                # Default: "" (making the target useless)
                "target_url": "https://10.0.0.2:9998",

                # Password corresponding to the target BEINC instance
                # Default: ""
                "target_password": "beincpasswd",

                # The filename of the SSL certificate authority (CA) used to 
                # sign the SSL certificate used by the BEINC server
                # Default: "" (don't verify the certificate)
                # It is *highly recommended* to use an SSL connection as well as
                # to verify the server's certificate 
                "target_cert_file": "",

				# A list of preferred ciphers for this target
				# Default: "auto" or "" (use the OpenSSL default ciphers)
				"ssl_ciphers": "ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384",

				# Don't check whether the target's hostname matches the server's
				# certificate.
				# Default: 0
				"disable-hostname-check": 0,

				# Force the client to use a specified SSL/TLS version
				# Valid values: "auto", "TLSv1", "TLSv1_1", "TLSv1_2"
				# Default: "auto" (Let's OpenSSL select the best option)
				"ssl_version": "auto",

                # The timestamp-format used by the BEINC weechat client
                # See 
                # https://docs.python.org/2.7/library/datetime.html#strftime-strptime-behavior
                # for more details
                "target_timestamp_format": "%H:%M:%S",

                # Supported macros:
                # %c - channel name for chan. messages / your nick for prv. msgs
                # %m - the message
                # %n - your nick
                # %p - program name (BEINC)
                # %S - server name (as defined in Weechat)
                # %s - source nick
                # %t - timestamp as defined above
                # ###

                # Title (top OSD line) template for private messages
                "pm_title_template": "%s @ %S",

                # Message (bottom OSD line) template for private messages
                "pm_message_template": "%m",

                # Title (top OSD line) template for channel messages
                "cm_title_template": "%c @ %S",

                # Message (bottom OSD line) template for channel messages
                "cm_message_template": "%s -> %m",

                # Title (top OSD line) template for notification messages
                "nm_title_template": "%c @ %S",

                # Message (bottom OSD line) template for notification messages
                "nm_message_template": "%s -> %m",

                # Channel list
                # Default: [] (empty)
                "channel_list": ["LiberaChat.#python",
                                 "Exile.#test",
                                 "LiberaChat.#gentoo",
                                 "Exile.#pichove"],

                # Nick list
                # Default: [] (empty)
                "nick_list": ["Exile.Blackmore"],

                # Supported policy values:
                #
                # 0 - don't display any messages of the given category
                # 1 - display all messages of the given category
                # 2 - display only messages from channels/nicks that are 
                #     present in the channel_list / nick_list

                # Policy for channel messages
                "channel_messages_policy": 2,

                # Policy for private messages
                "private_messages_policy": 1,

                # Policy for notification messages
                "notifications_policy": 1,

                # Produce debug messages for this target
                "debug": 0,

                # Enable this target by default
                "enabled": 1,

                # Timeout for this target's socket in seconds
                # If the target host is not available 
                # (not returning ICMP packets), Weechat will block during the 
                # timeout, creating inconvenience.
                # 2 seconds is a recommended value if you have a decent line
                # between the beinc_weechat and beinc_server.
                "socket_timeout": 3
            }
        ]
    },
    # The version of this config file
    # Default: 2 (you should really never leave it undefined)
    # Used by beinc_server and beinc_weechat to check whether
    # the config (.json) file is outdated.
    # Every future version of BEINC will be shipped with
    # beinc_config_sample.json and beinc_config_sample.json.readme 
    "config_version": 2
}