Google App Engine - list of IP addresses?

前端 未结 6 1172
挽巷
挽巷 2020-12-05 06:58

I know that Google App Engine does not support an application having a static IP address, but I\'d like to know if there is a list or range of IP addresses that an app could

6条回答
  •  感情败类
    2020-12-05 07:59

    I've created a ruby script for this exact purpose (super simple, easy to update):

    https://github.com/stephengroat/whitelist-travisci

    Resolv::DNS.open do |dns|
      ress = dns.getresource "_cloud-netblocks.googleusercontent.com", Resolv::DNS::Resource::IN::TXT
      ress.data.scan(/(?<=include:)_cloud-netblocks+\d.googleusercontent.com/).each do |r|
        subress = dns.getresource r, Resolv::DNS::Resource::IN::TXT
        subress.data.scan(/(?<=ip[4|6]:)[^\s]+/).each do |sr|
          puts sr
        end
      end
    end
    

提交回复
热议问题