summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Rostovtsev <dan@rostovtsev.org>2026-03-16 16:02:54 -0400
committerDan Rostovtsev <dan@rostovtsev.org>2026-03-16 16:02:54 -0400
commit2c6cf786c151118232533a6cfbc769ce1514aa9e (patch)
tree0dc171e25f46ea491f98f4a4a96b94e69defea89
Simple bash script deployment of client portal gateway.
-rw-r--r--NOTES5
-rw-r--r--README4
-rw-r--r--resources/clientportal.gw.zipbin0 -> 10542956 bytes
-rw-r--r--resources/custom.yaml28
-rwxr-xr-xscripts/deploy.bash19
-rwxr-xr-xscripts/keepalive.bash7
-rwxr-xr-xscripts/tickle.py5
7 files changed, 68 insertions, 0 deletions
diff --git a/NOTES b/NOTES
new file mode 100644
index 0000000..bc8094e
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,5 @@
+TLS is not necessary for local host, can turn it off and remove
+warnings. The proxy connection SHOULD be encrypted.
+
+You can use the "procyon" Java decompiler to read the source for the
+gateway. The source is straightforward.
diff --git a/README b/README
new file mode 100644
index 0000000..0a0ebd7
--- /dev/null
+++ b/README
@@ -0,0 +1,4 @@
+Interactive Brokers Client Portal Gateway
+(ibkr-cpgw)
+
+A tool for configuring and installing the IBKR gateway.
diff --git a/resources/clientportal.gw.zip b/resources/clientportal.gw.zip
new file mode 100644
index 0000000..91586c5
--- /dev/null
+++ b/resources/clientportal.gw.zip
Binary files differ
diff --git a/resources/custom.yaml b/resources/custom.yaml
new file mode 100644
index 0000000..302fe5b
--- /dev/null
+++ b/resources/custom.yaml
@@ -0,0 +1,28 @@
+ ip2loc: "US"
+ proxyRemoteSsl: true
+ proxyRemoteHost: "https://api.ibkr.com"
+ listenPort: 5000
+ listenSsl: false
+ ccp: false
+ svcEnvironment: "v1"
+ authDelay: 3000
+ portalBaseURL: ""
+ serverOptions:
+ blockedThreadCheckInterval: 1000000
+ eventLoopPoolSize: 20
+ workerPoolSize: 20
+ maxWorkerExecuteTime: 100
+ internalBlockingPoolSize: 20
+ cors:
+ origin.allowed: "*"
+ allowCredentials: false
+ webApps:
+ - name: "demo"
+ index: "index.html"
+ ips:
+ allow:
+ - 192.*
+ - 131.216.*
+ - 127.0.0.1
+ deny:
+ - 212.90.324.10
diff --git a/scripts/deploy.bash b/scripts/deploy.bash
new file mode 100755
index 0000000..0fd8193
--- /dev/null
+++ b/scripts/deploy.bash
@@ -0,0 +1,19 @@
+#!/usr/bin/bash
+
+set -e
+
+# create env
+TMP=`mktemp -t -d ibkr-cpgw.XXXXXX`
+mkdir -p $TMP
+cp resources/clientportal.gw.zip $TMP
+cp resources/custom.yaml $TMP
+
+# build env
+cd $TMP
+unzip clientportal.gw.zip
+cp custom.yaml ./root/custom.yaml
+
+# run gateway
+./bin/run.sh ./root/custom.yaml
+
+rm -rf $TMP
diff --git a/scripts/keepalive.bash b/scripts/keepalive.bash
new file mode 100755
index 0000000..3b2a1ae
--- /dev/null
+++ b/scripts/keepalive.bash
@@ -0,0 +1,7 @@
+#!/usr/bin/bash
+
+while [ 0 ]; do
+ ./scripts/tickle.py
+ echo teehee
+ sleep 60
+done
diff --git a/scripts/tickle.py b/scripts/tickle.py
new file mode 100755
index 0000000..59902d0
--- /dev/null
+++ b/scripts/tickle.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python3
+
+import requests
+
+requests.get("http://localhost:5000/v1/api/tickle")