There is a similar file in macOS (/Library/Preferences/SystemConfiguration/preferences.plist), but it's not intended to edit the file manually.
Instead the prefpane System Preferences > Network is used to set-up several "locations". A "location" provides a custom network set-up including activated or deactivated network interfaces or IP and proxy settings. The default location is "Automatic".
An example set-up is shown here:
In the left pane the interfaces are listed. By choosing an interface its configuration is shown in the right pane.
By hitting the Advanced button you are redirected to some special settings including the proxy settings.
By hitting the drop-down "Locations" and the gear you can edit the name or duplicate a locations profile:
In your case do the following:
Rename the "Automatic" profile to "Lab" (or "Work"/"Institute") hit Done and hit Apply.
Then duplicate the Lab profile, rename the copy to "Home" and hit Done.
Choose the profile "Home" in the Location drop-down and hit Apply. Configure the IP-settings for your home network: DHCP or manually.
Click the "Advanced..." button > Proxy and deselect all proxy settings - if any exist, hit OK and hit Apply.
Now at work/university choose the "Lab" profile and at home the "Home" profile in the Apple menu > Locations.