Skip to content

Fowarding to target website via a socks5 proxy. #114

Description

@cvooc

I found this extension module through google
https://caddy.community/t/fowarding-to-target-website-via-a-socks5-proxy/12349

I have the same requirement as the source, when I visit http://abc.com, it can send me through a specific socks5 proxy (like socks5://127.0.0.1:40000 of cf warp or shadowsocks/v2ray) Redirect to the target website, such as: https://xxx.com

I try to learn the configuration of this module, but I have no clue at all. The display in the readme is relatively simple. I can't understand what configuration I need to do. Can you help me?

My original configuration looks like this:

{
    "apps": {
        "http": {
            "servers": {
                "srv0": {
                    "listen": [":443"],
                    "routes": [{
                        "match": [{ "host": ["abc.com"] }],
                        "handle": [{
                            "handler": "subroute",
                            "routes": [{
                                "handle": [{
                                    "handler": "reverse_proxy",
                                    "headers": { "request": { "set": { "Host": ["{http.reverse_proxy.upstream.hostport}"] } } },
                                    "upstreams": [{ "dial": "xxx.com:80" }]
                                }]
                            }]
                        }],
                        "terminal": true
                    }]
                }
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions