mirror of
				https://github.com/v2fly/v2ray-examples.git
				synced 2025-11-04 11:55:38 +08:00 
			
		
		
		
	use hyphen
This commit is contained in:
		
							
								
								
									
										11
									
								
								VMess-HTTP2/Caddy/Caddyfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								VMess-HTTP2/Caddy/Caddyfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
https://example.domain {
 | 
			
		||||
    tls kiri_so@outlook.com
 | 
			
		||||
    root /var/www/
 | 
			
		||||
 | 
			
		||||
    proxy /test https://127.0.0.1:8443 {
 | 
			
		||||
        header_upstream Host "example.domain"
 | 
			
		||||
        header_upstream X-Forwarded-Proto "https"
 | 
			
		||||
        insecure_skip_verify
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										111
									
								
								VMess-HTTP2/Caddy/config_client.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								VMess-HTTP2/Caddy/config_client.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,111 @@
 | 
			
		||||
{
 | 
			
		||||
    "outbound": {
 | 
			
		||||
        "streamSettings": {
 | 
			
		||||
            "network": "h2",
 | 
			
		||||
            "kcpSettings": null,
 | 
			
		||||
            "httpSettings": {
 | 
			
		||||
                "host": [
 | 
			
		||||
                    "example.domain"
 | 
			
		||||
                ],
 | 
			
		||||
                "path": "/test"
 | 
			
		||||
            },
 | 
			
		||||
            "tcpSettings": null,
 | 
			
		||||
            "tlsSettings": {},
 | 
			
		||||
            "security": "tls"
 | 
			
		||||
        },
 | 
			
		||||
        "tag": "agentout",
 | 
			
		||||
        "protocol": "vmess",
 | 
			
		||||
        "mux": {
 | 
			
		||||
            "enabled": true
 | 
			
		||||
        },
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "vnext": [
 | 
			
		||||
                {
 | 
			
		||||
                    "users": [
 | 
			
		||||
                        {
 | 
			
		||||
                            "alterId": 100,
 | 
			
		||||
                            "security": "aes-128-gcm",
 | 
			
		||||
                            "id": "0cdf8a45-303d-4fed-9780-29aa7f54175e"
 | 
			
		||||
                        }
 | 
			
		||||
                    ],
 | 
			
		||||
                    "port": 443,
 | 
			
		||||
                    "address": "example.domain"
 | 
			
		||||
                }
 | 
			
		||||
            ]
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "log": {
 | 
			
		||||
        "access": "",
 | 
			
		||||
        "loglevel": "info",
 | 
			
		||||
        "error": ""
 | 
			
		||||
    },
 | 
			
		||||
    "outboundDetour": [
 | 
			
		||||
        {
 | 
			
		||||
            "tag": "direct",
 | 
			
		||||
            "protocol": "freedom",
 | 
			
		||||
            "settings": {
 | 
			
		||||
                "response": null
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "tag": "blockout",
 | 
			
		||||
            "protocol": "blackhole",
 | 
			
		||||
            "settings": {
 | 
			
		||||
                "response": {
 | 
			
		||||
                    "type": "http"
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "inbound": {
 | 
			
		||||
        "streamSettings": null,
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "ip": "127.0.0.1",
 | 
			
		||||
            "udp": true,
 | 
			
		||||
            "clients": null,
 | 
			
		||||
            "auth": "noauth"
 | 
			
		||||
        },
 | 
			
		||||
        "protocol": "socks",
 | 
			
		||||
        "port": 1080,
 | 
			
		||||
        "listen": "0.0.0.0"
 | 
			
		||||
    },
 | 
			
		||||
    "inboundDetour": null,
 | 
			
		||||
    "routing": {
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "rules": [
 | 
			
		||||
                {
 | 
			
		||||
                    "ip": [
 | 
			
		||||
                        "0.0.0.0/8",
 | 
			
		||||
                        "10.0.0.0/8",
 | 
			
		||||
                        "100.64.0.0/10",
 | 
			
		||||
                        "127.0.0.0/8",
 | 
			
		||||
                        "169.254.0.0/16",
 | 
			
		||||
                        "172.16.0.0/12",
 | 
			
		||||
                        "192.0.0.0/24",
 | 
			
		||||
                        "192.0.2.0/24",
 | 
			
		||||
                        "192.168.0.0/16",
 | 
			
		||||
                        "198.18.0.0/15",
 | 
			
		||||
                        "198.51.100.0/24",
 | 
			
		||||
                        "203.0.113.0/24",
 | 
			
		||||
                        "::1/128",
 | 
			
		||||
                        "fc00::/7",
 | 
			
		||||
                        "fe80::/10"
 | 
			
		||||
                    ],
 | 
			
		||||
                    "domain": null,
 | 
			
		||||
                    "type": "field",
 | 
			
		||||
                    "port": null,
 | 
			
		||||
                    "outboundTag": "direct"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "domainStrategy": "IPIfNonMatch"
 | 
			
		||||
        },
 | 
			
		||||
        "strategy": "rules"
 | 
			
		||||
    },
 | 
			
		||||
    "dns": {
 | 
			
		||||
        "servers": [
 | 
			
		||||
            "8.8.8.8",
 | 
			
		||||
            "8.8.4.4",
 | 
			
		||||
            "localhost"
 | 
			
		||||
        ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								VMess-HTTP2/Caddy/config_server.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								VMess-HTTP2/Caddy/config_server.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
{
 | 
			
		||||
    "outbound": {
 | 
			
		||||
        "streamSettings": null,
 | 
			
		||||
        "tag": null,
 | 
			
		||||
        "protocol": "freedom",
 | 
			
		||||
        "mux": null,
 | 
			
		||||
        "settings": null
 | 
			
		||||
    },
 | 
			
		||||
    "log": {
 | 
			
		||||
        "access": "/var/log/v2ray/access.log",
 | 
			
		||||
        "loglevel": "error",
 | 
			
		||||
        "error": "/var/log/v2ray/error.log"
 | 
			
		||||
    },
 | 
			
		||||
    "inboundDetour": null,
 | 
			
		||||
    "inbound": {
 | 
			
		||||
        "streamSettings": {
 | 
			
		||||
            "network": "h2",
 | 
			
		||||
            "kcpSettings": null,
 | 
			
		||||
            "httpSettings": {
 | 
			
		||||
                "host": [
 | 
			
		||||
                    "example.domain"
 | 
			
		||||
                ],
 | 
			
		||||
                "path": "/test"
 | 
			
		||||
            },
 | 
			
		||||
            "tcpSettings": null,
 | 
			
		||||
            "tlsSettings": {
 | 
			
		||||
                "certificates": [
 | 
			
		||||
                    {
 | 
			
		||||
                        "keyFile": "/path/to/example.domain.key",
 | 
			
		||||
                        "certificateFile": "/path/to/example.domain/fullchain.cer"
 | 
			
		||||
                    }
 | 
			
		||||
                ]
 | 
			
		||||
            },
 | 
			
		||||
            "security": "tls"
 | 
			
		||||
        },
 | 
			
		||||
        "listen": null,
 | 
			
		||||
        "protocol": "vmess",
 | 
			
		||||
        "port": 8443,
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "ip": null,
 | 
			
		||||
            "udp": true,
 | 
			
		||||
            "clients": [
 | 
			
		||||
                {
 | 
			
		||||
                    "alterId": 100,
 | 
			
		||||
                    "security": "aes-128-gcm",
 | 
			
		||||
                    "id": "0cdf8a45-303d-4fed-9780-29aa7f54175e"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "auth": null
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "outboundDetour": [
 | 
			
		||||
        {
 | 
			
		||||
            "tag": "blocked",
 | 
			
		||||
            "protocol": "blackhole",
 | 
			
		||||
            "settings": null
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "routing": {
 | 
			
		||||
        "strategy": "rules",
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "rules": [
 | 
			
		||||
                {
 | 
			
		||||
                    "ip": [
 | 
			
		||||
                        "0.0.0.0/8",
 | 
			
		||||
                        "10.0.0.0/8",
 | 
			
		||||
                        "100.64.0.0/10",
 | 
			
		||||
                        "127.0.0.0/8",
 | 
			
		||||
                        "169.254.0.0/16",
 | 
			
		||||
                        "172.16.0.0/12",
 | 
			
		||||
                        "192.0.0.0/24",
 | 
			
		||||
                        "192.0.2.0/24",
 | 
			
		||||
                        "192.168.0.0/16",
 | 
			
		||||
                        "198.18.0.0/15",
 | 
			
		||||
                        "198.51.100.0/24",
 | 
			
		||||
                        "203.0.113.0/24",
 | 
			
		||||
                        "::1/128",
 | 
			
		||||
                        "fc00::/7",
 | 
			
		||||
                        "fe80::/10"
 | 
			
		||||
                    ],
 | 
			
		||||
                    "domain": null,
 | 
			
		||||
                    "type": "field",
 | 
			
		||||
                    "port": null,
 | 
			
		||||
                    "outboundTag": "blocked"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "domainStrategy": null
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "dns": null
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										111
									
								
								VMess-HTTP2/config_client.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								VMess-HTTP2/config_client.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,111 @@
 | 
			
		||||
{
 | 
			
		||||
    "outbound": {
 | 
			
		||||
        "streamSettings": {
 | 
			
		||||
            "network": "h2",
 | 
			
		||||
            "kcpSettings": null,
 | 
			
		||||
            "httpSettings": {
 | 
			
		||||
                "host": [
 | 
			
		||||
                    "example.domain"
 | 
			
		||||
                ],
 | 
			
		||||
                "path": "/test"
 | 
			
		||||
            },
 | 
			
		||||
            "tcpSettings": null,
 | 
			
		||||
            "tlsSettings": {},
 | 
			
		||||
            "security": "tls"
 | 
			
		||||
        },
 | 
			
		||||
        "tag": "agentout",
 | 
			
		||||
        "protocol": "vmess",
 | 
			
		||||
        "mux": {
 | 
			
		||||
            "enabled": true
 | 
			
		||||
        },
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "vnext": [
 | 
			
		||||
                {
 | 
			
		||||
                    "users": [
 | 
			
		||||
                        {
 | 
			
		||||
                            "alterId": 100,
 | 
			
		||||
                            "security": "aes-128-gcm",
 | 
			
		||||
                            "id": "0cdf8a45-303d-4fed-9780-29aa7f54175e"
 | 
			
		||||
                        }
 | 
			
		||||
                    ],
 | 
			
		||||
                    "port": 443,
 | 
			
		||||
                    "address": "example.domain"
 | 
			
		||||
                }
 | 
			
		||||
            ]
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "log": {
 | 
			
		||||
        "access": "",
 | 
			
		||||
        "loglevel": "info",
 | 
			
		||||
        "error": ""
 | 
			
		||||
    },
 | 
			
		||||
    "outboundDetour": [
 | 
			
		||||
        {
 | 
			
		||||
            "tag": "direct",
 | 
			
		||||
            "protocol": "freedom",
 | 
			
		||||
            "settings": {
 | 
			
		||||
                "response": null
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "tag": "blockout",
 | 
			
		||||
            "protocol": "blackhole",
 | 
			
		||||
            "settings": {
 | 
			
		||||
                "response": {
 | 
			
		||||
                    "type": "http"
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "inbound": {
 | 
			
		||||
        "streamSettings": null,
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "ip": "127.0.0.1",
 | 
			
		||||
            "udp": true,
 | 
			
		||||
            "clients": null,
 | 
			
		||||
            "auth": "noauth"
 | 
			
		||||
        },
 | 
			
		||||
        "protocol": "socks",
 | 
			
		||||
        "port": 1080,
 | 
			
		||||
        "listen": "0.0.0.0"
 | 
			
		||||
    },
 | 
			
		||||
    "inboundDetour": null,
 | 
			
		||||
    "routing": {
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "rules": [
 | 
			
		||||
                {
 | 
			
		||||
                    "ip": [
 | 
			
		||||
                        "0.0.0.0/8",
 | 
			
		||||
                        "10.0.0.0/8",
 | 
			
		||||
                        "100.64.0.0/10",
 | 
			
		||||
                        "127.0.0.0/8",
 | 
			
		||||
                        "169.254.0.0/16",
 | 
			
		||||
                        "172.16.0.0/12",
 | 
			
		||||
                        "192.0.0.0/24",
 | 
			
		||||
                        "192.0.2.0/24",
 | 
			
		||||
                        "192.168.0.0/16",
 | 
			
		||||
                        "198.18.0.0/15",
 | 
			
		||||
                        "198.51.100.0/24",
 | 
			
		||||
                        "203.0.113.0/24",
 | 
			
		||||
                        "::1/128",
 | 
			
		||||
                        "fc00::/7",
 | 
			
		||||
                        "fe80::/10"
 | 
			
		||||
                    ],
 | 
			
		||||
                    "domain": null,
 | 
			
		||||
                    "type": "field",
 | 
			
		||||
                    "port": null,
 | 
			
		||||
                    "outboundTag": "direct"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "domainStrategy": "IPIfNonMatch"
 | 
			
		||||
        },
 | 
			
		||||
        "strategy": "rules"
 | 
			
		||||
    },
 | 
			
		||||
    "dns": {
 | 
			
		||||
        "servers": [
 | 
			
		||||
            "8.8.8.8",
 | 
			
		||||
            "8.8.4.4",
 | 
			
		||||
            "localhost"
 | 
			
		||||
        ]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								VMess-HTTP2/config_server.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								VMess-HTTP2/config_server.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
{
 | 
			
		||||
    "outbound": {
 | 
			
		||||
        "streamSettings": null,
 | 
			
		||||
        "tag": null,
 | 
			
		||||
        "protocol": "freedom",
 | 
			
		||||
        "mux": null,
 | 
			
		||||
        "settings": null
 | 
			
		||||
    },
 | 
			
		||||
    "log": {
 | 
			
		||||
        "access": "/var/log/v2ray/access.log",
 | 
			
		||||
        "loglevel": "error",
 | 
			
		||||
        "error": "/var/log/v2ray/error.log"
 | 
			
		||||
    },
 | 
			
		||||
    "inboundDetour": null,
 | 
			
		||||
    "inbound": {
 | 
			
		||||
        "streamSettings": {
 | 
			
		||||
            "network": "h2",
 | 
			
		||||
            "kcpSettings": null,
 | 
			
		||||
            "httpSettings": {
 | 
			
		||||
                "host": [
 | 
			
		||||
                    "example.domain"
 | 
			
		||||
                ],
 | 
			
		||||
                "path": "/test"
 | 
			
		||||
            },
 | 
			
		||||
            "tcpSettings": null,
 | 
			
		||||
            "tlsSettings": {
 | 
			
		||||
                "certificates": [
 | 
			
		||||
                    {
 | 
			
		||||
                        "keyFile": "/path/to/example.domain.key",
 | 
			
		||||
                        "certificateFile": "/path/to/example.domain/fullchain.cer"
 | 
			
		||||
                    }
 | 
			
		||||
                ]
 | 
			
		||||
            },
 | 
			
		||||
            "security": "tls"
 | 
			
		||||
        },
 | 
			
		||||
        "listen": null,
 | 
			
		||||
        "protocol": "vmess",
 | 
			
		||||
        "port": 443,
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "ip": null,
 | 
			
		||||
            "udp": true,
 | 
			
		||||
            "clients": [
 | 
			
		||||
                {
 | 
			
		||||
                    "alterId": 100,
 | 
			
		||||
                    "security": "aes-128-gcm",
 | 
			
		||||
                    "id": "0cdf8a45-303d-4fed-9780-29aa7f54175e"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "auth": null
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "outboundDetour": [
 | 
			
		||||
        {
 | 
			
		||||
            "tag": "blocked",
 | 
			
		||||
            "protocol": "blackhole",
 | 
			
		||||
            "settings": null
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "routing": {
 | 
			
		||||
        "strategy": "rules",
 | 
			
		||||
        "settings": {
 | 
			
		||||
            "rules": [
 | 
			
		||||
                {
 | 
			
		||||
                    "ip": [
 | 
			
		||||
                        "0.0.0.0/8",
 | 
			
		||||
                        "10.0.0.0/8",
 | 
			
		||||
                        "100.64.0.0/10",
 | 
			
		||||
                        "127.0.0.0/8",
 | 
			
		||||
                        "169.254.0.0/16",
 | 
			
		||||
                        "172.16.0.0/12",
 | 
			
		||||
                        "192.0.0.0/24",
 | 
			
		||||
                        "192.0.2.0/24",
 | 
			
		||||
                        "192.168.0.0/16",
 | 
			
		||||
                        "198.18.0.0/15",
 | 
			
		||||
                        "198.51.100.0/24",
 | 
			
		||||
                        "203.0.113.0/24",
 | 
			
		||||
                        "::1/128",
 | 
			
		||||
                        "fc00::/7",
 | 
			
		||||
                        "fe80::/10"
 | 
			
		||||
                    ],
 | 
			
		||||
                    "domain": null,
 | 
			
		||||
                    "type": "field",
 | 
			
		||||
                    "port": null,
 | 
			
		||||
                    "outboundTag": "blocked"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "domainStrategy": null
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "dns": null
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user