Friday, August 01, 2025
Re: [NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI
> On Mon Jul 28, 2025 at 08:52:23PM +0800, Chris Billington wrote:
>> Attached is a new proposed port productivity/tickrs, which graphs
>> stock, fund and crypto prices over various timeframes in a terminal UI.
>> Data is from Yahoo Finance and Coinbase.
>
> Tested on amd64. Works perfectly for me and I would be happy if we
> could import it.
Below a diff on top of the tarball to simplify the patching to remove
static linking of curl and ssl.
it only patches src/api/Cargo.toml (and regenerate Cargo.lock).
>> Patched to use base ssl/libz and net/curl rather than the vendored
>> versions in upstream.
>>
>> make lib-depends-check complains about extra WANTLIBS for the
>> base/system libraries: I don't know why. Can someone more knowedgeable
>> with Rust ports explain?
>
> Yeah maybe a ports rust guru can help here!?
it is 'make port-lib-depends-check' (and not 'make lib-depends-check').
I changed WANTLIB (and LIB_DEPENDS) to what is need.
$ make port-lib-depends-check
$ make show=WANTLIB
c pthread c++abi m curl
The tarball (updated) is reattached.
I would be ok for import it with these changes.
--
Sebastien Marie
Commit ID: a7e651c23fb139a52abaf2119339e80baa0f5635
Change ID: urzqznqmnqvxoypqnzwszkpkmpmqzyly
Author : Sebastien Marie <semarie@kapouay.eu.org> (2025-07-31 09:00:03)
Committer: Sebastien Marie <semarie@kapouay.eu.org> (2025-08-01 10:28:01)
(no description set)
diff --git a/productivity/tickrs/Makefile b/productivity/tickrs/Makefile
index adf8340a29..977be71009 100644
--- a/productivity/tickrs/Makefile
+++ b/productivity/tickrs/Makefile
@@ -13,13 +13,14 @@
# MIT License
PERMIT_PACKAGE = Yes
-WANTLIB += ${MODCARGO_WANTLIB} crypto ssl pthread m z curl \
- nghttp2 ngtcp2 ngtcp2_crypto_quictls
+WANTLIB += ${MODCARGO_WANTLIB} m curl
-LIB_DEPENDS = net/curl www/nghttp2 net/ngtcp2
+LIB_DEPENDS = net/curl
MODULES = devel/cargo
+MODCARGO_CRATES_UPDATE += tickrs-api
+
CONFIGURE_STYLE = cargo
USE_GMAKE = Yes
@@ -27,7 +28,7 @@
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tickrs
@${SUBST_DATA} ${FILESDIR}/config.yml \
- ${PREFIX}/share/examples/tickrs/config.yml.sample
+ ${PREFIX}/share/examples/tickrs/config.yml.sample
.include "crates.inc"
diff --git a/productivity/tickrs/patches/patch-api_Cargo_toml b/productivity/tickrs/patches/patch-api_Cargo_toml
index 0d385c2793..d737d2c249 100644
--- a/productivity/tickrs/patches/patch-api_Cargo_toml
+++ b/productivity/tickrs/patches/patch-api_Cargo_toml
@@ -1,3 +1,6 @@
+- avoid "static-curl" feature (in default features)
+- avoid "static-ssl" feature
+
Index: api/Cargo.toml
--- api/Cargo.toml.orig
+++ api/Cargo.toml
@@ -6,7 +9,7 @@
futures = "0.3"
http = "0.2"
-isahc = { version = "1.7", features = ["static-ssl"] }
-+isahc = "1.7"
++isahc = { version = "1.7", default-features = false, features = ["http2", "text-decoding"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_urlencoded = "0.7"
diff --git a/productivity/tickrs/patches/patch-modcargo-crates_curl-0_4_46_Cargo_toml b/productivity/tickrs/patches/patch-modcargo-crates_curl-0_4_46_Cargo_toml
deleted file mode 100644
index 544da8c682..0000000000
--- a/productivity/tickrs/patches/patch-modcargo-crates_curl-0_4_46_Cargo_toml
+++ /dev/null
@@ -1,40 +0,0 @@
-Index: modcargo-crates/curl-0.4.46/Cargo.toml
---- modcargo-crates/curl-0.4.46/Cargo.toml.orig
-+++ modcargo-crates/curl-0.4.46/Cargo.toml
-@@ -86,7 +86,7 @@ default = ["ssl"]
- force-system-lib-on-osx = ["curl-sys/force-system-lib-on-osx"]
- http2 = ["curl-sys/http2"]
- mesalink = ["curl-sys/mesalink"]
--ntlm = ["curl-sys/ntlm"]
-+#ntlm = ["curl-sys/ntlm"]
- poll_7_68_0 = ["curl-sys/poll_7_68_0"]
- protocol-ftp = ["curl-sys/protocol-ftp"]
- rustls = ["curl-sys/rustls"]
-@@ -96,17 +96,17 @@ ssl = [
- "openssl-probe",
- "curl-sys/ssl",
- ]
--static-curl = ["curl-sys/static-curl"]
--static-ssl = ["curl-sys/static-ssl"]
-+#static-curl = ["curl-sys/static-curl"]
-+#static-ssl = ["curl-sys/static-ssl"]
- upkeep_7_62_0 = ["curl-sys/upkeep_7_62_0"]
--windows-static-ssl = [
-- "static-curl",
-- "curl-sys/windows-static-ssl",
--]
--zlib-ng-compat = [
-- "curl-sys/zlib-ng-compat",
-- "static-curl",
--]
-+#windows-static-ssl = [
-+# "static-curl",
-+# "curl-sys/windows-static-ssl",
-+#]
-+#zlib-ng-compat = [
-+# "curl-sys/zlib-ng-compat",
-+# "static-curl",
-+#]
-
- [target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-probe]
- version = "0.1.2"
diff --git a/productivity/tickrs/patches/patch-modcargo-crates_curl-sys-0_4_72+curl-8_6_0_Cargo_toml b/productivity/tickrs/patches/patch-modcargo-crates_curl-sys-0_4_72+curl-8_6_0_Cargo_toml
deleted file mode 100644
index f67ac0d171..0000000000
--- a/productivity/tickrs/patches/patch-modcargo-crates_curl-sys-0_4_72+curl-8_6_0_Cargo_toml
+++ /dev/null
@@ -1,31 +0,0 @@
-Index: modcargo-crates/curl-sys-0.4.72+curl-8.6.0/Cargo.toml
---- modcargo-crates/curl-sys-0.4.72+curl-8.6.0/Cargo.toml.orig
-+++ modcargo-crates/curl-sys-0.4.72+curl-8.6.0/Cargo.toml
-@@ -54,20 +54,20 @@ default = ["ssl"]
- force-system-lib-on-osx = []
- http2 = ["libnghttp2-sys"]
- mesalink = []
--ntlm = []
-+#ntlm = []
- poll_7_68_0 = []
- protocol-ftp = []
- rustls = ["rustls-ffi"]
- spnego = []
- ssl = ["openssl-sys"]
--static-curl = []
--static-ssl = ["openssl-sys/vendored"]
-+#static-curl = []
-+#static-ssl = ["openssl-sys/vendored"]
- upkeep_7_62_0 = []
- windows-static-ssl = []
--zlib-ng-compat = [
-- "libz-sys/zlib-ng",
-- "static-curl",
--]
-+#zlib-ng-compat = [
-+# "libz-sys/zlib-ng",
-+# "static-curl",
-+#]
-
- [target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-sys]
- version = "0.9.64"
diff --git a/productivity/tickrs/patches/patch-modcargo-crates_isahc-1_7_2_Cargo_toml b/productivity/tickrs/patches/patch-modcargo-crates_isahc-1_7_2_Cargo_toml
deleted file mode 100644
index 3db2ad4d6d..0000000000
--- a/productivity/tickrs/patches/patch-modcargo-crates_isahc-1_7_2_Cargo_toml
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: modcargo-crates/isahc-1.7.2/Cargo.toml
---- modcargo-crates/isahc-1.7.2/Cargo.toml.orig
-+++ modcargo-crates/isahc-1.7.2/Cargo.toml
-@@ -172,7 +172,7 @@ version = ">=0.2.12, <0.4.0"
- cookies = ["httpdate"]
- default = [
- "http2",
-- "static-curl",
-+# "static-curl",
- "text-decoding",
- ]
- http2 = ["curl/http2"]
-@@ -187,8 +187,8 @@ psl = [
- "publicsuffix",
- ]
- spnego = ["curl-sys/spnego"]
--static-curl = ["curl/static-curl"]
--static-ssl = ["curl/static-ssl"]
-+#static-curl = ["curl/static-curl"]
-+#static-ssl = ["curl/static-ssl"]
- text-decoding = [
- "encoding_rs",
- "mime",
Re: Multi-egress wireguard vpn's
Hello David & Misc,
While these methods are functional and powerful, I believe they introduce a significant amount of configuration overhead; particularly in dynamic environments where WAN interfaces may change, or where simple per-interface WireGuard isolation is desired.
This led me to wonder:
Would it be possible to extend the WireGuard implementation to support an explicit bind option for the local address. Something like:
ifconfig wg1 wglistenip A.B.C.D
This would allow the interface to handle all traffic via the intended WAN IP, without the need for a separate rdomain, no PF trickery, and no dependency on manipulating the global routing table.
I realize that OpenBSD favors architectural clarity over feature creep, but from a usability perspective, this would make WireGuard deployments in multi-WAN scenarios considerably simpler and easier to maintain.
Do you think such a feature could align with the system's design philosophy? Or is there a fundamental reason why such explicit binding is not desired or viable?
Thanks again for your time and input.
On Wed, Jul 30, 2025 at 12:10:02AM +0000, Andrew Dekker wrote:
> To preface, please bear with me, my terminology may not be accurate but I'll try to describe what I've been struggling with this all week.
> I am using 7.7 as a router/firewall with multiple lan's
> I would like to have multiple egress vpn's over wireguard, for individual lans
ok. i think the important thing to know here is that the interface a
packet goes out on is determined by a route lookup, and a route lookup
only uses the destination ip address. it does not care which interface
a packet comes from, or what the source address in the packet is, it's
only the destination ip that matters.
this means if you want to route packets from em1 out wg1, and packets
from em2 out wg2, regardless of the destination ip addresses, you have
to override the route decision with route-to in pf, or use multiple
routing tables/domains.
i personally find separate rdomains easier to work with, particularly
in failover situations.
so for your setup, i would have configs like this:
# cat /etc/hostname.lo1
rdomain 1
inet 127.0.0.1
up
# cat /etc/hostname.wg1
wgrtable 0
rdomain 1
inet WGIP blah
!route add default WGPEER
up
# cat /etc/hostname.em1
rdomain 1
inet foo bar
up
# cat /etc/hostname.lo2
rdomain 2
inet 127.0.0.1
up
# cat /etc/hostname.wg2
wgrtable 0
rdomain 2
inet blah blah
!route add default WG2PEER
up
# cat /etc/hostname.em2
rdomain 2
inet foo bar
up
> I have 5 dedicated ports on my router. em0 is wan, em1-4 are individual lans. I have some vlans too but thats not important.
>
> I would like to have 1 wireguard tunnel per lan, so that the lan traffic flows through its tunnel only, except for em1 which
> will need to failover to the default route on em0 when wg1 is down.
you can do this with sysctl net.inet.ip.multipath=1 and a low
priority link between rdomain 1 and 0.
# cat /etc/hostname.rport0
rdomain 0
inet x.x.x.0 255.255.255.255 x.x.x.1
!route add em1.subnet/prefix x.x.x.1
up
# cat /etc/hostname.rport1
rdomain 1
priority 2 # lower than wg1 priority
parent rport0
inet x.x.x.1 255.255.255.255 x.x.x.0
!route add default x.x.x.0 -mpath
up
the default route in rdomain 1 via wg1 should be preferred until wg1 is
taken down, then the default route over rport0 should take effect.
> I have tried with manually creating wg interfaces and gateways, using pf and rtables but am not having any luck getting wg
> to handshake unless I route 0/1 and 128/1 to the wg interface.
>
> wg-quick is out of the question it seems as it automatically adds routes which prevent the other lans from using their gateways.
>
> Does anyone know how to setup these gateways, routes and pf rules properly that individual lans can exit through different wg interfaces?
> And how to connect multiple wg interfaces at the same time?
again, i think the trick is to partition these interfaces into separate
rdomains.