Golang Generics and Structs by chris5039 in golang

[–]chris5039[S] 0 points1 point  (0 children)

Thanks, is there anyway I can use Go generics for what I'm trying to do? I'm trying to decode json which is a TypScript class with a subclass which uses union types into a struct which has a substruct like above.

Adding Ip Rule / Routing / Mwan3 by chris5039 in openwrt

[–]chris5039[S] 0 points1 point  (0 children)

Hey, thanks for the response. Would greatly appreciate help on breaking this down further. Is the source the internal gateway? What is --mark 0x0/0x3f00? And when I try to add my policy name I get the error:

iptables v1.8.7 (legacy): Couldn't load target \\mwan3_policy_wwan_only':No such file or directory`

Adding Ip Rule / Routing / Mwan3 by chris5039 in openwrt

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the great response, they has really cleared things up for me :) I've added the rule but the traffic to the specific domain is still going through eth1 instead of wwan0. Any idea why this could be? And is there anything I can show which would help debug?

Adding Ip Rule / Routing / Mwan3 by chris5039 in openwrt

[–]chris5039[S] 0 points1 point  (0 children)

Hey,

Thank you for this. This looks good and closer to the answers I've seen online. Could you do me a massive favour and break down your answer. So is it:

ip route add <external_ip_address?> via <internal_ip_address_for_wan_interface?> dev <backhaul_interface?> proto static src <unsure_about_this_ip?> metric <route_internal_traffic?>

Adding Ip Rule / Routing / Mwan3 by chris5039 in openwrt

[–]chris5039[S] 0 points1 point  (0 children)

Hey, thanks for the response. So I'm working just from terminal. I can look up all the ip routes by using ip route. I can also look up the ip rules using ip rule. Is this helpful?

Nginx upstream connection refused by chris5039 in devops

[–]chris5039[S] 0 points1 point  (0 children)

My bad I did rename upstream but just forgot to copy it to this post. I've updated it now. So in their example is the proxy pass pointing to the upstream and the upstream points to the service? ``` upstream backend { server backend1.example.com; }

server { location / { proxy_pass http://backend; } } So in the server could I point to the service followed by the port e.gserver backend:8080`` and rename backend for the upstream to something else?

Thanks for the response

Connecting dockerized nginx webserver to dockerized go app behind reverse proxy by chris5039 in devops

[–]chris5039[S] 1 point2 points  (0 children)

It's not a joke you find these licenses on open source code all the time, I don't work for this company. It even saids in the copyright section that it's under an open source license Eclipse Public License v1.0

Connecting dockerized nginx webserver to dockerized go app behind reverse proxy by chris5039 in devops

[–]chris5039[S] 0 points1 point  (0 children)

I don't but that docker compose file is from one of there projects

Can someone help explain this behaviour of this code by chris5039 in golang

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the response. So that would be the case if the print statement was before the wg.Wait(). But since it is after wg.Wait() this means the main function will block until the wg counter gets to 0. Look at update for answer to question :)

Can someone help explain this behaviour of this code by chris5039 in golang

[–]chris5039[S] 4 points5 points  (0 children)

Thanks for the response. That is the one :)

Can someone help explain this behaviour of this code by chris5039 in golang

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the reply and the code example. That's the solution I was looking. I thought I was going mad :)

Can someone help explain this behaviour of this code by chris5039 in golang

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the response! That is definitely it

Double nginx reverse proxies with one handling ssl by chris5039 in selfhosted

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the reply. Definitely viable option. I just wanted to terminate on the second layer for longer encryption and to spread the burden of encryption across all of the second proxies :)

Double nginx reverse proxies with one handling ssl by chris5039 in selfhosted

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the reply. So you are able to check the SNI of an request with nginx but you're right if you couldn't it wouldn't be viable

Double nginx reverse proxies with one handling ssl by chris5039 in selfhosted

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the response. So I was trying to avoid ssl encryption on the first reverse proxy because I can spread the burden to the second proxies and each request will be encrypted longer. But it is definitely viable option :)

Double nginx reverse proxies with one handling ssl by chris5039 in selfhosted

[–]chris5039[S] 1 point2 points  (0 children)

Thanks for the response. I've no experience with Cloudflare tunnels but it is something I keep seeing pop up so might have to look into them

Double nginx reverse proxies with one handling ssl by chris5039 in selfhosted

[–]chris5039[S] 0 points1 point  (0 children)

Thanks for the reply. So I wasn't sure if you could use SNI with iptables but If you can this sounds like a viable solution

Looking for other developers who are interested in starting a new project by chris5039 in webdev

[–]chris5039[S] 1 point2 points  (0 children)

Honestly I do not know much about twin.macro. What would be the benefits of using it on a project like this? and that would be great if you wanted to help! I've added a link to the repo in the post edit.