Skip to content

Commit 906ba99

Browse files
authored
Merge pull request #36 from code-rabi/fix/alpine-musl-support
fix(gateway): support Alpine/musl-libc containers + better spawn diagnostics
2 parents fef6474 + 3f82e62 commit 906ba99

275 files changed

Lines changed: 16191 additions & 12 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ your IB account to retrieve market data, check positions, and place trades.
4545
**No additional installations required!** This package includes:
4646

4747
- Pre-configured IB Gateway for all platforms (Linux, macOS, Windows)
48-
- Java Runtime Environment (JRE) for IB Gateway
48+
- Java Runtime Environment (JRE) for IB Gateway, including a musl-libc build for Alpine-based containers (e.g. `node:lts-alpine`, supergateway)
4949
- All necessary dependencies
5050

5151
You only need:

runtime/linux-arm64-musl/bin/java

12.5 KB
Binary file not shown.
12.5 KB
Binary file not shown.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
############################################################
2+
# Default Logging Configuration File
3+
#
4+
# You can use a different file by specifying a filename
5+
# with the java.util.logging.config.file system property.
6+
# For example java -Djava.util.logging.config.file=myfile
7+
############################################################
8+
9+
############################################################
10+
# Global properties
11+
############################################################
12+
13+
# "handlers" specifies a comma separated list of log Handler
14+
# classes. These handlers will be installed during VM startup.
15+
# Note that these classes must be on the system classpath.
16+
# By default we only configure a ConsoleHandler, which will only
17+
# show messages at the INFO and above levels.
18+
handlers= java.util.logging.ConsoleHandler
19+
20+
# To also add the FileHandler, use the following line instead.
21+
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
22+
23+
# Default global logging level.
24+
# This specifies which kinds of events are logged across
25+
# all loggers. For any given facility this global level
26+
# can be overriden by a facility specific level
27+
# Note that the ConsoleHandler also has a separate level
28+
# setting to limit messages printed to the console.
29+
.level= INFO
30+
31+
############################################################
32+
# Handler specific properties.
33+
# Describes specific configuration info for Handlers.
34+
############################################################
35+
36+
# default file output is in user's home directory.
37+
java.util.logging.FileHandler.pattern = %h/java%u.log
38+
java.util.logging.FileHandler.limit = 50000
39+
java.util.logging.FileHandler.count = 1
40+
# Default number of locks FileHandler can obtain synchronously.
41+
# This specifies maximum number of attempts to obtain lock file by FileHandler
42+
# implemented by incrementing the unique field %u as per FileHandler API documentation.
43+
java.util.logging.FileHandler.maxLocks = 100
44+
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
45+
46+
# Limit the message that are printed on the console to INFO and above.
47+
java.util.logging.ConsoleHandler.level = INFO
48+
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
49+
50+
# Example to customize the SimpleFormatter output format
51+
# to print one-line log message like this:
52+
# <level>: <log message> [<date/time>]
53+
#
54+
# java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n
55+
56+
############################################################
57+
# Facility specific properties.
58+
# Provides extra control for each logger.
59+
############################################################
60+
61+
# For example, set the com.xyz.foo logger to only log SEVERE
62+
# messages:
63+
com.xyz.foo.level = SEVERE
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
############################################################
2+
# Default Networking Configuration File
3+
#
4+
# This file may contain default values for the networking system properties.
5+
# These values are only used when the system properties are not specified
6+
# on the command line or set programmatically.
7+
# For now, only the various proxy settings can be configured here.
8+
############################################################
9+
10+
# Whether or not the DefaultProxySelector will default to System Proxy
11+
# settings when they do exist.
12+
# Set it to 'true' to enable this feature and check for platform
13+
# specific proxy settings
14+
# Note that the system properties that do explicitly set proxies
15+
# (like http.proxyHost) do take precedence over the system settings
16+
# even if java.net.useSystemProxies is set to true.
17+
18+
java.net.useSystemProxies=false
19+
20+
#------------------------------------------------------------------------
21+
# Proxy configuration for the various protocol handlers.
22+
# DO NOT uncomment these lines if you have set java.net.useSystemProxies
23+
# to true as the protocol specific properties will take precedence over
24+
# system settings.
25+
#------------------------------------------------------------------------
26+
27+
# HTTP Proxy settings. proxyHost is the name of the proxy server
28+
# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
29+
# value is 80) and nonProxyHosts is a '|' separated list of hostnames which
30+
# should be accessed directly, ignoring the proxy server (default value is
31+
# localhost & 127.0.0.1).
32+
#
33+
# http.proxyHost=
34+
# http.proxyPort=80
35+
http.nonProxyHosts=localhost|127.*|[::1]
36+
#
37+
# HTTPS Proxy Settings. proxyHost is the name of the proxy server
38+
# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
39+
# value is 443). The HTTPS protocol handlers uses the http nonProxyHosts list.
40+
#
41+
# https.proxyHost=
42+
# https.proxyPort=443
43+
#
44+
# FTP Proxy settings. proxyHost is the name of the proxy server
45+
# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
46+
# value is 80) and nonProxyHosts is a '|' separated list of hostnames which
47+
# should be accessed directly, ignoring the proxy server (default value is
48+
# localhost & 127.0.0.1).
49+
#
50+
# ftp.proxyHost=
51+
# ftp.proxyPort=80
52+
ftp.nonProxyHosts=localhost|127.*|[::1]
53+
#
54+
# Gopher Proxy settings. proxyHost is the name of the proxy server
55+
# (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
56+
# value is 80)
57+
#
58+
# gopher.proxyHost=
59+
# gopher.proxyPort=80
60+
#
61+
# Socks proxy settings. socksProxyHost is the name of the proxy server
62+
# (e.g. socks.domain.com), socksProxyPort is the port number to use
63+
# (default value is 1080)
64+
#
65+
# socksProxyHost=
66+
# socksProxyPort=1080
67+
#
68+
# HTTP Keep Alive settings. remainingData is the maximum amount of data
69+
# in kilobytes that will be cleaned off the underlying socket so that it
70+
# can be reused (default value is 512K), queuedConnections is the maximum
71+
# number of Keep Alive connections to be on the queue for clean up (default
72+
# value is 10).
73+
# http.KeepAlive.remainingData=512
74+
# http.KeepAlive.queuedConnections=10
75+
76+
# Authentication Scheme restrictions for HTTP and HTTPS.
77+
#
78+
# In some environments certain authentication schemes may be undesirable
79+
# when proxying HTTP or HTTPS. For example, "Basic" results in effectively the
80+
# cleartext transmission of the user's password over the physical network.
81+
# This section describes the mechanism for disabling authentication schemes
82+
# based on the scheme name. Disabled schemes will be treated as if they are not
83+
# supported by the implementation.
84+
#
85+
# The 'jdk.http.auth.tunneling.disabledSchemes' property lists the authentication
86+
# schemes that will be disabled when tunneling HTTPS over a proxy, HTTP CONNECT.
87+
# The 'jdk.http.auth.proxying.disabledSchemes' property lists the authentication
88+
# schemes that will be disabled when proxying HTTP.
89+
#
90+
# In both cases the property is a comma-separated list of, case-insensitive,
91+
# authentication scheme names, as defined by their relevant RFCs. An
92+
# implementation may, but is not required to, support common schemes whose names
93+
# include: 'Basic', 'Digest', 'NTLM', 'Kerberos', 'Negotiate'. A scheme that
94+
# is not known, or not supported, by the implementation is ignored.
95+
#
96+
# Note: This property is currently used by the JDK Reference implementation. It
97+
# is not guaranteed to be examined and used by other implementations.
98+
#
99+
#jdk.http.auth.proxying.disabledSchemes=
100+
jdk.http.auth.tunneling.disabledSchemes=Basic
101+
102+
#
103+
# Allow restricted HTTP request headers
104+
#
105+
# By default, the following request headers are not allowed to be set by user code
106+
# in HttpRequests: "connection", "content-length", "expect", "host" and "upgrade".
107+
# The 'jdk.httpclient.allowRestrictedHeaders' property allows one or more of these
108+
# headers to be specified as a comma separated list to override the default restriction.
109+
# The names are case-insensitive and white-space is ignored (removed before processing
110+
# the list). Note, this capability is mostly intended for testing and isn't expected
111+
# to be used in real deployments. Protocol errors or other undefined behavior is likely
112+
# to occur when using them. The property is not set by default.
113+
# Note also, that there may be other headers that are restricted from being set
114+
# depending on the context. This includes the "Authorization" header when the
115+
# relevant HttpClient has an authenticator set. These restrictions cannot be
116+
# overridden by this property.
117+
#
118+
# jdk.httpclient.allowRestrictedHeaders=host
119+
#
120+
#
121+
# Transparent NTLM HTTP authentication mode on Windows. Transparent authentication
122+
# can be used for the NTLM scheme, where the security credentials based on the
123+
# currently logged in user's name and password can be obtained directly from the
124+
# operating system, without prompting the user. This property has three possible
125+
# values which regulate the behavior as shown below. Other unrecognized values
126+
# are handled the same as 'disabled'. Note, that NTLM is not considered to be a
127+
# strongly secure authentication scheme and care should be taken before enabling
128+
# this mechanism.
129+
#
130+
# Transparent authentication never used.
131+
#jdk.http.ntlm.transparentAuth=disabled
132+
#
133+
# Enabled for all hosts.
134+
#jdk.http.ntlm.transparentAuth=allHosts
135+
#
136+
# Enabled for hosts that are trusted in Windows Internet settings
137+
#jdk.http.ntlm.transparentAuth=trustedHosts
138+
#
139+
jdk.http.ntlm.transparentAuth=disabled
140+
141+
#
142+
# Maximum HTTP field section size that a client is prepared to accept
143+
#
144+
# jdk.http.maxHeaderSize=393216
145+
#
146+
# This is the maximum header field section size that a client is prepared to accept.
147+
# This is computed as the sum of the size of the uncompressed header name, plus
148+
# the size of the uncompressed header value, plus an overhead of 32 bytes for
149+
# each field section line. If a peer sends a field section that exceeds this
150+
# size a {@link java.net.ProtocolException ProtocolException} will be raised.
151+
# This applies to all versions of the HTTP protocol. A value of zero or a negative
152+
# value means no limit. If left unspecified, the default value is 393216 bytes
153+
# or 384kB.
154+
#
155+
# Note: This property is currently used by the JDK Reference implementation. It
156+
# is not guaranteed to be examined and used by other implementations.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// This system policy file grants a set of default permissions to all domains
3+
// and can be configured to grant additional permissions to modules and other
4+
// code sources. The code source URL scheme for modules linked into a
5+
// run-time image is "jrt".
6+
//
7+
// For example, to grant permission to read the "foo" property to the module
8+
// "com.greetings", the grant entry is:
9+
//
10+
// grant codeBase "jrt:/com.greetings" {
11+
// permission java.util.PropertyPermission "foo", "read";
12+
// };
13+
//
14+
15+
// default permissions granted to all domains
16+
grant {
17+
// allows anyone to listen on dynamic ports
18+
permission java.net.SocketPermission "localhost:0", "listen";
19+
20+
// "standard" properies that can be read by anyone
21+
permission java.util.PropertyPermission "java.version", "read";
22+
permission java.util.PropertyPermission "java.vendor", "read";
23+
permission java.util.PropertyPermission "java.vendor.url", "read";
24+
permission java.util.PropertyPermission "java.class.version", "read";
25+
permission java.util.PropertyPermission "os.name", "read";
26+
permission java.util.PropertyPermission "os.version", "read";
27+
permission java.util.PropertyPermission "os.arch", "read";
28+
permission java.util.PropertyPermission "file.separator", "read";
29+
permission java.util.PropertyPermission "path.separator", "read";
30+
permission java.util.PropertyPermission "line.separator", "read";
31+
permission java.util.PropertyPermission
32+
"java.specification.version", "read";
33+
permission java.util.PropertyPermission
34+
"java.specification.maintenance.version", "read";
35+
permission java.util.PropertyPermission "java.specification.vendor", "read";
36+
permission java.util.PropertyPermission "java.specification.name", "read";
37+
permission java.util.PropertyPermission
38+
"java.vm.specification.version", "read";
39+
permission java.util.PropertyPermission
40+
"java.vm.specification.vendor", "read";
41+
permission java.util.PropertyPermission
42+
"java.vm.specification.name", "read";
43+
permission java.util.PropertyPermission "java.vm.version", "read";
44+
permission java.util.PropertyPermission "java.vm.vendor", "read";
45+
permission java.util.PropertyPermission "java.vm.name", "read";
46+
};

0 commit comments

Comments
 (0)