Skip to main content

vps居然不支持ipv6, grpc如何把内网数据暴露给外网?

· 2 min read

我在本地的raspberry上部署了nacos,靠ipv6暴露给外面

本地mac和imac访问都是没问题的

但是如果想vps主动给我的raspberry发请求,却不行

ipv6是不支持的,可以用ifconfig看到没有ipv6 address

目前已经反馈给了vps官方

如果官方解决不了,我只能靠grpc的双向流去解决了

思路: client端部署在raspberry pi上,监听nacos配置,如果nacos配置发生变化就把新配置发给vps,然后vps更新内存中的数据

syntax = "proto3";

option go_package="./;proto";

service Greeter {
rpc GetConfigFromVPS(Empty) returns (BMKConfig);
rpc SendConfigToVPS(stream BMKConfig) returns (Empty);
}

message BMKConfig {
repeated Brand brands = 1;
map<string,string> file_map = 2;
}

message Brand {
string short_name = 1;
string full_name = 2;
string color = 3;
}

message Empty {
}

既然vps不能给本地放请求,那么就让本地主动把数据发给vps